mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-08 23:58:34 +00:00
Add comment explaining tool result duplication fix
Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
@@ -214,6 +214,9 @@ def handle_agent_action_core(
|
||||
if show_logs:
|
||||
show_logs(formatted_answer)
|
||||
|
||||
# Tool results are already included in the formatted answer with "Observation:" prefix,
|
||||
# so we don't need to append them again to messages to avoid duplication and token bloat.
|
||||
# This fixes issue #2798 where tool results were being duplicated in the LLM prompt.
|
||||
|
||||
return formatted_answer
|
||||
|
||||
|
||||
Reference in New Issue
Block a user