Hi there,
I’ve had an issue for some time now. I wanted to find a workaround for the rate limitation of the OpenAI API for the model text-davinci-003. I’ve found a possibly useful solution in their documentation, the so-called Completion with backoff solution.
This is my function, which I’m later using:
@retry(wait=wait_random_exponential(min=1, max=60), stop=stop_after_attempt(6))
def completion_with_backoff(**kwargs):
return openai.Completion.create(**kwargs)
Now the problem is that from time to time there is a certain Timeout error, which stops my apache2 server from working, any request made ,after an incident like this, is not handled by the webserver, and the only solution for now is to restart apache2.
Could you please help me with this? Thanks a lot.