Skip to content
/ ragtoy Public

This is a toy Python project to learn and explore the capabilities of openAI chatGPT API.

License

Notifications You must be signed in to change notification settings

hxy9243/ragtoy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RAG Toy

Summary

This is an example toy local application that implements basic RAG queries for documents, based on OpenAI ChatGPT API and embedding-based Vector Search.

Currently under construction. Please stay tuned!

Quick Start

The project is setup by poetry. Use poetry to install the project:

poetry install
poetry shell

Add OPENAI_API_KEY to .env file:

OPENAI_API_KEY=sk-xxxx

After the above setup, run the ragtoy cli entry. For example, to add a new document:

ragtoy document add <path to doc>

To chat with all the documents:

# start interactive chat loop
 % ragtoy chat
question > What year was Alan Turing born?
Alan Turing was born on June 23, 1912.
========================================
Sources:
Node ID: 31b33cbf-2a48-4b2b-8f44-1f239dc22e45
Text: 6 Google LaMDA chatbot 7 Conferences  7.1 Turing Colloquium 7.2
...

About

This is a toy Python project to learn and explore the capabilities of openAI chatGPT API.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages