We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
openai.ChatCompletion.create takes timeout parameter but the call might take significantly longer without timing out.
openai.ChatCompletion.create
timeout
I think it is because of this code:
timeout = kwargs.pop("timeout", None) while True: try: return super().create(*args, **kwargs)
Wouldn't it be more consistent overall if you replace pop with get, like this:
pop
get
timeout = kwargs.get("timeout", None)
run openai.ChatCompletion.create(timeout=1, the rest of parameters...)
expected the call either complete under 1 second or fail.
actual: it can take more than 1 second.
No response
Windows 11
Python 3.9.13
openai 0.27.8
The text was updated successfully, but these errors were encountered:
you can use "request_timeout" #322 (comment)
Sorry, something went wrong.
Yes, please use request_timeout as is mentioned in the README: https://github.com/openai/openai-python#params
request_timeout
No branches or pull requests
Describe the bug
openai.ChatCompletion.create
takestimeout
parameter but the call might take significantly longer without timing out.I think it is because of this code:
Wouldn't it be more consistent overall if you replace
pop
withget
, like this:To Reproduce
run
openai.ChatCompletion.create(timeout=1, the rest of parameters...)
expected the call either complete under 1 second or fail.
actual: it can take more than 1 second.
Code snippets
No response
OS
Windows 11
Python version
Python 3.9.13
Library version
openai 0.27.8
The text was updated successfully, but these errors were encountered: