-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
I used this package to access the OpenAI API. However, when the response has a status code outside of the range 200-300, an error occurs. The UnsuccessfulResponseError
object only includes a responseStatus
field, but OpenAI responded with a JSON error message like the following:
{
"error": {
"param": null,
"message": "Rate limit reached for default-gpt-3.5-turbo in organization org-xxx on requests per minute. Limit: 20 / min. Current: 30 / min. Contact support@openai.com if you continue to have issues. Please add a payment method to your account to increase your rate limit. Visit https:\/\/platform.openai.com\/account\/billing to add a payment method.",
"code": null,
"type": "requests"
}
}
I would like to retrieve the message from this error response, but I couldn't find a way to do it. Is it possible to do so with the current version? If not, could you please add this functionality in a future release?
DerJacques
Metadata
Metadata
Assignees
Labels
No labels