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

Import Error #3

Open
dr9216 opened this issue Feb 13, 2024 · 1 comment
Open

Import Error #3

dr9216 opened this issue Feb 13, 2024 · 1 comment

Comments

@dr9216
Copy link

dr9216 commented Feb 13, 2024

Hi, I'm trying to run your code I obtain this error:

ImportError: cannot import name 'StreamlitChatMessageHistory' from 'langchain.memory.chat_message_histories' (C:\Users\ASUS\AppData\Local\Programs\Python\Python310\lib\site-packages\langchain\memory\chat_message_histories_init_.py)

Traceback:
File "C:\Users\ASUS\AppData\Local\Programs\Python\Python310\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 535, in _run_script
exec(code, module.dict)
File "C:\Users\ASUS\Desktop\2024-02-13_chat-with-a-website-main\chat.py", line 10, in
from langchain.memory.chat_message_histories import StreamlitChatMessageHistory

How can I fix this?

@Ashutosh27ind
Copy link

This issue is likely due to the lower version of the langchain used while the code would have been written, try pinning it with langchain==0.0.330 and issue should be resolved.

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