-
Notifications
You must be signed in to change notification settings - Fork 440
Open
Description
I encountered an error when trying to run the LangGraph example inside the Chainlit backend. Specifically, I cloned the Chainlit repository and added the LangGraph example code in backend/chainlit/hello.py.
However, when I ran the code, I got the following error:
from langchain_openai.chat_models import AzureChatOpenAI, ChatOpenAI
File "/home/chaimaa/.cache/pypoetry/virtualenvs/chatbot-backend-a0QcPf-j-py3.12/lib/python3.12/site-packages/langchain_openai/chat_models/__init__.py", line 1, in <module>
from langchain_openai.chat_models.azure import AzureChatOpenAI
File "/home/chaimaa/.cache/pypoetry/virtualenvs/chatbot-backend-a0QcPf-j-py3.12/lib/python3.12/site-packages/langchain_openai/chat_models/azure.py", line 21, in <module>
from langchain_openai.chat_models.base import BaseChatOpenAI
File "/home/chaimaa/.cache/pypoetry/virtualenvs/chatbot-backend-a0QcPf-j-py3.12/lib/python3.12/site-packages/langchain_openai/chat_models/base.py", line 105, in <module>
from langchain_openai.chat_models._client_utils import (
File "/home/chaimaa/.cache/pypoetry/virtualenvs/chatbot-backend-a0QcPf-j-py3.12/lib/python3.12/site-packages/langchain_openai/chat_models/_client_utils.py", line 17, in <module>
class _SyncHttpxClientWrapper(openai.DefaultHttpxClient):
^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'openai' has no attribute 'DefaultHttpxClient'
Steps to Reproduce:
Clone the Chainlit repo.
Add the LangGraph example ( https://docs.chainlit.io/integrations/langchain#with-langgraph ) code to backend/chainlit/hello.py.
Run the backend.
Environment:
Python version: 3.12
Poetry-managed virtualenv
Latest versions of chainlit(2.6.0), langchain (0.3.26), langchain_openai (0.3.27), and openai (1.93.3)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels