Skip to content

lamoboos223/chat-with-pdf

Repository files navigation

RAG with LangChain and Chroma

Prerequisites

  • Install Ollama

  • Create virtual environment

  • This was tested with python 3.10

python -m venv venv
source venv/bin/activate # On Windows use `source venv/Scripts/Activate`
pip3 install -r requirements.txt
# torch is needed for chunking purposes under the hood
pip3 install torch==2.5.1 torchvision --index-url https://download.pytorch.org/whl/cu121 # for some reason it's not installed properly via requirements.txt

Setup the database

python database.py --type=markdown #chunk markdown files
python database.py --type=pdf #chunk pdf files
python database.py --reset # Clear the database

USAGE

Start the chat app

python -m chainlit run chat.py -w

Visit: http://localhost:8000

Do one time query via command line

python query_data.py "how to create admin user via cli?"

About

demo on RAG using langchain with chroma to read markdown and pdf files

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages