-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed as duplicate of#2586
Labels
questionFurther information is requestedFurther information is requested
Description
I noticed that if a tool fails more than the configured max_retries, the run fails (raises an exception).
How can I gracefully allow these failures? Say a tool should fail and the agent needs to find a different approach. The main use case I'm dealing with is tools that make API calls that result in a 400-type error and raise it. I don't want the run to end just because a resource wasn't found. How can I configure this?
My first solution was to just wrap the tool in a try/except clause, and return the error string if an exception gets raised. But that feels like the wrong approach (especially since I'm dynamically generating my tools, and monkeypatching the return types to be Union[str, ...] everywhere would be messy)
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested