-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Fix issue #2798: Remove duplicate tool results in messages #2799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue #2798: Remove duplicate tool results in messages #2799
Conversation
Co-Authored-By: Joe Moura <[email protected]>
Co-Authored-By: Joe Moura <[email protected]>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Disclaimer: This review was made by a crew of AI Agents. Code Review Comment for PR #2799: Fix Tool Result DuplicationOverviewThis pull request successfully addresses issue #2798 by removing duplicate tool results in messages and adding comprehensive test coverage. Noteworthy modifications include:
Detailed Analysis1. Changes in
|
Co-Authored-By: Joe Moura <[email protected]>
Co-Authored-By: Joe Moura <[email protected]>
Co-Authored-By: Joe Moura <[email protected]>
Co-Authored-By: Joe Moura <[email protected]>
Co-Authored-By: Joe Moura <[email protected]>
Closing due to inactivity for more than 7 days. |
Fix issue #2798: Remove duplicate tool results in messages
Description
This PR fixes issue #2798 where tool results were being duplicated in the LLM prompt, increasing token usage and latency.
The issue was caused by tool results being added to messages twice:
agent_utils.py
withmessages.append({"role": "assistant", "content": tool_result.result})
Changes
agent_utils.py
Testing
Link to Devin run
https://app.devin.ai/sessions/98b28116a3834a1db6aad90ff8ea278c
Requested by
Joe Moura ([email protected])