langchain-rag-app/ Client.__init__() got an unexpected keyword argument 'proxies'
Maintainer antworten meist innerhalb von 5 Tagen
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 45/100
Rechercherichtung
Beginne in langchain-rag-app/source_code_final und prüfe chatbot_api/pyproject.toml und requirements.txt auf die Versionen der OpenAI- und httpx-Abhängigkeiten. Baue mit docker-compose up --build neu und bestätige, dass chatbot_api ohne den gemeldeten Client.init()-Fehler startet.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
ℹ️ 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.
- Vorherrschende Sprache
- Jupyter Notebook
- Sterne
- 5.2k
- Forks
- 5.3k
- Ø Merge
- 5 T. 2 Std.
- Gemergte PRs (30 T.)
- 11
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Kein Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus realpython/materials
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
realpython/materials#729 ·
Maintainer antworten meist innerhalb von 5 Tagen
-
пOffen
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 1/100
realpython/materials#763 ·
Maintainer antworten meist innerhalb von 5 Tagen
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 55/100
realpython/materials#738 ·
Maintainer antworten meist innerhalb von 5 Tagen
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 45/100
realpython/materials#737 ·
Maintainer antworten meist innerhalb von 5 Tagen
-
проект2Offen
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 15/100
realpython/materials#725 ·
Maintainer antworten meist innerhalb von 5 Tagen
Alle Issues in realpython/materials
Ähnliche Issues
-
DB-plane provider_chat_options.* is accepted by config set but never merged into the loaded configOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
kind/bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag
-
status: team-only type: dependency-upgrade
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
spring-projects/spring-boot#52099 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 69/100
PrestaShop/PrestaShop#43140 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Round video messages start gray and blocky with libx264: encoder is configured for 1,000,000 fpsOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
telegramdesktop/tdesktop#31422 ·
Maintainer antworten meist innerhalb von 9 Tagen