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

Unified create_retrying for all solvers #1501

Merged
merged 3 commits into from
Mar 26, 2024

Conversation

ojaffe
Copy link
Contributor

@ojaffe ojaffe commented Mar 21, 2024

We're now implementing solvers for new APIs we're calling (Anthropic, Gemini, ...). Each solver was implementing the same logic for backing off and retrying when the API query limit was hit. This PR created a generic create_retrying function, which retries when specific exceptions are raised. These exceptions are passed as arguments.

This uses the changes from #1482

@ojaffe ojaffe mentioned this pull request Mar 21, 2024
@ojaffe ojaffe changed the base branch from main to test-build March 26, 2024 11:29
@ojaffe ojaffe changed the base branch from test-build to main March 26, 2024 11:29
@JunShern JunShern self-requested a review March 26, 2024 15:23
Copy link
Collaborator

@JunShern JunShern left a comment

Choose a reason for hiding this comment

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

Looks great, thanks for the neat refactor!

@JunShern JunShern merged commit 150dcb9 into openai:main Mar 26, 2024
1 check passed
JunShern added a commit that referenced this pull request Mar 26, 2024
Adds a solver for Gemini 1.5 Pro. Stacked on #1501 and #1482. Using the
solver requires the `GEMINI_API_KEY` environment variable

Test with:
```
oaieval generation/direct/gemini-pro bugged_tools
```

---------

Co-authored-by: Chan Jun Shern <JunShern@users.noreply.github.com>
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