Simple script to use ChatGPT on your own files.
Here's the YouTube Video.
Install Langchain and other required packages.
pip install langchain==0.1.0
pip install openai==1.7.1
pip install chromadb==0.4.22
pip install tiktoken==0.5.2
pip install unstructured=0.12.0
pip install "unstructured[pdf]"
Modify constants.py.default
to use your own OpenAI API key, and rename it to constants.py
.
Place your own data into data/data.txt
.
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.