This repository is based on the work and demonstration by TechLead on ChatGPT Retrieval. You can find the original YouTube Video here.
I also added a RAG implementation to the repo.
In addition, pipenv
is utilized for environment management. Pls see details below.
Install pipenv
if you don't have it already
pip install pipenv
Activate the virtual environment
pipenv shell
Install the dependencies specified in the Pipfile.lock
file
pipenv install
Place your own data into the data/
folder.
Test reading data/data.txt
file.
> python chatgpt.py "what is my dog's name"
Your dog's name is Sunny.
Test reading data/cat.pdf
file.
> python chatgpt.py "what is my cat's name"
Your cat's name is Muffy.
In addition to what's in the original repo, I also experimented a bit more with RAG 🤩, following the LangChain doc, I added a RAG implementation that utilizes a webpage as the knowledge base. Pls run rag_web.py
for fun, or check out rag_web.ipynb
for sample results.