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

Retry when we get a generic LLM API error. #973

Merged
merged 3 commits into from
May 29, 2024
Merged

Conversation

gperetin
Copy link
Contributor

Ask the user to retry when we get {LLM Provider}.APIerror exception.

@gperetin gperetin requested a review from senko May 28, 2024 15:49
@senko
Copy link
Contributor

senko commented May 28, 2024

Reworked the PR so we alway auto-retry up to max retries (3). If that fails, we ask the user if they want to retry again, in which case we again retry up to 3 times, then ask again, etc. If the user declines, we raise APIError which stops Pythagora:

Screenshot from 2024-05-28 20-02-27

(between each of the "do you want to retry" there's 3 retries underneath)

@gperetin
Copy link
Contributor Author

LGTM, can't merge as it still has me as an author, 🚢

@senko
Copy link
Contributor

senko commented May 28, 2024

@LeonOstrez since Goran and me collaborated on this, it falls to you as an independent party to review :)

@senko senko force-pushed the retry-generic-llm-error branch from 5f62fd3 to 80e5e32 Compare May 29, 2024 07:57
@senko senko merged commit d5f53ca into main May 29, 2024
6 checks passed
@senko senko deleted the retry-generic-llm-error branch May 29, 2024 08:05
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