Sfoglia il codice sorgente

fix: cot agent chinese json bug (#18073)

Co-authored-by: huangzhuo <huangzhuo1@xiaomi.com>
tags/1.3.0
huangzhuo1949 6 mesi fa
parent
commit
5dd9acbe44
Nessun account collegato all'indirizzo email del committer
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1
    1
      api/core/agent/cot_agent_runner.py

+ 1
- 1
api/core/agent/cot_agent_runner.py Vedi File

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

Loading…
Annulla
Salva