Welcome to the groq-rag documentation.
| Guide | Description |
|---|---|
| Getting Started | Installation and first steps |
| API Reference | Complete API documentation |
| Cookbook | Real-world patterns and recipes |
| Examples | Code examples for common use cases |
groq-rag extends the Groq SDK with three powerful capabilities:
┌─────────────────────────────────────────────────────────────┐
│ groq-rag │
├─────────────────┬─────────────────┬─────────────────────────┤
│ RAG │ Web │ Agents │
├─────────────────┼─────────────────┼─────────────────────────┤
│ • Add documents │ • Fetch URLs │ • Autonomous reasoning │
│ • Semantic │ • Web search │ • Tool use │
│ search │ • Parse HTML │ • Multi-step tasks │
│ • Context │ • Markdown │ • Streaming │
│ retrieval │ conversion │ • Memory │
└─────────────────┴─────────────────┴─────────────────────────┘
Build a chatbot with my own data → RAG Guide
Search the web in real-time → Web Search Guide
Create an AI that uses tools → Agent Guide
Understand the full API → API Reference
See working code → Examples
User Request
│
▼
┌─────────────┐
│ GroqRAG │ ◄── Main client
│ Client │
└─────┬───────┘
│
├──────────────┬──────────────┬──────────────┐
▼ ▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
│ Chat │ │ RAG │ │ Web │ │ Agent │
│ Module │ │ Module │ │ Module │ │ System │
└────┬─────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘
│ │ │ │
│ ┌────┴────┐ ┌────┴────┐ ┌────┴────┐
│ ▼ ▼ ▼ ▼ ▼ │
│ ┌────────┐ ┌────────┐ ┌────────┐ ┌────────┐│
│ │Chunker │ │Vector │ │Fetcher │ │ Tools ││
│ │ │ │Store │ │ │ │ ││
│ └────────┘ └────────┘ └────────┘ └────────┘│
│ │ │ │ │ │
└────────┴─────────┴──────────┴──────────┴─────┘
│
▼
┌──────────┐
│ Groq API │
└──────────┘
npm install groq-rag
import GroqRAG from 'groq-rag';
const client = new GroqRAG();
// Simple chat
const response = await client.complete({
model: 'llama-3.3-70b-versatile',
messages: [{ role: 'user', content: 'Hello!' }]
});
console.log(response.choices[0].message.content);