Skip to main content

HostStore

Trait HostStore 

Source
pub trait HostStore: Send + Sync {
    // Required methods
    fn recall(&self, query: &str, k: u32) -> Vec<RecallHit>;
    fn score(&self, memory_id: &str) -> f32;
    fn cite(&self, memory_id: &str) -> String;
}
Expand description

Trait the host exposes to the guest. Mirrors the WIT store interface so swapping in the wasmtime path keeps the same contract.

Required Methods§

Source

fn recall(&self, query: &str, k: u32) -> Vec<RecallHit>

Source

fn score(&self, memory_id: &str) -> f32

Source

fn cite(&self, memory_id: &str) -> String

Implementors§