ITADN

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

#102Closedmoyefuse 创建于 2024-12-09
M
moyefusecommented
## Environment ``` > python --version Python 3.11.9 > pip list --format freeze anthropic==0.39.0 anyio==4.7.0 attrs==24.2.0 black==24.10.0 cachetools==5.5.0 certifi==2024.8.30 charset-normalizer==3.4.0 click==8.1.7 cohere==5.11.4 distro==1.9.0 fastavro==1.9.7 filelock==3.16.1 fsspec==2024.10.0 google-ai-generativelanguage==0.6.6 google-api-core==2.23.0 google-api-python-client==2.154.0 google-auth==2.36.0 google-auth-httplib2==0.2.0 google-generativeai==0.7.2 googleapis-common-protos==1.66.0 gpt-command-line==0.3.0 grpcio==1.68.1 grpcio-status==1.62.3 h11==0.14.0 httpcore==1.0.7 httplib2==0.22.0 httpx==0.28.1 httpx-sse==0.4.0 huggingface-hub==0.26.5 idna==3.10 iniconfig==2.0.0 jiter==0.8.0 markdown-it-py==3.0.0 mdurl==0.1.2 mypy-extensions==1.0.0 openai==1.54.5 packaging==24.2 parameterized==0.9.0 pathspec==0.12.1 pip==24.0 platformdirs==4.3.6 pluggy==1.5.0 prompt_toolkit==3.0.48 proto-plus==1.25.0 protobuf==4.25.5 pyasn1==0.6.1 pyasn1_modules==0.4.1 pydantic==1.10.19 pydantic_core==2.27.1 Pygments==2.18.0 pyparsing==3.2.0 pytest==8.3.4 PyYAML==6.0.2 requests==2.32.3 rich==13.9.4 rsa==4.9 setuptools==69.5.1 sniffio==1.3.1 tokenizers==0.21.0 tqdm==4.67.1 types-requests==2.32.0.20241016 typing_extensions==4.12.2 uritemplate==4.1.1 urllib3==2.2.3 wcwidth==0.2.13 wheel==0.43.0 ``` ## ~/.config/gpt-cli/gpt.yaml ``` default_assistant: claude markdown: True anthropic_api_key: <<REDACTED>> assistants: claude: model: claude-3-haiku-20240307 temperature: 1.0 messages: - role: system content: "Please provide brief responses unless explicitly asked for elaboration on a topic." sonnet: model: claude-3-5-sonnet-20240620 temperature: 1.0 messages: - role: system content: "Please provide brief responses unless explicitly asked for elaboration on a topic." dev: model: claude-3-5-sonnet-20240620 temperature: 1.0 messages: - role: system content: "You are a software engineering expert. Your job is to respond accurately and thoughtfully, but succinctly." meta: model: claude-3-5-sonnet-20240620 temperature: 1.0 messages: - role: system content: "You are a propmt engineering expert. Your job is to provide the best prompt to achieve the requested goal if asked to an LLM." crazy: model: claude-3-5-sonnet-20240620 temperature: 1.0 messages: - role: system content: "You are mostly normal but a little weird. You respond to the question answered in a thoughtful but quirky way." ``` ## Traceback ``` TypeError: Client.__init__() got an unexpected keyword argument 'proxies' An uncaught exception occurred. Please report this issue on GitHub. Traceback (most recent call last): File "/Users/moye/Code/gpt-cli/.venv/bin/gpt", line 8, in <module> sys.exit(main()) ^^^^^^ File "/Users/moye/Code/gpt-cli/gptcli/gpt.py", line 206, in main run_interactive(args, assistant) File "/Users/moye/Code/gpt-cli/gptcli/gpt.py", line 254, in run_interactive session.loop(input_provider) File "/Users/moye/Code/gpt-cli/gptcli/session.py", line 180, in loop while self.process_input(input_provider.get_user_input()): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/moye/Code/gpt-cli/gptcli/session.py", line 172, in process_input response_saved = self._respond() ^^^^^^^^^^^^^^^ File "/Users/moye/Code/gpt-cli/gptcli/session.py", line 117, in _respond for event in completion_iter: File "/Users/moye/Code/gpt-cli/gptcli/providers/anthropic.py", line 47, in complete client = get_client() ^^^^^^^^^^^^ File "/Users/moye/Code/gpt-cli/gptcli/providers/anthropic.py", line 23, in get_client return anthropic.Anthropic(api_key=api_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/moye/Code/gpt-cli/.venv/lib/python3.11/site-packages/anthropic/_client.py", line 117, in __init__ super().__init__( File "/Users/moye/Code/gpt-cli/.venv/lib/python3.11/site-packages/anthropic/_base_client.py", line 856, in __init__ self._client = http_client or SyncHttpxClientWrapper( ^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/moye/Code/gpt-cli/.venv/lib/python3.11/site-packages/anthropic/_base_client.py", line 754, in __init__ super().__init__(**kwargs) TypeError: Client.__init__() got an unexpected keyword argument 'proxies' ```
关闭于 2025-01-23 5 条评论