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
Issue with run polling(sleep) #1398
Comments
Hey just curiosity, do you have a alternative to avoid asyncio.sleep? |
There are likely a few alternatives available, but they would involve significant changes to the implementation, such as utilizing However, I'm not sure if this was intentional or just an oversight in the implementation. |
Thanks for reporting – I confirm the problem and hope we'll have a fix out soon. |
This will be fixed in the next release: #1414 |
Confirm this is an issue with the Python library and not an underlying OpenAI API
Describe the bug
Hi OpenAI team,
I'm reaching out to report a possible issue or improvement regarding the polling mechanism in asynchronous functions.
Problem Description
The current implementation of the poll method uses the time.sleep() function, which is blocking and halts the execution of other asynchronous tasks during polling. This behavior affects concurrency, preventing other coroutines from running efficiently.
To Reproduce
Code snippets
OS
macos
Python version
Python v3.11.4
Library version
openai v1.26.0
The text was updated successfully, but these errors were encountered: