io library
File persistence for the Dart VM and Flutter.
This library re-exports all of package:rag_kit/rag_kit.dart and adds
FileVectorStore (a VectorStore that survives a process restart) and
InMemoryVectorStoreFiles (save / load of a snapshot you already
hold). It depends on dart:io and therefore does not work on the web;
web applications should import package:rag_kit/rag_kit.dart and persist
the result of InMemoryVectorStore.toBytes themselves, for example in
IndexedDB.
Classes
- Chunk
- A piece of a source text with its exact position in that source.
- Chunker
- Splits a source text into Chunks.
- Document
- A text passage stored in a vector store together with its embedding.
- FileVectorStore
- A VectorStore that snapshots itself to a file after every mutation.
- InMemoryVectorStore
- A VectorStore that keeps everything in memory.
- Retriever
- Wires a Chunker, an Embedder, and a VectorStore into a retrieval pipeline: add texts once, then retrieve the passages most relevant to a query.
- ScoredChunk
- A search result: a stored document and its similarity to the query.
- VectorStore
- Stores embedded documents and finds the ones most similar to a query vector.
Extensions
- InMemoryVectorStoreFiles on InMemoryVectorStore
- Saves and loads an InMemoryVectorStore as a file in the rag_kit binary format described at InMemoryVectorStore.toBytes.