New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include option for automatic retries #44
Comments
I think these connection problems can be fixed with the |
Good suggestion, thanks! Btw |
I am trying to be as close as possible to the original Python package and not introduce new parameters :) But maybe I will change my mind at some point.
No good reason at all. It just seemed a natural candidate, and tbh, I did not even know that httr2 exist. @olivierISCIII Thanks for the suggestion! |
I've very interested in this as well, as we (and everyone else) are seeing the |
@christophscheuch @olyerickson @olivierISCIII Hadley rolled out stable version 1.0.0 of Here is the new argument for
|
As it turns out the OpenAI API frequently returns very unhelpful error messages like this one:
There are also several threads on this issue, for instance in the OpenAI Develper forum.
I think some parameter like
max_retries
could be really useful to handle such transient errors that arise while applying functions likecreate_chat_completion()
.The
httr2
package provides the very usefulreq_retry()
function that allows to define the maximum number of retries, which errors are transient, and how long to wait between retries. Is there any specific reason that you stickedhttr
for theopenai
package?The text was updated successfully, but these errors were encountered: