You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 [email protected] 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?
The text was updated successfully, but these errors were encountered:
There is not a way to retrieve the body of the failed response with the way the library currently operates. I have filed your request to add support for it as sc-192056.
I will check with the team today about whether or not this is something we can support and when we might have a timeline for completion. I will keep you updated as I know more.
I'm in the same boat, and having access to the error response would be very helpful.
I very much appreciate the work you have put into this already. The library has been working great for me this far!
And to be clear: The error response would only need to be available in the onError callback. At least in my scenario, I do not need need the error to be streamed to the onMessage method.
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 aresponseStatus
field, but OpenAI responded with a JSON error message like the following: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?
The text was updated successfully, but these errors were encountered: