@@ -60,23 +60,26 @@ def get_character_data():
6060 logger .warning ("coreApiKey in core_config.json is updated. Overwriting CORE_API_KEY." )
6161 CORE_API_KEY = core_cfg ['coreApiKey' ]
6262 if 'coreApi' in core_cfg and core_cfg ['coreApi' ]:
63+ logger .warning ("coreApi: " + core_cfg ['coreApi' ])
6364 if core_cfg ['coreApi' ] == 'qwen' :
6465 CORE_URL = "wss://dashscope.aliyuncs.com/api-ws/v1/realtime"
6566 CORE_MODEL = "qwen-omni-turbo-realtime-2025-05-08"
67+ elif core_cfg ['coreApi' ] == 'glm' :
68+ CORE_URL = "wss://open.bigmodel.cn/api/paas/v4/realtime"
69+ CORE_MODEL = "glm-realtime-air"
70+ elif core_cfg ['coreApi' ] == 'openai' :
71+ CORE_URL = "wss://api.openai.com/v1/realtime"
72+ CORE_MODEL = "gpt-4o-realtime-preview"
6673 else :
67- logger .warning ("coreApi: " + core_cfg ['coreApi' ])
68- if core_cfg ['coreApi' ] == 'glm' :
69- CORE_URL = "wss://open.bigmodel.cn/api/paas/v4/realtime"
70- CORE_MODEL = "glm-realtime-air"
71- elif core_cfg ['coreApi' ] == 'openai' :
72- CORE_URL = "wss://api.openai.com/v1/realtime"
73- CORE_MODEL = "gpt-4o-realtime-preview"
74- else :
75- logger .error ("💥 Unknown coreApi: " + core_cfg ['coreApi' ])
74+ logger .error ("💥 Unknown coreApi: " + core_cfg ['coreApi' ])
75+ else :
76+ CORE_URL = "wss://dashscope.aliyuncs.com/api-ws/v1/realtime"
77+ CORE_MODEL = "qwen-omni-turbo-realtime-2025-05-08"
7678 ASSIST_API_KEY_QWEN = core_cfg ['assistApiKeyQwen' ] if 'assistApiKeyQwen' in core_cfg and core_cfg ['assistApiKeyQwen' ] != '' else CORE_API_KEY
7779 ASSIST_API_KEY_OPENAI = core_cfg ['assistApiKeyOpenai' ] if 'assistApiKeyOpenai' in core_cfg and core_cfg ['assistApiKeyOpenai' ] != '' else CORE_API_KEY
7880 ASSIST_API_KEY_GLM = core_cfg ['assistApiKeyGlm' ] if 'assistApiKeyGlm' in core_cfg and core_cfg ['assistApiKeyGlm' ] != '' else CORE_API_KEY
7981 if 'assistApi' in core_cfg and core_cfg ['assistApi' ]:
82+ logger .warning ("assistApi: " + core_cfg ['assistApi' ])
8083 if core_cfg ['assistApi' ] == 'qwen' :
8184 logger .warning ("assistApi: " + core_cfg ['assistApi' ])
8285 OPENROUTER_URL = "https://dashscope.aliyuncs.com/compatible-mode/v1"
@@ -90,14 +93,17 @@ def get_character_data():
9093 CORRECTION_MODEL = "o4-mini"
9194 AUDIO_API_KEY = OPENROUTER_API_KEY = ASSIST_API_KEY_OPENAI
9295 elif core_cfg ['assistApi' ] == 'glm' :
93- logger .warning ("assistApi: " + core_cfg ['assistApi' ])
9496 OPENROUTER_URL = "https://open.bigmodel.cn/api/paas/v4"
9597 SUMMARY_MODEL = "glm-4-air-250414"
9698 CORRECTION_MODEL = "glm-z1-air"
9799 AUDIO_API_KEY = OPENROUTER_API_KEY = ASSIST_API_KEY_GLM
98100 else :
99- logger .error ("💥 Unknown assistApi: " + core_cfg ['assistApi' ])
100-
101+ logger .error ("💥 Unknown assistApi: " + core_cfg ['assistApi' ])
102+ else :
103+ OPENROUTER_URL = "https://dashscope.aliyuncs.com/compatible-mode/v1"
104+ SUMMARY_MODEL = "qwen-plus"
105+ CORRECTION_MODEL = "qwen-max"
106+ AUDIO_API_KEY = OPENROUTER_API_KEY = ASSIST_API_KEY_QWEN
101107
102108except FileNotFoundError :
103109 pass
0 commit comments