Skip to content

DocsGPT is a powerful web app that allows you to embed your documents then query them using natural language

License

Notifications You must be signed in to change notification settings

thegeorgenikhil/docsGPT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DocsGPT

DocsGPT is a powerful web app that allows you to embed your documents then query them using natural language.

How It Works

Using OpenAI's Embedding API, it embeds your documents into set of vectors and then stores the content in a NoSQL and the vectors in a database(Pinecone). When you query the app, it uses the same API to embed your query and then uses cosine similarity to find the most similar documents.

From the similar documents, it selects the top 3 results and creates a request to OpenAI's Completions API with the top result along with your query and ask it to return a meaningful response by taking the top results as reference.

Setup

For this to work, you need to have Docker installed on your machine.

It uses Pinecone to store all the vectors.So you need to have a Pinecone account and a Pinecone API key. You can get one here.

For the OpenAI API, you need to have an API key. You can get one here.

  1. Clone the repo
git clone https://github.com/thegeorgenikhil/docsGPT.git
  1. Rename the .env.example file to .env and fill in the values.
PORT=9000
OPENAI_API_KEY= # This is the API key you get from OpenAI
PINECONE_API_KEY= # This is the API key you get from Pinecone
PINECONE_INDEX_URL= # This is the URL of the index you want to use.
MONGO_URI=mongodb://mongodb/docsGPT
  1. Run the app
docker-compose up

Your app should be running on localhost:80 with backend on localhost:9000.

Screenshots

image

TODO

  • Replace all the alerts in the UI with toasts
  • Handle the error when the prompt exceeds the max token limit

About

DocsGPT is a powerful web app that allows you to embed your documents then query them using natural language

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published