pub struct NoMemory;Expand description
No durable memory: nothing recalled, nothing kept, nothing in the prompt.
Trait Implementations§
Source§impl DurableStore for NoMemory
impl DurableStore for NoMemory
Source§fn keeps(&self) -> bool
fn keeps(&self) -> bool
false: recall, extraction, the memory prompt and the index are off
whatever the settings say.fn record_recalled(&self, _names: &[String]) -> Result<(), MemoryError>
Source§fn room(&self) -> usize
fn room(&self) -> usize
How many more an extraction may add; 0 skips extraction before any
model call.
Source§fn 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>
Source§fn retriever(&self) -> Arc<dyn MemoryRetriever> ⓘ
fn retriever(&self) -> Arc<dyn MemoryRetriever> ⓘ
The retriever a session uses when the host gave none.
Source§impl MemoryStorage for NoMemory
impl MemoryStorage for NoMemory
Source§fn load_all(&self) -> Vec<DurableMemory>
fn load_all(&self) -> Vec<DurableMemory>
Every memory, most recently seen first.
Source§fn search(&self, _query: &str) -> Vec<DurableMemory>
fn search(&self, _query: &str) -> Vec<DurableMemory>
Memories matching
query, however this backend matches. The shipped
implementation is a substring scan; a backend with an index is
expected to do better, and nothing depends on the ranking.Source§fn persist_batch(
&self,
_memories: Vec<DurableMemory>,
) -> Result<usize, MemoryError>
fn persist_batch( &self, _memories: Vec<DurableMemory>, ) -> Result<usize, MemoryError>
Write these, returning how many landed.
Auto Trait Implementations§
impl Forget for NoMemory
impl Freeze for NoMemory
impl Move for NoMemory
impl RefUnwindSafe for NoMemory
impl Send for NoMemory
impl Sync for NoMemory
impl Unpin for NoMemory
impl UnsafeUnpin for NoMemory
impl UnwindSafe for NoMemory
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more