From f6e680545353bc50d42910cf081245851e073ef7 Mon Sep 17 00:00:00 2001 From: 6vision Date: Sat, 31 Aug 2024 16:09:10 +0800 Subject: [PATCH] fix: "model":"mooshoot", which defaults to "moonshot-v1-32k". --- bot/moonshot/moonshot_bot.py | 5 ++++- bridge/bridge.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/bot/moonshot/moonshot_bot.py b/bot/moonshot/moonshot_bot.py index 7d2589c..61eb26d 100644 --- a/bot/moonshot/moonshot_bot.py +++ b/bot/moonshot/moonshot_bot.py @@ -19,8 +19,11 @@ class MoonshotBot(Bot): def __init__(self): super().__init__() self.sessions = SessionManager(MoonshotSession, model=conf().get("model") or "moonshot-v1-128k") + model = conf().get("model") or "moonshot-v1-128k" + if model == "moonshot": + model = "moonshot-v1-32k" self.args = { - "model": conf().get("model") or "moonshot-v1-128k", # 对话模型的名称 + "model": model, # 对话模型的名称 "temperature": conf().get("temperature", 0.3), # 如果设置,值域须为 [0, 1] 我们推荐 0.3,以达到较合适的效果。 "top_p": conf().get("top_p", 1.0), # 使用默认值 } diff --git a/bridge/bridge.py b/bridge/bridge.py index b7b3ebf..40f0432 100644 --- a/bridge/bridge.py +++ b/bridge/bridge.py @@ -46,7 +46,7 @@ class Bridge(object): if model_type in ["claude"]: self.btype["chat"] = const.CLAUDEAI - if model_type in ["moonshot-v1-8k", "moonshot-v1-32k", "moonshot-v1-128k"]: + if model_type in [const.MOONSHOT, "moonshot-v1-8k", "moonshot-v1-32k", "moonshot-v1-128k"]: self.btype["chat"] = const.MOONSHOT if model_type in ["abab6.5-chat"]: