Skip to content

A private, fast, and free RAG (Retrieval-Augmented Generation) chatbot that runs in your terminal

Notifications You must be signed in to change notification settings

raoankitdev/terminal-rag-bot

Repository files navigation

Terminal RAG Chatbot

A private, fast, and free RAG (Retrieval-Augmented Generation) chatbot that runs in your terminal.

  • Model: Llama 3 (via Groq) - Super fast & free.
  • Memory: Local Embeddings (Transformers.js) - Unlimited & private.
  • Database: ChromaDB (Local Vector Store).

Prerequisites

  1. Node.js (v18 or higher)
  2. Python 3 (for the database)
  3. A free Groq API Key from console.groq.com

Installation

  1. Clone/Download this repository.
  2. Install Node Dependencies:
    npm install
  3. Setup Database (ChromaDB): We use a local virtual environment to keep things clean.
    # Create virtual environment
    python3 -m venv chroma-env
    
    # Install ChromaDB
    ./chroma-env/bin/pip install chromadb

Configuration

  1. Create a file named .env in the root folder.
  2. Add your Groq API Key:
    GROQ_API_KEY=gsk_your_key_here...
    CHROMA_URL=http://localhost:8000

Usage

You need two terminal windows open.

Terminal 1: Start the Database

./chroma-env/bin/chroma run --path ./chroma_db

Terminal 2: Start the Chatbot

npm start

Commands

  • Chat: Just type your question.
  • Ingest: Type ingest <path_to_txt_file> to add it to the AI's knowledge base.
    • Example: ingest ./notes.txt

About

A private, fast, and free RAG (Retrieval-Augmented Generation) chatbot that runs in your terminal

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published