flutter_edge_ai_qdrant 1.3.2 copy "flutter_edge_ai_qdrant: ^1.3.2" to clipboard
flutter_edge_ai_qdrant: ^1.3.2 copied to clipboard

qdrant-edge on-device RAG vector store for flutter_edge_ai, via the official qdrant_edge UniFFI SDK. Opt-in VectorStoreRepository with payload filtering. Native platforms only (no web).

example/README.md

flutter_edge_ai_qdrant example #

flutter_edge_ai_qdrant is an opt-in vector store for flutter_edge_ai. Register it once at startup, then use the unchanged RAG API on FlutterEdgeAiPlugin.instance.

import 'package:flutter/widgets.dart';
import 'package:flutter_edge_ai/flutter_edge_ai.dart';
import 'package:flutter_edge_ai_qdrant/flutter_edge_ai_qdrant.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();

  // Opt into the qdrant-edge native vector store.
  await FlutterEdgeAi.initialize(
    vectorStore: QdrantVectorStore(),
  );

  final gemma = FlutterEdgeAiPlugin.instance;

  // `path` is a shard DIRECTORY (qdrant creates files under it), not a .db file.
  await gemma.initializeVectorStore('rag_store');

  // Add documents with pre-computed embeddings (e.g. from
  // flutter_edge_ai_embeddings). `metadata` is a raw JSON string.
  await gemma.addDocumentWithEmbedding(
    id: 'doc-1',
    content: 'Gemma runs fully on-device.',
    embedding: List<double>.filled(768, 0.0), // your real embedding here
    metadata: '{"lang":"en"}',
  );

  // Plain similarity search.
  final hits = await gemma.searchSimilar(query: 'on-device LLM', topK: 5);
  for (final h in hits) {
    print('${h.id}: ${h.content} (score ${h.similarity})');
  }

  // Payload-aware filtering (native only).
  final enHits = await gemma.searchSimilar(
    query: 'on-device LLM',
    topK: 5,
    filter: Filter(must: [FieldEquals(key: 'lang', value: 'en')]),
  );
  print('English hits: ${enHits.length}');
}

See the package README for platform support and behavior notes. A full runnable app that wires every engine and RAG store together lives in the flutter_edge_ai example.

0
likes
150
points
81
downloads

Documentation

API reference

Publisher

verified publishersashadenisov.dev

Weekly Downloads

qdrant-edge on-device RAG vector store for flutter_edge_ai, via the official qdrant_edge UniFFI SDK. Opt-in VectorStoreRepository with payload filtering. Native platforms only (no web).

Homepage
Repository (GitHub)
View/report issues

Topics

#rag #qdrant #vector-search #embeddings #on-device

License

MIT (license)

Dependencies

flutter, flutter_edge_ai, path, qdrant_edge, uuid

More

Packages that depend on flutter_edge_ai_qdrant