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
Is your feature request related to a problem? Please describe.
When using OpenAI's API you need to be able to check your rate limit. The only way to do this is by going through the headers. In recent versions of this gem, only the body of the response is returned, and so the rate limit cannot be checked.
Describe the solution you'd like
I don't have a particular method, but there should certainly be an option to see the headers in the response if required.
Describe alternatives you've considered
The alternative to this method is to keep track of exactly how many tokens have been used per minute, which seems like overkill.
Additional context
If there are other solutions, I would love to hear them, but I think this is a good reason to address this issue again aside from being able to see Faraday Errors.
The text was updated successfully, but these errors were encountered:
Besides OpenAI not always sending the headers in question (in my case no such headers for 4o-mini), you can rather easily access the headers using a faraday-middleware. Like this:
Is your feature request related to a problem? Please describe.
When using OpenAI's API you need to be able to check your rate limit. The only way to do this is by going through the headers. In recent versions of this gem, only the body of the response is returned, and so the rate limit cannot be checked.
Describe the solution you'd like
I don't have a particular method, but there should certainly be an option to see the headers in the response if required.
Describe alternatives you've considered
The alternative to this method is to keep track of exactly how many tokens have been used per minute, which seems like overkill.
Additional context
If there are other solutions, I would love to hear them, but I think this is a good reason to address this issue again aside from being able to see Faraday Errors.
The text was updated successfully, but these errors were encountered: