InMemoryVectorStoreFiles extension

Saves and loads an InMemoryVectorStore as a file in the rag_kit binary format described at InMemoryVectorStore.toBytes.

Prefer FileVectorStore when the store should persist itself after every mutation. These methods are the snapshot you take of a store you already hold.

on

Methods

save(String path) Future<void>

Available on InMemoryVectorStore, provided by the InMemoryVectorStoreFiles extension

Writes the store to the file at path, overwriting it if it exists.

Static Methods

load(String path) Future<InMemoryVectorStore>

Available on InMemoryVectorStore, provided by the InMemoryVectorStoreFiles extension

Reads a store previously written with save.