AIAnytime / Llama2-Medical-Chatbot

This is a medical bot built using Llama2 and Sentence Transformers. The bot is powered by Langchain and Chainlit. The bot runs on a decent CPU machine with a minimum of 16GB of RAM.
MIT License
296 stars 218 forks source link

Import libraries changes #22

Closed ali-bin-kashif closed 8 months ago

ali-bin-kashif commented 8 months ago

Use "langchain_community" instead of only "langchain" while importing some libraries as it has been deprecated. See latest langchain documents.

Error: e:\data science work\llama-chatbot-medical\ned-llama2-chatbot\ned_chabot_huggingface_repo\ned-chatbot\venv\lib\site-packages\langchain\document_loaders__init__.py:36: LangChainDeprecationWarning: Importing document loaders from langchain is deprecated. Importing from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:

from langchain_community.document_loaders import PyPDFLoader.

To install langchain-community run pip install -U langchain-community. warnings.warn( e:\data science work\llama-chatbot-medical\ned-llama2-chatbot\ned_chabot_huggingface_repo\ned-chatbot\venv\lib\site-packages\langchain\document_loaders__init__.py:36: LangChainDeprecationWarning: Importing document loaders from langchain is deprecated. Importing from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:

from langchain_community.document_loaders import DirectoryLoader.

To install langchain-community run pip install -U langchain-community. warnings.warn( e:\data science work\llama-chatbot-medical\ned-llama2-chatbot\ned_chabot_huggingface_repo\ned-chatbot\venv\lib\site-packages\langchain\embeddings__init__.py:29: LangChainDeprengChainDeprecationWarning: Importing embeddings from langchain is deprecated. Importing from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:

from langchain_community.embeddings import HuggingFaceEmbeddings.