Skip to content

Add exponential retry logic for gemini models #764

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

Merged
merged 4 commits into from
Nov 17, 2024

Conversation

gabrielibagon
Copy link
Contributor

This is to avoid the following error with long context on Gemini models due to insufficient quota:

Error: 429 Resource exhausted. Please try again later. Please refer to https://cloud.google.com/vertex-ai/generative-ai/docs/quotas#error-code-429 for more details.

This approach uses exponential backoff retries when encountering a ResourceExhausted error.

@HuanzhiMao HuanzhiMao added the BFCL-General General BFCL Issue label Nov 17, 2024
Copy link
Collaborator

@HuanzhiMao HuanzhiMao left a comment

Choose a reason for hiding this comment

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

Thank you very much for the PR @gabrielibagon! It is very helpful.

@HuanzhiMao HuanzhiMao merged commit 291904c into ShishirPatil:main Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BFCL-General General BFCL Issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants