From 42f60625cabd294af1a1efc7f4449c2b8b0e49d0 Mon Sep 17 00:00:00 2001 From: FuQuan233 Date: Tue, 19 May 2026 13:37:01 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8D=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E8=B0=83=E7=94=A8=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91?= =?UTF-8?q?=EF=BC=8C=E7=A1=AE=E4=BF=9D=E6=AF=8F=E4=B8=AA=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E8=B0=83=E7=94=A8=E7=9A=84=E5=9B=9E=E5=A4=8D=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E8=A2=AB=E6=AD=A3=E7=A1=AE=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nonebot_plugin_llmchat/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nonebot_plugin_llmchat/__init__.py b/nonebot_plugin_llmchat/__init__.py index 76365ae..92a3060 100755 --- a/nonebot_plugin_llmchat/__init__.py +++ b/nonebot_plugin_llmchat/__init__.py @@ -475,6 +475,8 @@ async def process_messages(context_id: int, is_group: bool = True): await send_split_messages(handler, message.content) # 处理每个工具调用 + new_messages.append(llm_reply) + for tool_call in message.tool_calls: tool_name = tool_call.function.name tool_args = json.loads(tool_call.function.arguments) @@ -496,8 +498,6 @@ async def process_messages(context_id: int, is_group: bool = True): bot_id=str(event.self_id) ) - new_messages.append(llm_reply) - new_messages.append({ "role": "tool", "tool_call_id": tool_call.id,