Replies: 2 comments 2 replies
-
Thanks for raising the issue. I converted this to a discussion so we can talk about it. Let me explain this with an example: But I think there is a thing that we can support. We can recognize the error and throw RateLimitException. That would be helpful to handle such a scenario. I need a sample error for that. If you can find a sample response that would be very helpful. |
Beta Was this translation helpful? Give feedback.
-
The exponential backoff algorithm can be applied if and only if the API returns a 429 status code. The library would not need to change with API changes since that will always be true: "When you call the OpenAI API repeatedly, you may encounter error messages that say 429: 'Too Many Requests' or RateLimitError. These error messages come from exceeding the API's rate limits." That link includes example rate limit responses. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
All Open AI APIs potentially impose rate limiting. Ideally, any library designed to abstract the APIs should support exponential backoff.
https://beta.openai.com/docs/guides/production-best-practices/managing-rate-limits-and-latency
Beta Was this translation helpful? Give feedback.
All reactions