• Stars
    star
    1,671
  • Rank 27,970 (Top 0.6 %)
  • Language
    Python
  • Created over 1 year ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

chatgpt-retrieval

Simple script to use ChatGPT on your own files.

Here's the YouTube Video.

Installation

Install Langchain and other required packages.

pip install langchain openai chromadb tiktoken unstructured

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.

Example usage

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.