From 0ef3a60a4c80cda825ef39f847323e4dbb694c25 Mon Sep 17 00:00:00 2001 From: Sakura-RanChen <1908198662@qq.com> Date: Thu, 19 Mar 2026 11:57:40 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=BC=A9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/xiaozhi-server/core/connection.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main/xiaozhi-server/core/connection.py b/main/xiaozhi-server/core/connection.py index 7a43da1d..113c1abd 100644 --- a/main/xiaozhi-server/core/connection.py +++ b/main/xiaozhi-server/core/connection.py @@ -1083,7 +1083,8 @@ class ConnectionHandler: # 构建工具调用的显示文本,格式如: get_weather({"location": "北京"}) tool_input = json.loads(tool_call_data.get("arguments") or "{}") - tool_text = json.dumps([ + tool_text = json.dumps( + [ { "type": "tool", "text": f"{tool_call_data['name']}({json.dumps(tool_input, ensure_ascii=False)})",