From fb72b601aaaf2847d01d4abc6baf45cbd81b2c84 Mon Sep 17 00:00:00 2001 From: zhayujie Date: Fri, 3 May 2024 19:41:12 +0800 Subject: [PATCH] fix: model config --- bridge/bridge.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/bridge/bridge.py b/bridge/bridge.py index 52a0df2..6733701 100644 --- a/bridge/bridge.py +++ b/bridge/bridge.py @@ -39,20 +39,22 @@ class Bridge(object): if model_type and model_type.startswith("claude-3"): self.btype["chat"] = const.CLAUDEAPI + if model_type in ["claude"]: + self.btype["chat"] = const.CLAUDEAI + + if model_type in ["moonshot-v1-8k", "moonshot-v1-32k", "moonshot-v1-128k"]: + self.btype["chat"] = const.MOONSHOT + if conf().get("use_linkai") and conf().get("linkai_api_key"): self.btype["chat"] = const.LINKAI if not conf().get("voice_to_text") or conf().get("voice_to_text") in ["openai"]: self.btype["voice_to_text"] = const.LINKAI if not conf().get("text_to_voice") or conf().get("text_to_voice") in ["openai", const.TTS_1, const.TTS_1_HD]: self.btype["text_to_voice"] = const.LINKAI - if model_type in ["claude"]: - self.btype["chat"] = const.CLAUDEAI - - if model_type in ["moonshot-v1-8k", "moonshot-v1-32k", "moonshot-v1-128k"]: - self.btype["chat"] = const.MOONSHOT self.bots = {} self.chat_bots = {} + # 模型对应的接口 def get_bot(self, typename): if self.bots.get(typename) is None: