From 5dd9acbe44e65a8149acc510a7262497eb7733b4 Mon Sep 17 00:00:00 2001 From: huangzhuo1949 <167434202+huangzhuo1949@users.noreply.github.com> Date: Tue, 15 Apr 2025 15:36:44 +0800 Subject: [PATCH] fix: cot agent chinese json bug (#18073) Co-authored-by: huangzhuo --- api/core/agent/cot_agent_runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/core/agent/cot_agent_runner.py b/api/core/agent/cot_agent_runner.py index ae70ff2bf1..feb8abf6ef 100644 --- a/api/core/agent/cot_agent_runner.py +++ b/api/core/agent/cot_agent_runner.py @@ -191,7 +191,7 @@ class CotAgentRunner(BaseAgentRunner, ABC): # action is final answer, return final answer directly try: if isinstance(scratchpad.action.action_input, dict): - final_answer = json.dumps(scratchpad.action.action_input) + final_answer = json.dumps(scratchpad.action.action_input, ensure_ascii=False) elif isinstance(scratchpad.action.action_input, str): final_answer = scratchpad.action.action_input else: