-
Notifications
You must be signed in to change notification settings - Fork 3.2k
feat(prebuilt): structured output error handling with configurable retry policy #6002
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
feat(prebuilt): structured output error handling with configurable retry policy #6002
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
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.
By default, we want to retry when a model calls multiple structured output tools right?
One other thing I want to think about (can be in my PR), we might want to support this in ToolNode
as well, so like AgentRetryPolicy
might be a better name...
Ah one other follow up - why introduce the cognitive overhead of a retry dataclass right now? should we just do a callable? that offers the same impact and is less complex |
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.
Nice work on testing.
Please update description of PR + docstrings as well!
…ut_error & update return type to tuple, edit docstrings
c474cda
to
d48d02f
Compare
cf615a4
into
eugene/update_agent_implementation
This PR adds error handling and retry mechanisms for create_agent structured output via a
handle_errors
parameter inToolOutput
.Changes:
MultipleStructuredOutputsError
exception for when models incorrectly call multiple structured output tools simultaneouslyStructuredOutputParsingError
exception for when tool arguments fail to parse according to the schemahandle_errors
policy inToolOutput
:Examples: