Skip to main content

SemanticMemory

Trait SemanticMemory 

Source
pub trait SemanticMemory: Send + Sync {
    // Required methods
    fn query(&self, text: &str, top_k: usize) -> Result<Vec<MemoryEntry>>;
    fn store(&self, entry: MemoryEntry) -> Result<()>;
}

Required Methods§

Source

fn query(&self, text: &str, top_k: usize) -> Result<Vec<MemoryEntry>>

Source

fn store(&self, entry: MemoryEntry) -> Result<()>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§