langchain-rag-app/ Client.__init__() got an unexpected keyword argument 'proxies'
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 45/100
调研方向
从 langchain-rag-app/source_code_final 开始,检查 chatbot_api/pyproject.toml 和 requirements.txt 中 OpenAI 与 httpx 依赖项的版本。使用 docker-compose up --build 重新构建,并确认 chatbot_api 启动时不会出现报告中的 Client.init() 错误。
由索引模型根据 Issue 内容生成。
描述
ℹ️ Please note that the best way to get support for Real Python courses & articles is to join one of our weekly Office Hours calls or in the RP Community Slack.
You can report issues and problems here, but we typically won't be able to provide 1:1 support outside the channels listed above.
Describe the bug
A clear and concise description of what the bug is.
In langchain-rag-app directory, according to README.md, I excecute 'docker-compose up --build'. There is an error related to chatbot_api.
source_code_final-chatbot_api-1 | from chains.hospital_cypher_chain import hospital_cypher_chain
source_code_final-chatbot_api-1 | File "/app/chains/hospital_cypher_chain.py", line 149, in
source_code_final-chatbot_api-1 | cypher_llm=ChatOpenAI(model=HOSPITAL_CYPHER_MODEL, temperature=0),
source_code_final-chatbot_api-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
source_code_final-chatbot_api-1 | File "/usr/local/lib/python3.11/site-packages/langchain_core/load/serializable.py", line 107, in init
source_code_final-chatbot_api-1 | super().init(**kwargs)
source_code_final-chatbot_api-1 | File "/usr/local/lib/python3.11/site-packages/pydantic/v1/main.py", line 341, in init
source_code_final-chatbot_api-1 | raise validation_error
source_code_final-chatbot_api-1 | pydantic.v1.error_wrappers.ValidationError: 1 validation error for ChatOpenAI
source_code_final-chatbot_api-1 | root
source_code_final-chatbot_api-1 | Client.init() got an unexpected keyword argument 'proxies' (type=type_error)
source_code_final-chatbot_api-1 | Failed to write data to connection ResolvedIPv4Address(('34.126.114.186', 7687)) (ResolvedIPv4Address(('34.126.114.186', 7687)))
source_code_final-chatbot_api-1 | Failed to write data to connection IPv4Address(('7cf48f19.databases.neo4j.io', 7687)) (ResolvedIPv4Address(('34.126.114.186', 7687)))
To Reproduce
Steps to reproduce the behavior:
- Go to langchain-rag-app/source_code_final directory.
- In console terminal, docker-compose up --build
- See error
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Ubuntu22.04
Additional context
Add any other context about the problem here.
I searched similar problems and fixed problem manually. https://community.openai.com/t/error-with-openai-1-56-0-client-init-got-an-unexpected-keyword-argument-proxies/1040332/24
The problem is version of openai and httpx.
-
I update openai version in chatbot_api/pyproject.toml.
-
"openai==1.7.2" --> "openai==1.55.3"
-
I update httpx in requirements.txt
-
httpx==0.26.0 --> httpx==0.27.2
Then, it works fine!!
I think it would be good to update this later.
Thank you.
- 主要语言
- Jupyter Notebook
- 星标
- 5.2k
- 派生
- 5.3k
- 平均合并
- 4 天 10 小时
- 30 天内合并 PR
- 10
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
realpython/materials 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
realpython/materials#729 ·
-
п 未关闭
难度 5/5 一周以上 新手友好度 1/100
realpython/materials#763 ·
-
难度 1/5 1 小时以内 新手友好度 55/100
realpython/materials#738 ·
-
难度 1/5 1 小时以内 新手友好度 45/100
realpython/materials#737 ·
-
проект2 未关闭
难度 5/5 一周以上 新手友好度 15/100
realpython/materials#725 ·
查看 realpython/materials 的全部 Issue
相似的 Issue
-
Area: Excel support
难度 2/5 1-3 小时 新手友好度 75/100
orbeon/orbeon-forms#7893 ·
-
essnmx good first issue
难度 1/5 1 小时以内 新手友好度 95/100
-
难度 2/5 1-3 小时 新手友好度 75/100
yeti-platform/yeti#1380 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
modelcontextprotocol/python-sdk#3566 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
griptape-ai/griptape#2353 ·