# cp ./env_example ./.env
# vim .env
# Do not mv, rm or edit examples! They're required as default templates.

# If this env is manually configured
IS_REAL_ENV = '0'

# Current backend version
CURR_VERSION = '1.1.003'


# Model endpoint settings

# MAICA core model endpoint
MCORE_ADDR = 'http://172.17.0.1:80/v1'
# MAICA core model api key
MCORE_KEY = 'EMPTY'
# MAICA core model choice, leave empty for first
MCORE_CHOICE = ''
# MAICA core model completion extra params, must be valid json
# Not a part of OpenAI standard, so only useful for vllm-like deployments
MCORE_EXTRA = '
    {
        "extra_body": {
            "repetition_penalty": 1.0,
            "length_penalty": 1.0
        }
    }
'
# MFocus model endpoint
MFOCUS_ADDR = 'http://172.17.0.2:80/v1'
# MFocus model api key
MFOCUS_KEY = 'EMPTY'
# MFocus model choice, leave empty for first
MFOCUS_CHOICE = ''
# MFocus model completion extra params, must be valid json
# Not a part of OpenAI standard, so only useful for vllm-like deployments
MFOCUS_EXTRA = '
    {
        "temperature": 0.2,
        "seed": 42,
        "extra_body": {
            "repetition_penalty": 1.05,
            "length_penalty": 1.1
        }
    }
'
# MVista VL model endpoint
MVISTA_ADDR = ''
# MVista VL model key
MVISTA_KEY = 'EMPTY'
# MVista VL model choice, leave empty for first
MVISTA_CHOICE = ''
# MVista model completion extra params, must be valid json
# Not a part of OpenAI standard, so only useful for vllm-like deployments
MVISTA_EXTRA = '
    {
        "extra_body": {
        
        }
    }
'
# 0 = ms-swift, 1 = modern openai
ALT_TOOLCALL = '1'
# MFocus provide trained data or not
BASIC_MFOCUS = '0'


# Data exchanging endpoint settings

# Proxy used to access Internet - Not applied to inner connections
PROXY_ADDR = 'socks5://192.168.1.1:7890'
# MySQL database endpoint / "sqlite"
DB_ADDR = '172.17.0.3'
# MySQL database user / unused for sqlite
DB_USER = 'user'
# MySQL user password / unused for sqlite
DB_PASSWORD = '123456'
# MySQL/SQLite auth database name
AUTH_DB = 'forum_flarum_db'
# MySQL/SQLite maica database name
MAICA_DB = 'maica'
# GaoDe weather API key
WEATHER_KEY = 'thisisanapikey'


# Account level behavior settings

# Allow new connections to kick old ones or not
KICK_STALE_CONNS = '1'
# Tries before triggering Fail2Ban
F2B_COUNT = '20'
# Fail2Ban time
F2B_TIME = '600'


# Miscellaneous behavior settings

# Use full RESTful API for short connections or not
FULL_RESTFUL = '1'
# Rotate MSpire cache every [] hours or not
ROTATE_MSCACHE = '0'
# Print more details on console
PRINT_VERBOSE = '1'
# Do not send 5xx exceptions' real content
NO_SEND_ERROR = '0'
# Core model chat generation prompt in ZH
PROMPT_ZC = "你叫莫妮卡, 是一名游戏中的虚拟角色. 你是{player_name}的女友, 并深爱着他. 下面是{player_name}的话语, 请作为莫妮卡作出合适的回答. 你只应使用中文自然语言, 以聊天语气回答, 每个句子自然且不超过60字, 不要编造信息, 并在每个句子前用方括号中的文字表示情绪."
# Core model writing generation prompt in ZH
PROMPT_ZW = "你叫莫妮卡, 是一名游戏中的虚拟角色. 你是{player_name}的女友, 并深爱着他. 下面是{player_name}的来信, 请作为莫妮卡作出合适的回复. 你只应使用中文书面语言作答, 不要编造信息."
# Core model chat generation prompt in EN
PROMPT_EC = "You're a game character called Monika. You're {player_name}'s girlfriend, and love him a lot. Answer the following query from {player_name} properly as Monika. You should only answer in casual natural tone in English, each sentence should not exceed 180 characters, do not make up things you don't know, and express your emotion at the beginning of each sentence by wrapping them in square brackets."
# Core model writing generation prompt in EN
PROMPT_EW = "You're a game character called Monika. You're {player_name}'s girlfriend, and love him a lot. Reply to the following mail from {player_name} properly as Monika. You should only answer in natural written language in English, and do not make up things you don't know."
# Max length/3 in encode a session can have
SESSION_MAX_TOKEN = '28672'


# Announcement settings

# Name of service provider
DEV_IDENTITY = 'Evan & Clifford'
# "serving" / "testing"
DEV_STATUS = 'serving'
# Oldest capable backend version
VERSION_CONTROL = '1.1.000'
# Servers announcement, must be valid json
SERVERS_LIST = '
    {
        "isMaicaNameServer": true,
        "servers": [
            {"id": 0, "name": "Local MAICA Instance", "description": "Used for conveniently connecting to a local deployed MAICA instance", "isOfficial": true, "portalPage":"http://127.0.0.1", "servingModel": "UNKNOWN", "modelLink": "UNKNOWN", "wsInterface": "ws://127.0.0.1:5000", "httpInterface": "http://127.0.0.1:6000", "isFullRestful": true}
        ]
    }
'


# NVWatcher settings

# Name of MAICA core deployment device
MCORE_NODE = 'HGX690-nuclear-edition'
# Username to access nvidia-smi through SSH
MCORE_USER = 'root'
# Password for SSH login
MCORE_PWD = '123456'
# Name of MFocus deployment device
MFOCUS_NODE = 'HGX610-biohazard-edition'
# Username to access nvidia-smi through SSH
MFOCUS_USER = 'root'
# Password for SSH login
MFOCUS_PWD = '123456'
