fix: Fixed all 4 bugs from issue #243: initialized tool_calls before#308
Closed
singlaamitesh wants to merge 1 commit into
Closed
fix: Fixed all 4 bugs from issue #243: initialized tool_calls before#308singlaamitesh wants to merge 1 commit into
singlaamitesh wants to merge 1 commit into
Conversation
…d tool_calls before Addresses The-OpenROAD-Project#243.
Collaborator
|
Thanks @singlaamitesh , salvaged in #311 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #243
Summary
Fixed all 4 bugs from issue #243: initialized tool_calls before the if/else and replaced in-place list.remove() with a filter comprehension to avoid UnboundLocalError and skip-while-iterating in retriever_rag.py; reassigned the discarded str.replace() result so tool descriptions are actually cleaned; moved the streaming yield inside the
if msg:guard soNoneis never sent to clients; and bounded the in-memory chat_history dict with an OrderedDict + eviction helper capped by MAX_IN_MEMORY_CONVERSATIONS (default 1000) to prevent unbounded memory growth when USE_DB=false. Reproduced bug 1's crash with a minimal repro before fixing, and added regression tests for all four bugs.Changes
backend/src/agents/retriever_rag.pybackend/src/api/routers/conversations.pybackend/tests/test_retriever_graph_simplified.pybackend/tests/test_api_conversations_streaming.pyHow this was tested
Ran
the affected testslocally.