← Open Source
techleadhd

chatgpt-retrieval

techleadhd/chatgpt-retrieval on GitHub: Python, AI Engineering, Give agent knowledge, RAG.

AI EngineeringGive agent knowledgePython
Open on GitHub
Momentum
+1stars in 24 hours+0.1%
1.69k
Stars
761
Forks
+1
This week
3
Contributors
Created 2023-06-19 · Updated 2026-10-19 · #5689 today
Top developers
techleadhdAliAbbasi2021tilenn
README

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.
Nearby in the ranking
Similar items