I have occasional, but repeating problems with the requests to OpenAI timing out.
Request timed out: HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=600).
I have gone through the forum and have noticed that some users are recommending using request_timeout parameter, to shorten that time, and repeat the request after. However, others are recommending creating own function in Python to do that. Also, the parameter is not mentioned in the OpenAI documentation.
- Does this parameter exist, have someone managed to make it work?
- If not and if I need to do it by myself, I am not really clear the logic behind that. I have implemented the exponential backoff strategy, as suggested by OpenAI - but, if the timeout is 600 seconds, this means that the next retry will come after 10 minutes? Should I somehow cut the request if it takes more than, let’s say 30 seconds?