Skip to content
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: Client.__init__() got an unexpected keyword argument 'proxies' #730

Open
abrichr opened this issue Dec 12, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@abrichr
Copy link

abrichr commented Dec 12, 2024

Describe the bug
Running the AzureOpenAI/ChromaDB example notebook produces an exception when instantiating the AzureOpenAI client.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://colab.research.google.com/github/vanna-ai/notebooks/blob/main/postgres-openai-azure-chromadb.ipynb
  2. In the third code cell, configure the AzureOpenAI client and MyVanna objects:
class MyVanna(ChromaDB_VectorStore, OpenAI_Chat):
    def __init__(self, config=None):
        ChromaDB_VectorStore.__init__(self, config=config)
        client = AzureOpenAI(
          azure_endpoint="https://<your-azure-endpoint>",
          api_key="<your-api-key>",
          api_version="2024-10-21"
        )
        OpenAI_Chat.__init__(self, client=client, config=config)

vn = MyVanna(config={'model': 'gpt-4o'})
  1. Run all cells
  2. See error

Expected behavior
The client is instantiated successfully and the notebook runs.

Error logs/Screenshots

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
[<ipython-input-12-40a40921fe2f>](https://localhost:8080/#) in <cell line: 11>()
      9         OpenAI_Chat.__init__(self, client=client, config=config) # Make sure to put your AzureOpenAI client here
     10 
---> 11 vn = MyVanna(config={'model': 'gpt-4o'})

4 frames
[/usr/local/lib/python3.10/dist-packages/openai/_base_client.py](https://localhost:8080/#) in __init__(self, **kwargs)
    753         kwargs.setdefault("limits", DEFAULT_CONNECTION_LIMITS)
    754         kwargs.setdefault("follow_redirects", True)
--> 755         super().__init__(**kwargs)
    756 
    757 

TypeError: Client.__init__() got an unexpected keyword argument 'proxies'

Desktop (please complete the following information where):

  • OS: MacOS
  • Version: 14.2.1
  • Python: 3.10.12
  • Vanna: 0.7.5

Additional context
Possibly related:

@abrichr abrichr added the bug Something isn't working label Dec 12, 2024
@abrichr
Copy link
Author

abrichr commented Dec 12, 2024

Fix, from https://community.openai.com/t/error-with-openai-1-56-0-client-init-got-an-unexpected-keyword-argument-proxies/1040332/10:

!pip install openai==1.55.3 httpx==0.27.2 --force-reinstall

Place this after the first cell and restart the runtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant