Is your feature request related to a problem? Please describe.
Bulk requests to OpenAI become difficult because of errors thrown by OpenAI due to rate limits. Errors that do not directly reflect a user's rate limit are also sometimes thrown.
If a script loops over a large amount of data and makes one request per data point, the script can crash and existing responses will be lost (costing time and money).
The two errors that I have regularly encountered are openai.error.RateLimitError and openai.error.APIConnectionError.
Describe the solution you'd like.
Automatic retries in response to openai errors. Client code should not worry at all about retry logic (timing, error handling, etc.).
Describe an alternate solution.
Cache existing responses, so that subsequent requests pick up where the script crashed.
Is your feature request related to a problem? Please describe.
Bulk requests to OpenAI become difficult because of errors thrown by OpenAI due to rate limits. Errors that do not directly reflect a user's rate limit are also sometimes thrown.
If a script loops over a large amount of data and makes one request per data point, the script can crash and existing responses will be lost (costing time and money).
The two errors that I have regularly encountered are
openai.error.RateLimitError
andopenai.error.APIConnectionError
.Describe the solution you'd like.
Automatic retries in response to openai errors. Client code should not worry at all about retry logic (timing, error handling, etc.).
Describe an alternate solution.
Cache existing responses, so that subsequent requests pick up where the script crashed.
Anything else? (Additional Context)
No response