Fix recursion limit error on followup question#301
Merged
charlesLoder merged 1 commit intodeploy/prototypefrom Mar 20, 2025
Merged
Fix recursion limit error on followup question#301charlesLoder merged 1 commit intodeploy/prototypefrom
charlesLoder merged 1 commit intodeploy/prototypefrom
Conversation
40056f6 to
1f277d9
Compare
Author
|
Updated to just upgrade |
kdid
approved these changes
Mar 20, 2025
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.
Description
If a
GraphRecursionErrorwas hit, the next user question would fail. This PR prevents that while also lowering the recursion limitSummary of changes
MAX_RECURSION_LIMITback to8langchain-awsto version0.2.16where a patch fixes the issuerequirements.txtfiles as redeploying the stack was causing some requirements to not be included somehowTest
It's helpful to set
MAX_RECURSION_LIMITto4or6to hit the recursion limit soonerIt's also helpful to recreate the
.venvand reinstall the deps from the newrequirements.txtDeploy the stack.
Send in a question that triggers a lot of tool calls:
{ "ref": "abc123", "stream_response": false, "message": "chat", "forget": true, "auth": "{{FOREVER_SUPERUSER_TOKEN}}", "question": "Tell me how many objects are there about Obama and explain how the items relate to the Berkeley Folk Festival where Phil Ochs and Joan Baez played, and maybe Miles Davis did too? Did Big Mama Thornton play at is as well?" }In the logs, should see the appropriate error:
Send in a new question:
{ "ref": "abc123", "stream_response": false, "message": "chat", "forget": false, "auth": "{{FOREVER_SUPERUSER_TOKEN}}", "question": "What about Miles Davis?" }The previous error of:
will not happen.
If the recursion limit is low, like 4, you may hit another recursion limit error, but that's expected.
Notes
The
requirements.txtfiles were updated the standard way —pip freeze > requirements.txt— including all deps in the project.