You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Confirm this is an issue with the Python library and not an underlying OpenAI API
This is an issue with the Python library
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.
There are likely a few alternatives available, but they would involve significant changes to the implementation, such as utilizing call_later or queues. If the current implementation already includes a sleep function and there's no specific reason to use a blocking sleep here, it should be simple to switch to a non-blocking sleep.
However, I'm not sure if this was intentional or just an oversight in the implementation.
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: