Link: https://youtu.be/FuqdVNB_8c0
This tutorial goes over the architecture and concepts used for easily chatting with your PDF using LangChain, ChromaDB and OpenAI's API.
You will need Python and Pipenv
- Clone the repository:
git clone https://github.com/edrickdch/chat-pdf
- Navigate to the project directory:
cd chat-pdf
- Install the required dependencies using Pipenv:
pipenv install
- Activate the Pipenv shell:
pipenv shell
- Create a .env file with your OpenAI API key (Replace with your key):
cat 'OPENAI_API_KEY="sk-XXXXXXXXXXXXXXXXXXXXXXXXXXXX"' > .env
- Run the ingestion:
python src/ingest.py
- Run the conversation:
python src/single-pdf.py
- PDF: https://www.imf.org/en/Publications/WEO/Issues/2023/04/11/world-economic-outlook-april-2023
- OpenAI: https://platform.openai.com/
- LangChain: https://python.langchain.com/en/latest/index.html
- Chroma DB: https://docs.trychroma.com/
👇 Subscribe to the newsletter if you're interested in building more AI applications