Skip to content

Commit 8429877

Browse files
fix: Agent is configured for ReAct inference mode, an error is reported when viewing the agent log (#12920)
Co-authored-by: crazywoola <[email protected]>
1 parent 05a0faf commit 8429877

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/core/agent/cot_agent_runner.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def increase_usage(final_llm_usage_dict: dict[str, Optional[LLMUsage]], usage: L
172172

173173
self.save_agent_thought(
174174
agent_thought=agent_thought,
175-
tool_name=scratchpad.action.action_name if scratchpad.action else "",
175+
tool_name=(scratchpad.action.action_name if scratchpad.action and not scratchpad.is_final() else ""),
176176
tool_input={scratchpad.action.action_name: scratchpad.action.action_input} if scratchpad.action else {},
177177
tool_invoke_meta={},
178178
thought=scratchpad.thought or "",

0 commit comments

Comments
 (0)