Error with OpenAI 1.56.0 - Client.__init__() got an unexpected keyword argument 'proxies'

I changed my open ai version from openai = “1.42.0” to openai = “1.56.1” and that worked for me

thanks
those versions worked for me
openai==1.55.3
httpx==0.27.2
typing-extensions>=4.11.0,<5.0.0

Thank you so much! It finally worked perfectly for me in the Colab environment. Thank you!!!

1 Like

It worked, for especially google colab please restart your runtime and install these packages. Thanks

Thank you Joe It worked for me!!

This is the one that fixed it for me. Sp thank you very much. Unfortunate that OpenAI hasn’t fixed this yet. 12K views on this post - showcasing 12,000+ people using the API are having this exact issue. Its been two weeks. I have to change all of collab files.

1 Like

Even it works for langchain openAI imports

Thanks a lot, I was trying to build a Docker, and adding httpx==0.27.2 to my requirement file solved the issue.

Thanks!! You saved me a lot of time!!

This issue seems to have already been resolved in the OpenAI Python module version 1.56.1 and later (currently 1.58.1).

1 Like

poetry add httpx="0.27.2" worked for me, thank you!

1 Like

This did the job for me.
openai==1.59.6
httpx==0.27.2