LocalVectorStore class
Local SQLite vector store for on-device semantic search.
Uses sqlite-vec for vector similarity search on cached content chunks. Chunks are synced from Supabase and stored locally for offline access.
Constructors
Properties
Methods
-
clearAll(
) → void - Remove all cached data.
-
clearTopic(
String topicId) → void - Remove all cached data for a topic.
-
dispose(
) → void - Close the database.
-
hasTopicCached(
String topicId) → bool - Check whether a topic's chunks are cached locally.
-
hasTopicEmbeddings(
String topicId) → bool - Check whether a topic's chunks have embeddings locally.
-
initialize(
) → Future< void> - Open (or create) the local database and load the vector extension.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
searchSimilar(
List< double> queryEmbedding, {String? topicId, int limit = 8, double threshold = 0.3}) → List<ContentChunkModel> -
Search for chunks similar to
queryEmbeddingwithin a topic. -
toString(
) → String -
A string representation of this object.
inherited
-
upsertChunks(
List< ContentChunkModel> chunks, List<List< embeddings) → voiddouble> > - Store chunks with their embeddings locally.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited