-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: AsyncClient.__init__() got an unexpected keyword argument 'proxies' #1617
Comments
Thanks a lot. But I found that I still cannot run the sample code...If you are similiar to it, could you please tell me how to fix it? Appreciate it!
|
Thank you very much! It works when I change the model! |
|
I update the openai package from 1.52.2 to 1.55.3 and it is working for me |
the solution httpx==0.27.2 works here. |
fixbug: #1617 TypeError: AsyncClient.__init__() got an unexpected keyword argument 'proxies'
Closing this issue as PR #1619 has been merged. |
pip install httpx==0.27.2 works for me. |
pip install httpx==0.27.2 don't work for me, pls help |
It looks like the issue is solved and merged to the main branch. Try upgrading it from github by |
Bug description
There is an issue with the openai-python library related to the httpx library. Specifically, httpx version 0.28.0 has removed the deprecated
proxies
argument, which is still hardcoded in the openai-python library. This results in aTypeError
when initializing the client. This issue likely affects all OpenAI models, including GPT-4o and GPT-4o-mini.Bug solved method
A temporary solution is to pin the httpx version to 0.27.2. By adding
httpx==0.27.2
to the project's dependency file, the issue can be avoided. I have verified this solution locally by executingpip install httpx==0.27.2
.Environment information
LLM type and model name: OpenAI GPT-4o, GPT-4o-mini
System version: Windows 11, Ubuntu 22.04, Docker version of MetaGPT
Python version: Python 3.9
MetaGPT version or branch: latest
packages version: openai-1.55.2, httpx-0.28.0
installation method: pip install
Screenshots or logs
Original issue link: Use of proxies kwarg in httpx==0.28.0 #1902
The text was updated successfully, but these errors were encountered: