精简代码

This commit is contained in:
MoeSnowyFox 2024-11-17 02:59:35 +08:00
parent 16f3852cc6
commit 8df614163a

View File

@ -187,11 +187,10 @@ async def marsho(target: MsgTarget, event: Event, text: Optional[UniMsg] = None)
channel_id = "group_" + target.id channel_id = "group_" + target.id
context_msg = list(await load_context_from_json(f"back_up_context_{channel_id}", "contexts/backup")) context_msg = list(await load_context_from_json(f"back_up_context_{channel_id}", "contexts/backup"))
loaded_target_list.append(target.id) loaded_target_list.append(target.id)
context_msg = [get_prompt()] + context_msg
target_list.append([target.id, target.private]) target_list.append([target.id, target.private])
if is_reasoning_model: if not is_reasoning_model:
context_msg = context_msg[1:] context_msg = [get_prompt()] + context_msg
# o1等推理模型不支持系统提示词,故截断 # o1等推理模型不支持系统提示词
response = await make_chat( response = await make_chat(
client=client, client=client,
model_name=model_name, model_name=model_name,