-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Closed as not planned
Closed as not planned
Copy link
Labels
bugSomething isn't workingSomething isn't working
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
SyncHttpxClientWrapper
has hard coded proxies but it no longer exists in httpx 0.28
To Reproduce
pip install openai
- the bug appears when calling
openai.OpenAI(**client_params, **sync_specific)
Code snippets
Traceback (most recent call last):
File "/Users/greg/Documents/Work/browser-use/browser-use/examples/try.py", line 45, in <module>
llm = get_llm(args.provider)
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/greg/Documents/Work/browser-use/browser-use/examples/try.py", line 28, in get_llm
return ChatOpenAI(model='gpt-4o', temperature=0.0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/greg/Documents/Work/browser-use/browser-use/.venv/lib/python3.11/site-packages/langchain_core/load/serializable.py", line 125, in __init__
super().__init__(*args, **kwargs)
File "/Users/greg/Documents/Work/browser-use/browser-use/.venv/lib/python3.11/site-packages/pydantic/main.py", line 214, in __init__
validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/greg/Documents/Work/browser-use/browser-use/.venv/lib/python3.11/site-packages/langchain_openai/chat_models/base.py", line 551, in validate_environment
self.root_client = openai.OpenAI(**client_params, **sync_specific) # type: ignore[arg-type]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/greg/Documents/Work/browser-use/browser-use/.venv/lib/python3.11/site-packages/openai/_client.py", line 123, in __init__
super().__init__(
File "/Users/greg/Documents/Work/browser-use/browser-use/.venv/lib/python3.11/site-packages/openai/_base_client.py", line 857, in __init__
self._client = http_client or SyncHttpxClientWrapper(
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/greg/Documents/Work/browser-use/browser-use/.venv/lib/python3.11/site-packages/openai/_base_client.py", line 755, in __init__
super().__init__(**kwargs)
TypeError: Client.__init__() got an unexpected keyword argument 'proxies'
OS
macOS
Python version
Python v3.11.4
Library version
openai 1.55.2
thavelick, derluke, busbaby, GriesserP, matyas-jirat and 3 more
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working