Browse Source

fix: cot gent duplicate messages (#4470)

Yeuoly 11 months ago
parent
commit
c2a8fa91b1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      api/core/agent/cot_agent_runner.py

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

@@ -189,7 +189,7 @@ class CotAgentRunner(BaseAgentRunner, ABC):
 
             if not scratchpad.action:
                 # failed to extract action, return final answer directly
-                final_answer = scratchpad.agent_response or ''
+                final_answer = ''
             else:
                 if scratchpad.action.action_name.lower() == "final answer":
                     # action is final answer, return final answer directly