# -*- coding: utf-8 -*-
"""Memor parameters and constants."""
from enum import Enum
MEMOR_VERSION = "0.8"

DATE_TIME_FORMAT = "%Y-%m-%d %H:%M:%S %z"

INVALID_PATH_MESSAGE = "Invalid path: must be a string and refer to an existing location. Given path: {path}"
INVALID_STR_VALUE_MESSAGE = "Invalid value. `{parameter_name}` must be a string."
INVALID_BOOL_VALUE_MESSAGE = "Invalid value. `{parameter_name}` must be a boolean."
INVALID_POSFLOAT_VALUE_MESSAGE = "Invalid value. `{parameter_name}` must be a positive number."
INVALID_POSINT_VALUE_MESSAGE = "Invalid value. `{parameter_name}` must be a positive integer."
INVALID_PROB_VALUE_MESSAGE = "Invalid value. `{parameter_name}` must be a value between 0 and 1."
INVALID_LIST_OF_X_MESSAGE = "Invalid value. `{parameter_name}` must be a list of {type_name}."
INVALID_INT_OR_STR_MESSAGE = "Invalid value. `{parameter_name}` must be an integer or a string."
INVALID_INT_OR_STR_SLICE_MESSAGE = "Invalid value. `{parameter_name}` must be an integer, string or a slice."
INVALID_DATETIME_MESSAGE = "Invalid value. `{parameter_name}` must be a datetime object that includes timezone information."
INVALID_TEMPLATE_MESSAGE = "Invalid template. It must be an instance of `PromptTemplate` or `PresetPromptTemplate`."
INVALID_RESPONSE_MESSAGE = "Invalid response. It must be an instance of `Response`."
INVALID_MESSAGE = "Invalid message. It must be an instance of `Prompt` or `Response`."
INVALID_MESSAGE_STATUS_LEN_MESSAGE = "Invalid message status length. It must be equal to the number of messages."
INVALID_CUSTOM_MAP_MESSAGE = "Invalid custom map: it must be a dictionary with keys and values that can be converted to strings."
INVALID_ROLE_MESSAGE = "Invalid role. It must be an instance of Role enum."
INVALID_ID_MESSAGE = "Invalid message ID. It must be a valid UUIDv4."
INVALID_MODEL_MESSAGE = "Invalid model. It must be an instance of LLMModel enum or a string."
INVALID_TEMPLATE_STRUCTURE_MESSAGE = "Invalid template structure. It should be a JSON object with proper fields."
INVALID_PROMPT_STRUCTURE_MESSAGE = "Invalid prompt structure. It should be a JSON object with proper fields."
INVALID_RESPONSE_STRUCTURE_MESSAGE = "Invalid response structure. It should be a JSON object with proper fields."
INVALID_SESSION_STRUCTURE_MESSAGE = "Invalid session structure. It should be a JSON object with proper fields."
INVALID_RENDER_FORMAT_MESSAGE = "Invalid render format. It must be an instance of RenderFormat enum."
PROMPT_RENDER_ERROR_MESSAGE = "Prompt template and properties are incompatible."
UNSUPPORTED_OPERAND_ERROR_MESSAGE = "Unsupported operand type(s) for {operator}: `{operand1}` and `{operand2}`"
AI_STUDIO_SYSTEM_WARNING = "Google AI Studio models may not support content with a system role."
DATA_SAVE_SUCCESS_MESSAGE = "Everything seems good."


class Role(Enum):
    """Role enum."""

    SYSTEM = "system"
    USER = "user"
    ASSISTANT = "assistant"
    DEFAULT = USER


class RenderFormat(Enum):
    """Render format."""

    STRING = "STRING"
    OPENAI = "OPENAI"
    AI_STUDIO = "AI STUDIO"
    DICTIONARY = "DICTIONARY"
    ITEMS = "ITEMS"
    DEFAULT = STRING


