-
Notifications
You must be signed in to change notification settings - Fork 44.5k
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: json decoder issue(s) #4104
Fix: json decoder issue(s) #4104
Conversation
- For loop now uses enumerate to identify event by index (cleaner) - Each event was not being manipulated at the list level, adjusted logic to modify each event within new_events - Added try/except logic to handle json load errors and log said errors appropriately - Implemented .pop() in lieu of .remove(), index-based removal ensures consistent deletion of each target event NOTE: Need a double check to confirm '"thoughts":' is the correct identifier when scanning event["content"]
Index slicing seems more appropriate here rather than list comprehension. Also len(full_message_history) is O(1)
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
NOTE: Maybe worth moving the for-loop to a new function? This will make unit testing much easier in the long-run.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems to have fixed the jsondecoder error i was receiving.
would on average fail within 20 steps before, have done y -100 now without error.
Duplicate efforts: #3996, #3923 You can find more on https://github.com/anonhostpi/AUTOGPT.TRACKERS/blob/main/TOPICS/0017.BUGS/JSON.md |
Definitely needs to be fixed. Just referencing other similar PRs |
Thanks @anonhostpi for linking the related/relevant PRs; Note: Local testing suggests Though I do like the use of |
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request. |
Logic moved to separate function (for building tests). Logic also updated to match approved PR while fixing remaining issues.
…roduce expected result
Thanks for this, we definitely had some issues with this component in the beginning. The "summary memory" was re-implemented by #4208, and as far as I can see that also addresses the issues fixed by your PR. |
Background
This PR helps address multiple issues regarding json decode issues (e.g. #1407 , #4091, #4052, etc)
Changes
Documentation
Added in-code comments and left existing in-code unchanged
Test Plan
Tested locally by isolating the affected portion of code (used existing test scripts to help generate sample data and verify logic)
PR Quality Checklist