fix: "model":"mooshoot", which defaults to "moonshot-v1-32k".

This commit is contained in:
6vision
2024-08-31 16:09:10 +08:00
parent 469524e8ae
commit f6e6805453
2 changed files with 5 additions and 2 deletions

View File

@@ -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), # 使用默认值
}

View File

@@ -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"]: