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' #300

Closed
byt3bl33d3r opened this issue Mar 11, 2025 · 1 comment

Comments

@byt3bl33d3r
Copy link

byt3bl33d3r commented Mar 11, 2025

Heyo,

Getting the following traceback on Python 3.12.8 when using neo4j_graphrag.llm.AnthropicLLM. This seems like some sort of dependency issue with the anthropic library thats pinned to this package

Traceback (most recent call last):
  File "/workspaces/KG_tests/hello.py", line 60, in <module>
    asyncio.run(main())
  File "/usr/local/lib/python3.12/asyncio/runners.py", line 194, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 686, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/workspaces/KG_tests/hello.py", line 22, in main
    t2c_llm = AnthropicLLM(
              ^^^^^^^^^^^^^
  File "/workspaces/KG_tests/.venv/lib/python3.12/site-packages/neo4j_graphrag/llm/anthropic_llm.py", line 77, in __init__
    self.client = anthropic.Anthropic(**kwargs)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspaces/KG_tests/.venv/lib/python3.12/site-packages/anthropic/_client.py", line 122, in __init__
    super().__init__(
  File "/workspaces/KG_tests/.venv/lib/python3.12/site-packages/anthropic/_base_client.py", line 856, in __init__
    self._client = http_client or SyncHttpxClientWrapper(
                                  ^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspaces/KG_tests/.venv/lib/python3.12/site-packages/anthropic/_base_client.py", line 754, in __init__
    super().__init__(**kwargs)
TypeError: Client.__init__() got an unexpected keyword argument 'proxies'

Code:

from neo4j_graphrag.llm import AnthropicLLM

  t2c_llm = AnthropicLLM(
      model_name='claude-3-7-sonnet-20250219',
      model_params={'max_tokens': 4096},
      api_key=settings.anthropic_api_key.get_secret_value(),
  )
@stellasia
Copy link
Contributor

Thanks for raising the issue. This should be fixed in the new 1.6.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants