fix: remove duplicated message about Tool result

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:26:03 -03:00
parent ba740c6157
commit d84bca2209

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