Skip to content

Customizable ChatGPT retrieval tool. Use your own data to enhance AI conversations.

Notifications You must be signed in to change notification settings

fonckchain/chatgpt-retrieval

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChatGPT

ChatGPT Retrieval

Simple script to use ChatGPT on your own files

Here's the Original YouTube Guide.

📦 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 additional data into data.

✨ Example usage

Test reading data/data.txt file.

> python chatgpt.py "what is my dog's name"
Your dog's name is Lilia.

Test reading data/cat.pdf file.

> python chatgpt.py "what is my cat's name"
Your cat's name is Muffy.

🔄 Alternate Version

There's also an alternate version of the script that prioritizes retrieving answers from the dataset before using the OpenAI model. This can help reduce the cost of using the OpenAI API.

To use the alternate version, run the chatgpt_reduced_cost.py script instead of chatgpt.py.

> python chatgpt_alternate.py "what is my dog's name"
Your dog's name is Lilia.

About

Customizable ChatGPT retrieval tool. Use your own data to enhance AI conversations.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%