Skip to content
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

Harrison/improved retry tool #4842

Merged
merged 6 commits into from
May 18, 2023
Merged

Harrison/improved retry tool #4842

merged 6 commits into from
May 18, 2023

Conversation

hwchase17
Copy link
Contributor

No description provided.

Copy link

@jiaqimeng jiaqimeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love the notebook example!

@@ -625,7 +625,7 @@ class AgentExecutor(Chain):
max_iterations: Optional[int] = 15
max_execution_time: Optional[float] = None
early_stopping_method: str = "force"
handle_parsing_errors: bool = False
handle_parsing_errors: Union[bool, str, Callable] = False

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we enforce the callable must return a string?

elif isinstance(self.handle_parsing_errors, str):
observation = self.handle_parsing_errors
elif callable(self.handle_parsing_errors):
observation = self.handle_parsing_errors(text)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it's more flexible to pass in the original exception, or just the string form of it?

@hwchase17 hwchase17 merged commit 9165267 into master May 18, 2023
@hwchase17 hwchase17 deleted the harrison/retry-tool branch May 18, 2023 04:41
@danielchalef danielchalef mentioned this pull request Jun 5, 2023
This was referenced Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants