From 8df614163ad6dd7550cc7486ad6cca790ebb08c7 Mon Sep 17 00:00:00 2001 From: MoeSnowyFox Date: Sun, 17 Nov 2024 02:59:35 +0800 Subject: [PATCH] =?UTF-8?q?:zap:=20=E7=B2=BE=E7=AE=80=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nonebot_plugin_marshoai/azure.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/nonebot_plugin_marshoai/azure.py b/nonebot_plugin_marshoai/azure.py index d9b604d..6f4aef3 100644 --- a/nonebot_plugin_marshoai/azure.py +++ b/nonebot_plugin_marshoai/azure.py @@ -187,11 +187,10 @@ async def marsho(target: MsgTarget, event: Event, text: Optional[UniMsg] = None) channel_id = "group_" + target.id context_msg = list(await load_context_from_json(f"back_up_context_{channel_id}", "contexts/backup")) loaded_target_list.append(target.id) - context_msg = [get_prompt()] + context_msg target_list.append([target.id, target.private]) - if is_reasoning_model: - context_msg = context_msg[1:] - # o1等推理模型不支持系统提示词,故截断 + if not is_reasoning_model: + context_msg = [get_prompt()] + context_msg + # o1等推理模型不支持系统提示词 response = await make_chat( client=client, model_name=model_name,