DEV Community

StackFoss
StackFoss

Posted on • Originally published at stackfoss.com on

localGPT: A Local Chatbot for Your Documents

localGPT is a new tool that allows you to chat with your documents on your local device using GPT models. No data leaves your device, and it is 100% private.

How does it work?

localGPT uses the power of LangChain to run the entire pipeline locally, without any data leaving your environment, and with reasonable performance.

Ingesting Documents

The first step is to ingest your documents into localGPT. This can be done using the ingest.py script. This script uses LangChain tools to parse the document and create embeddings locally using InstructorEmbeddings. It then stores the result in a local vector database using Chroma vector store.

Chatting with Your Documents

Once your documents have been ingested, you can start chatting with them using the chat.py script. This script will prompt you for a question, and then use GPT to generate a response.

Privacy

localGPT is designed to be completely private. No data leaves your device, and your documents are never stored on a remote server.

Performance

localGPT is designed to be performant, even on low-end devices. It uses a variety of techniques to optimize performance, including:

  • Using a local vector database
  • Using a lightweight language model
  • Optimizing the GPT code

localGPT is a powerful new tool that allows you to chat with your documents on your local device. It is 100% private and performant, making it a great choice for anyone who wants to use GPT models without compromising their privacy.

Here are some additional features of localGPT:

  • You can use localGPT to generate summaries of your documents.
  • You can use localGPT to find similar documents.
  • You can use localGPT to answer questions about your documents.

localGPT is still under development, but it is already a powerful tool that can be used for a variety of tasks. If you are interested in using GPT models, I encourage you to try localGPT.

Top comments (0)