Skip to content

Conversation

ShishirPatil
Copy link
Owner

@ShishirPatil ShishirPatil commented Jul 28, 2024

For BFCL generations of hosted models, this will check for rate limit errors and retry thrice. We can choose to include an exponential back-off as is usually recommended, but I think in the interest of keeping it simple this should perhaps be sufficient?

This does NOT affect the leaderboard values.

@ShishirPatil ShishirPatil changed the title Handling rate limits [BFCL] Handling rate limits Jul 28, 2024
@ShishirPatil ShishirPatil added enhancement New feature or request BFCL-General General BFCL Issue labels Jul 28, 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.

  1. retry_count < retry_limit - 1 should be removed, otherwise it would only retry two times (when retry_count is 0 and 1).
  2. You can also check the status code for indication of rate limit reached. Such as 429 Too Many Requests, 403 Forbidden or 503 Service Unavailable. Purely relying on the text "rate limit reached" might be inaccurate. For example, the below error message from Anthropic API would not be caught:

Number of requests has exceeded your rate limit. Please try again later or contact sales to discuss your options for a rate limit increase.

@ShishirPatil ShishirPatil merged commit ee5b3f0 into main Aug 4, 2024
@ShishirPatil ShishirPatil deleted the dev/shishirpatil branch August 4, 2024 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BFCL-General General BFCL Issue enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants