openai / openai-python

The official Python library for the OpenAI API
https://pypi.org/project/openai/
Apache License 2.0
23.08k stars 3.25k forks source link

timeout not being respected by client.beta.threads.runs.create_and_poll (or .OpenAI) #1855

Open Dev63 opened 2 weeks ago

Dev63 commented 2 weeks ago

Confirm this is an issue with the Python library and not an underlying OpenAI API

Describe the bug

Calling client.beta.threads.runs.create_and_poll(..., timeout=2.0) will wait as long as it takes before returning (6s, 5 minutes).

To Reproduce

Call client.beta.threads.runs.create_and_poll(..., timeout=2.0) and observe that it does not timeout.

Code snippets

No response

OS

Windows

Python version

Python 3.9

Library version

openai 1.51.2