class LLMModel(Enum):
    """LLM model enum."""

    GPT_4 = "gpt-4"
    GPT_4_TURBO = "gpt-4-turbo"
    GPT_4_VISION = "gpt-4-vision"
    GPT_4O = "gpt-4o"
    GPT_4O_MINI = "gpt-4o-mini"
    GPT_4O_SEARCH = "gpt-4o-search"
    GPT_4O_MINI_SEARCH = "gpt-4o-mini-search"
    GPT_4_1 = "gpt-4.1"
    GPT_4_1_MINI = "gpt-4.1-mini"
    GPT_4_1_NANO = "gpt-4.1-nano"
    GPT_O1 = "gpt-o1"
    GPT_O1_MINI = "gpt-o1-mini"
    GPT_O1_PRO = "gpt-o1-pro"
    GPT_O3 = "gpt-o3"
    GPT_O3_MINI = "gpt-o3-mini"
    GPT_O3_MINI_HIGH = "gpt-o3-mini-high"
    GPT_O3_DEEP_RESEARCH = "gpt-o3-deep-research"
    GPT_O4_MINI = "gpt-o4-mini"
    GPT_O4_MINI_DEEP_RESEARCH = "gpt-o4-mini-deep-research"
    GPT_3_5_TURBO = "gpt-3.5-turbo"
    DAVINCI = "davinci"
    BABBAGE = "babbage"

    CLAUDE_3_5_SONNET = "claude-3.5-sonnet"
    CLAUDE_3_OPUS = "claude-3-opus"
    CLAUDE_3_HAIKU = "claude-3-haiku"
    CLAUDE_2 = "claude-2"
    CLAUDE_INSTANT = "claude-instant"

    LLAMA3_70B = "llama3-70b"
    LLAMA3_8B = "llama3-8b"
    LLAMA_GUARD_3_8B = "llama-guard-3-8b"

    MISTRAL_7B = "mistral-7b"
    MIXTRAL_8X7B = "mixtral-8x7b"
    MIXTRAL_8X22B = "mixtral-8x22b"
    MISTRAL_NEMO = "mistral-nemo"
    MISTRAL_TINY = "mistral-tiny"
    MISTRAL_SMALL = "mistral-small"
    MISTRAL_MEDIUM = "mistral-medium"
    MISTRAL_LARGE = "mistral-large"
    CODESTRAL = "codestral"
    PIXTRAL = "pixtral-12b"

    GEMMA_7B = "gemma-7b"
    GEMMA2_9B = "gemma2-9b"
    GEMMA3_1B = "gemma3-1b"
    GEMMA3_4B = "gemma3-4b"
    GEMMA3_12B = "gemma3-12b"
    GEMMA3_27B = "gemma3-27b"
    GEMMA3N_E2B = "gemma3n-e2b"
    GEMMA3N_E4B = "gemma3n-e4b"
    CODEGEMMA_2B = "codegemma-2b"
    CODEGEMMA_7B = "codegemma-7b"
    RECURRENTGEMMA_2B = "recurrentgemma-2b"
    RECURRENTGEMMA_9B = "recurrentgemma-9b"
    PALIGEMMA_1_3B = "paligemma-1-3b"
    PALIGEMMA_2_3B = "paligemma-2-3b"
    PALIGEMMA_2_10B = "paligemma-2-10b"
    PALIGEMMA_2_28B = "paligemma-2-28b"
    TXGEMMA = "txgemma"
    DATAGEMMA = "datagemma"
    SHIELDGEMMA_1_2B = "shieldgemma-1-2b"
    SHIELDGEMMA_1_9B = "shieldgemma-1-9b"
    SHIELDGEMMA_1_27B = "shieldgemma-1-27b"
    SHIELDGEMMA_2_4B = "shieldgemma-2-4b"
    GEMINI_1_PRO = "gemini-1-pro"
    GEMINI_1_ULTRA = "gemini-1-ultra"
    GEMINI_1_5_PRO = "gemini-1.5-pro"
    GEMINI_1_5_ULTRA = "gemini-1.5-ultra"
    GEMINI_1_5_FLASH = "gemini-1.5-flash"
    GEMINI_2_FLASH = "gemini-2-flash"
    GEMINI_2_FLASH_LITE = "gemini-2-flash-lite"
    GEMINI_2_PRO = "gemini-2-pro"
    GEMINI_2_5_FLASH = "gemini-2.5-flash"
    GEMINI_2_5_FLASH_LITE = "gemini-2.5-flash-lite"
    GEMINI_2_5_PRO = "gemini-2.5-pro"

    DEEPSEEK_LLM_7B_BASE = "deepseek-llm-7b-base"
    DEEPSEEK_LLM_7B_CHAT = "deepseek-llm-7b-chat"
    DEEPSEEK_LLM_67B_BASE = "deepseek-llm-67b-base"
    DEEPSEEK_LLM_67B_CHAT = "deepseek-llm-67b-chat"
    DEEPSEEK_MOE_16B_BASE = "deepseek-moe-16b-base"
    DEEPSEEK_MOE_16B_CHAT = "deepseek-moe-16b-chat"
    DEEPSEEK_CODER = "deepseek-coder"
    DEEPSEEK_CODER_1_3B_BASE = "deepseek-coder-1.3b-base"
    DEEPSEEK_CODER_1_3B_INSTRUCT = "deepseek-coder-1.3b-instruct"
    DEEPSEEK_CODER_6_7B_BASE = "deepseek-coder-6.7b-base"
    DEEPSEEK_CODER_6_7B_INSTRUCT = "deepseek-coder-6.7b-instruct"
    DEEPSEEK_CODER_7B_BASE = "deepseek-coder-7b-base"
    DEEPSEEK_CODER_7B_INSTRUCT = "deepseek-coder-7b-instruct"
    DEEPSEEK_CODER_33B_BASE = "deepseek-coder-33b-base"
    DEEPSEEK_CODER_33B_INSTRUCT = "deepseek-coder-33b-instruct"
    DEEPSEEK_VL_7B_CHAT = "deepseek-vl-7b-chat"
    DEEPSEEK_VL_1_3B_BASE = "deepseek-vl-1.3b-base"
    DEEPSEEK_VL_7B_BASE = "deepseek-vl-7b-base"
    DEEPSEEK_VL_1_3B_CHAT = "deepseek-vl-1.3b-chat"
    DEEPSEEK_VL2_TINY = "deepseek-vl2-tiny"
    DEEPSEEK_VL2_SMALL = "deepseek-vl2-small"
    DEEPSEEK_VL2_BASE = "deepseek-vl2-base"
    DEEPSEEK_MATH_7B_BASE = "deepseek-math-7b-base"
    DEEPSEEK_MATH_7B_INSTRUCT = "deepseek-math-7b-instruct"
    DEEPSEEK_MATH_7B_RL = "deepseek-math-7b-rl"
    DEEPSEEK_CODER_V2_LITE_BASE = "deepseek-coder-v2-lite-base"
    DEEPSEEK_CODER_V2_LITE_INSTRUCT = "deepseek-coder-v2-lite-instruct"
    DEEPSEEK_CODER_V2_BASE = "deepseek-coder-v2-base"
    DEEPSEEK_CODER_V2_INSTRUCT = "deepseek-coder-v2-instruct"
    DEEPSEEK_V2 = "deepseek-v2"
    DEEPSEEK_V2_5 = "deepseek-v2.5"
    DEEPSEEK_V2_CHAT = "deepseek-v2-chat"
    DEEPSEEK_V2_LITE = "deepseek-v2-lite"
    DEEPSEEK_V2_LITE_CHAT = "deepseek-v2-lite-chat"
    DEEPSEEK_V3_BASE = "deepseek-v3-base"
    DEEPSEEK_V3 = "deepseek-v3"
    DEEPSEEK_PROVER_V1 = "deepseek-prover-v1"
    DEEPSEEK_PROVER_V1_5_BASE = "deepseek-prover-v1.5-base"
    DEEPSEEK_PROVER_V1_5_SFT = "deepseek-prover-v1.5-sft"
    DEEPSEEK_PROVER_V1_5_RL = "deepseek-prover-v1.5-rl"
    DEEPSEEK_PROVER_V2_7B = "deepseek-prover-v2-7b"
    DEEPSEEK_PROVER_V2_671B = "deepseek-prover-v2-671b"
    DEEPSEEK_R1_ZERO = "deepseek-r1-zero"
    DEEPSEEK_R1 = "deepseek-r1"
    DEEPSEEK_R1_DISTILL_QWEN_1_5B = "deepseek-r1-distill-qwen-1.5b"
    DEEPSEEK_R1_DISTILL_QWEN_7B = "deepseek-r1-distill-qwen-7b"
    DEEPSEEK_R1_DISTILL_QWEN_14B = "deepseek-r1-distill-qwen-14b"
    DEEPSEEK_R1_DISTILL_QWEN_32B = "deepseek-r1-distill-qwen-32b"
    DEEPSEEK_R1_DISTILL_LLAMA_8B = "deepseek-r1-distill-llama-8b"
    DEEPSEEK_R1_DISTILL_LLAMA_70B = "deepseek-r1-distill-llama-70b"
    JANUS_1B = "janus-1b"
    JANUS_PRO_7B = "janus-pro-7b"
    JANUS_1_3B = "janus-1.3b"
    JANUS_FLOW_1_3B = "janus-flow-1.3b"
    ESFT_VANILLA_LITE = "esft-vanilla-lite"
    ESFT_TOKEN_LAW_LITE = "esft-token-law-lite"
    ESFT_TOKEN_SUMMARY_LITE = "esft-token-summary-lite"
    ESFT_TOKEN_CODE_LITE = "esft-token-code-lite"
    ESFT_TOKEN_INTENT_LITE = "esft-token-intent-lite"
    ESFT_TOKEN_TRANSLATION_LITE = "esft-token-translation-lite"
    ESFT_TOKEN_MATH_LITE = "esft-token-math-lite"
    ESFT_GATE_LAW_LITE = "esft-gate-law-lite"
    ESFT_GATE_SUMMARY_LITE = "esft-gate-summary-lite"
    ESFT_GATE_TRANSLATION_LITE = "esft-gate-translation-lite"
    ESFT_GATE_CODE_LITE = "esft-gate-code-lite"
    ESFT_GATE_INTENT_LITE = "esft-gate-intent-lite"
    ESFT_GATE_MATH_LITE = "esft-gate-math-lite"

    PHI_2 = "phi-2"
    PHI_4 = "phi-4"

    QWEN_1_8B = "qwen-1.8b"
    QWEN_7B = "qwen-7b"
    QWEN_14B = "qwen-14b"
    QWEN_72B = "qwen-72b"

    YI_34B = "yi-34b"
    YI_34B_CHAT = "yi-34b-chat"
    YI_34B_CHAT_8BITS = "yi-34b-chat-8bits"
    YI_34B_CHAT_4BITS = "yi-34b-chat-4bits"
    YI_9B = "yi-9b"
    YI_6B_CHAT = "yi-6b-chat"
    YI_6B = "yi-6b"
    YI_1_5_34B = "yi-1.5-34b"
    YI_1_5_34B_CHAT = "yi-1.5-34b-chat"
    YI_1_5_9B = "yi-1.5-9b"
    YI_1_5_9B_CHAT = "yi-1.5-9b-chat"
    YI_1_5_6B = "yi-1.5-6b"
    YI_1_5_6B_CHAT = "yi-1.5-6b-chat"
    YI_VL_34B = "yi-vl-34b"
    YI_VL_6B = "yi-vl-6b"
    YI_CODER_9B_CHAT = "yi-coder-9b-chat"
    YI_CODER_9B = "yi-coder-9b"
    YI_CODER_1_5B_CHAT = "yi-coder-1.5b-chat"
    YI_CODER_1_5B = "yi-coder-1.5b"

    DEFAULT = "unknown"
