Skip to main content

create_memory_with_storage_and_routes

Function create_memory_with_storage_and_routes 

Source
pub fn create_memory_with_storage_and_routes(
    config: &MemoryConfig,
    embedding_routes: &[EmbeddingRouteConfig],
    active_storage: ActiveStorage<'_>,
    workspace_dir: &Path,
    api_key: Option<&str>,
) -> Result<Box<dyn Memory>, Error>
Expand description

Factory: create memory with a resolved active storage backend and embedding routes.

Pass ActiveStorage::None when no typed storage config is needed (sqlite, markdown, lucid, none — all infer settings from the workspace). Postgres and Qdrant require their typed variants and will error if the wrong variant is supplied.