Skip to main content

Crate erio_context_store

Crate erio_context_store 

Source
Expand description

§erio-context-store

erio-context-store provides vector-backed context storage and semantic retrieval APIs for retrieval-augmented workflows.

It handles indexing, persistence configuration, and top-k search over embedded content.

§Quickstart

use std::path::PathBuf;
use std::sync::Arc;

use erio_context_store::{ContextConfig, ContextStore, HnswConfig};
use erio_embedding::{EmbeddingConfig, EmbeddingEngine, GemmaEmbedding};

async fn run() -> Result<(), Box<dyn std::error::Error>> {
    let embedding: Arc<dyn EmbeddingEngine> =
        Arc::new(GemmaEmbedding::new(EmbeddingConfig::default())?);

    let config = ContextConfig {
        path: PathBuf::from("/tmp/erio-context-store"),
        index: HnswConfig::default(),
    };

    let store = ContextStore::new(config, embedding).await?;
    let _results = store.search("what is erio?", 5, None).await?;
    Ok(())
}

§API tour

  • Store/config: ContextStore, ContextConfig, HnswConfig
  • Query/ops outputs: SearchResult, StorageStats
  • Error type: ContextStoreError
  • Modules: store, config, error

§Compatibility

  • MSRV: Rust 1.93
  • License: Apache-2.0 Erio Context Store - vector storage and semantic search.

Re-exports§

pub use config::ContextConfig;
pub use config::HnswConfig;
pub use config::SearchResult;
pub use config::StorageStats;
pub use error::ContextStoreError;
pub use store::ContextStore;

Modules§

config
Configuration for the context store.
error
Error types for the context store.
store
Context store backed by LanceDB.