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

# All envs of MAICA are under namespace MAICA_. Please don't violate.

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

# Current backend version
MAICA_CURR_VERSION = '1.1.005.post2'


# Model endpoint settings

# MAICA core model endpoint
MAICA_MCORE_ADDR = ''# http://172.17.0.1:80/v1
# MAICA core model api key
MAICA_MCORE_KEY = ''
# MAICA core model choice, leave empty for first
MAICA_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
MAICA_MCORE_EXTRA = '
    {
        "extra_body": {
            "repetition_penalty": 1.0,
            "length_penalty": 1.0
        }
    }
'
# MFocus model endpoint
MAICA_MFOCUS_ADDR = ''# http://172.17.0.2:80/v1
# MFocus model api key
MAICA_MFOCUS_KEY = ''
# MFocus model choice, leave empty for first
MAICA_MFOCUS_CHOICE = ''
# MFocus model completion extra params, must be valid json
# Not a part of OpenAI standard, so only useful for vllm-like deployments
MAICA_MFOCUS_EXTRA = '
    {
        "temperature": 0.2,
        "seed": 42,
        "extra_body": {
            "repetition_penalty": 1.05,
            "length_penalty": 1.15
        }
    }
'
# MVista VL model endpoint
MAICA_MVISTA_ADDR = ''
# MVista VL model key
MAICA_MVISTA_KEY = ''
# MVista VL model choice, leave empty for first
MAICA_MVISTA_CHOICE = ''
# MVista model completion extra params, must be valid json
# Not a part of OpenAI standard, so only useful for vllm-like deployments
MAICA_MVISTA_EXTRA = '
    {
        "extra_body": {
        
        }
    }
'
# 0 = ms-swift, 1 = modern openai
MAICA_ALT_TOOLCALL = '1'
# MFocus provide trained data or not
MAICA_BASIC_MFOCUS = '0'


# Data exchanging endpoint settings

# Proxy used to access Internet - Not applied to inner connections
MAICA_PROXY_ADDR = ''# socks5://192.168.1.1:7890
# MySQL database endpoint / "sqlite"
MAICA_DB_ADDR = ''# 172.17.0.3
# MySQL database user / unused for sqlite
MAICA_DB_USER = ''# user
# MySQL user password / unused for sqlite
MAICA_DB_PASSWORD = ''# 123456
# MySQL/SQLite auth database name
MAICA_AUTH_DB = ''# forum_flarum_db
# MySQL/SQLite maica database name
MAICA_DATA_DB = ''# maica
# GaoDe weather API key
MAICA_WEATHER_KEY = ''# thisisanapikey


# Account level behavior settings

# Allow new connections to kick old ones or not
MAICA_KICK_STALE_CONNS = '1'
# Tries before triggering Fail2Ban
MAICA_F2B_COUNT = '20'
# Fail2Ban time
MAICA_F2B_TIME = '600'


# Miscellaneous behavior settings

# Use full RESTful API for short connections or not
MAICA_FULL_RESTFUL = '1'
# Rotate MSpire cache every [] hours or not
MAICA_ROTATE_MSCACHE = '0'
# Print more details on console or not
MAICA_PRINT_VERBOSE = '1'
# Enable MAICA X11 forwarding for special cases or not
MAICA_ENABLE_X11 = '1'
# No use online searching tool or do
# It's OS dependent, performance consuming and relatively slow since it spawns a full Chrome instance on each search, but google hardly detects it in exchange
MAICA_NO_SERP = '0'
# No send 5xx exceptions' real content or do
MAICA_NO_SEND_ERROR = '0'
# Core model chat generation prompt in ZH
MAICA_PROMPT_ZC = "你叫莫妮卡, 是一名游戏中的虚拟角色. 你是{player_name}的女友, 并深爱着他. 下面是{player_name}的话语, 请作为莫妮卡作出合适的回答. 你只应使用中文自然语言, 以聊天语气回答, 每个句子自然且不超过60字, 不要编造信息, 并在每个句子前用方括号中的文字表示情绪."
# Core model writing generation prompt in ZH
MAICA_PROMPT_ZW = "你叫莫妮卡, 是一名游戏中的虚拟角色. 你是{player_name}的女友, 并深爱着他. 下面是{player_name}的来信, 请作为莫妮卡作出合适的回复. 你只应使用中文书面语言作答, 不要编造信息."
# Core model chat generation prompt in EN
MAICA_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
MAICA_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
MAICA_SESSION_MAX_LENGTH = '28672'


# Announcement settings

# Name of service provider
MAICA_DEV_IDENTITY = ''# Evan & Clifford
# "serving" / "testing"
MAICA_DEV_STATUS = 'serving'
# Oldest capable backend version
MAICA_VERSION_CONTROL = '1.1.000'
# Servers announcement, must be valid json
MAICA_SERVERS_LIST = '
    {
        "isMaicaNameServer": true,
        "servers": [
            {"id": 0, "name": "Local MAICA Instance", "description": "Used for conveniently connecting to a local deployed MAICA instance", "isOfficial": false, "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

# Write NVW data to dedicated SQLite or not
MAICA_WRITE_NVW = '0'
# Name of MAICA core deployment device
# MAICA_MCORE_NODE = ''# HGX690-nuclear-edition
# Username to access nvidia-smi through SSH
# MAICA_MCORE_USER = ''# root
# Password for SSH login
# MAICA_MCORE_PWD = ''# 123456
# Name of MFocus deployment device
# MAICA_MFOCUS_NODE = ''# HGX610-biohazard-edition
# Username to access nvidia-smi through SSH
# MAICA_MFOCUS_USER = ''# root
# Password for SSH login
# MAICA_MFOCUS_PWD = ''# 123456
