-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed as not planned
Description
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 parent of AsyncOpenAI
which is AsyncAPIClient
Accepts a parameter called proxies
. However, there is no way to pass proxies
when constructing AsyncOpenAI
. This makes it tough to use the library correctly.
Clarification
It's not ideal to pass an HTTP client at all. AsyncAPIClient
constructs a special client called AsyncHttpxClientWrapper
with certain defaults; therefore it's hard to make a correct client and pass it as http_client
To Reproduce
1- Try to pass proxies
param to AsyncOpenAI
2- It will fail as it does not accept proxies
as a parameter
Code snippets
AsyncClient(proxies="")
# Traceback (most recent call last):
# File "<stdin>", line 1, in <module>
# TypeError: AsyncOpenAI.__init__() got an unexpected keyword argument 'proxies'
OS
Linux
Python version
Pytho v3.12.3
Library version
1.35.10
Metadata
Metadata
Assignees
Labels
No labels