rag constant
GemmaRag
const rag
Retrieval-augmented-generation (vector store) operations, namespaced.
Opt-in: requires a RAG package (flutter_gemma_rag_qdrant /
flutter_gemma_rag_sqlite) registered via
FlutterGemma.initialize(vectorStore: ...). Without one, every call
throws a clear "add a RAG package" error.
await FlutterGemma.rag.initialize('rag.db');
await FlutterGemma.rag.addDocument(id: '1', content: 'hello');
final hits = await FlutterGemma.rag.searchSimilar(query: 'hi');
await FlutterGemma.rag.removeDocument(id: '1');
Implementation
static const GemmaRag rag = GemmaRag._();