alexrudall/ruby-openai

Version 3.7.0 Rate limit response

alkesh26 opened this issue · 1 comments

I am using 3.7.0 version of ruby-openai.
In case of any error when executing client.chat(...) the response body is as below:

{
    "error": {
        "message": "You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: https://platform.openai.com/docs/guides/error-codes/api-errors.",
        "type": "insufficient_quota",
        "param": null,
        "code": "insufficient_quota"
    }
}

The error code: insufficient_quota refers to the low balance or credit in the account.
What is the error code when we hit the Rate limit?