Revert removal of the last message from memory_messages during planning by Zoe14 · Pull Request #1454 · huggingface/smolagents (original) (raw)
Conversation
Zoe14 commented
•
edited by albertvillanova
Loading
A previous change I did to save token usage is wrong as cyzus pointed out. I reverted the change, and updated the test to reflect the scenario I didn't think of.
The last message in the memory_messages is not necessarily the task.
Maybe we can filter the memory_message if we don't want to send the same task twice or we can change the pre_update_plan prompt to not include the task.
Fix bug introduced in:
Zoe14 changed the title
enhance test for update plan Enhance test for update plan
Zoe14 marked this pull request as ready for review
In this case, let's go for the simple fix you propose and just undo the removal the latest message, no need for other modifications IMO!
I updated the branch. This PR basically just undo the change and improved the unit test. Feel free to close this PR if the fix is included somewhere else.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to run make style to fix code quality issues.
albertvillanova changed the title
Enhance test for update plan Revert removal of the last message from memory_messages during planning
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Just fixed the style and refactored the corresponding test to make it clearer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})