pub trait DurableStore: MemoryStorage {
// Required methods
fn record_recalled(&self, names: &[String]) -> Result<(), MemoryError>;
fn room(&self) -> usize;
fn save_extracted(
&self,
found: Vec<DurableMemory>,
) -> Result<u32, MemoryError>;
fn system_prompt(&self) -> Option<String>;
fn index_for_prompt(&self) -> Option<String>;
// Provided methods
fn keeps(&self) -> bool { ... }
fn retriever(&self) -> Arc<dyn MemoryRetriever> ⓘ { ... }
}Expand description
A session’s durable memory as the turn recalls from it and adds to it.
Required Methods§
fn record_recalled(&self, names: &[String]) -> Result<(), MemoryError>
Sourcefn room(&self) -> usize
fn room(&self) -> usize
How many more an extraction may add; 0 skips extraction before any model call.
Sourcefn save_extracted(&self, found: Vec<DurableMemory>) -> Result<u32, MemoryError>
fn save_extracted(&self, found: Vec<DurableMemory>) -> Result<u32, MemoryError>
Keep what extraction found: secrets refused, MemoryType::Project
with the project, the rest globally, no more than there is room for.
How many were written.
fn system_prompt(&self) -> Option<String>
fn index_for_prompt(&self) -> Option<String>
Provided Methods§
Sourcefn keeps(&self) -> bool
fn keeps(&self) -> bool
false: recall, extraction, the memory prompt and the index are off
whatever the settings say.
Sourcefn retriever(&self) -> Arc<dyn MemoryRetriever> ⓘ
fn retriever(&self) -> Arc<dyn MemoryRetriever> ⓘ
The retriever a session uses when the host gave none.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".