fix: remove duplicated message about Tool result (#2964)

We are currently inserting tool results into LLM messages twice, which may unnecessarily increase processing costs, especially for longer outputs.
This commit is contained in:
Lucas Gomide
2025-06-05 10:42:10 -03:00
committed by GitHub
parent ba740c6157
commit e03ec4d60f

View File

@@ -215,9 +215,6 @@ def handle_agent_action_core(
if show_logs:
show_logs(formatted_answer)
if messages is not None:
messages.append({"role": "assistant", "content": tool_result.result})
return formatted_answer