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
The connections is not returned to the pool when using a stream
In this case (see "To reproduce"), the error occurs in venv/lib/python3.11/site-packages/httpcore/_async/connection_pool.py in the wait_for_connection() method of the RequestStatus() class
And if after each end of reading the stream you call AsyncStream.response.aclose(), then everything will work correctly
To Reproduce
Initialize an AsyncOpenAI object with a maximum number of connections equal to 2
Send 2 requests (chat.completions) with stream=True and read the entire stream
Confirm this is an issue with the Python library and not an underlying OpenAI API
Describe the bug
The connections is not returned to the pool when using a stream
In this case (see "To reproduce"), the error occurs in venv/lib/python3.11/site-packages/httpcore/_async/connection_pool.py in the wait_for_connection() method of the RequestStatus() class
And if after each end of reading the stream you call AsyncStream.response.aclose(), then everything will work correctly
To Reproduce
Code snippets
OS
macOS, Ubuntu 22.04
Python version
Python v3.11.6
Library version
openai 1.2.0
The text was updated successfully, but these errors were encountered: