Ver código fonte

fix: cot agent chinese json bug (#18073)

Co-authored-by: huangzhuo <huangzhuo1@xiaomi.com>
tags/1.3.0
huangzhuo1949 6 meses atrás
pai
commit
5dd9acbe44
Nenhuma conta vinculada ao e-mail do autor do commit
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1
    1
      api/core/agent/cot_agent_runner.py

+ 1
- 1
api/core/agent/cot_agent_runner.py Ver arquivo

@@ -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:

Carregando…
Cancelar
Salvar