From d9afca0c25c9e32237bdc846b3d75a26dd6206c5 Mon Sep 17 00:00:00 2001 From: zhangzhanwei Date: Tue, 10 Feb 2026 17:43:39 +0800 Subject: [PATCH] fix: add ensure_ascii=False to json.dumps for tool result to display CJK characters correctly --- apps/application/flow/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/application/flow/tools.py b/apps/application/flow/tools.py index 3f07b281ea1..a5fc1ac6ae5 100644 --- a/apps/application/flow/tools.py +++ b/apps/application/flow/tools.py @@ -404,7 +404,7 @@ async def _yield_mcp_response(chat_model, message_list, mcp_servers, mcp_output_ tool_lib_id = tool_result.pop('tool_id') if 'tool_id' in tool_result else None if tool_lib_id: await save_tool_record(tool_lib_id, tool_info, tool_result, source_id, source_type) - tool_result = json.dumps(tool_result) + tool_result = json.dumps(tool_result, ensure_ascii=False) except Exception as e: tool_result = chunk[0].content content = generate_tool_message_complete(