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).
- Node.js (v18 or higher)
- Python 3 (for the database)
- A free Groq API Key from console.groq.com
- Clone/Download this repository.
- Install Node Dependencies:
npm install
- 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
- Create a file named
.envin the root folder. - Add your Groq API Key:
GROQ_API_KEY=gsk_your_key_here... CHROMA_URL=http://localhost:8000
You need two terminal windows open.
Terminal 1: Start the Database
./chroma-env/bin/chroma run --path ./chroma_dbTerminal 2: Start the Chatbot
npm start- 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
- Example: