pub struct MemoryModule { /* private fields */ }Expand description
Memory module providing persistent memory storage and retrieval.
Bundles:
- Context: MemoriesManager (renders recent memories)
- Tool: AppendMemoryTool (stores new memories)
Implementations§
Source§impl MemoryModule
impl MemoryModule
pub fn new(memory_log: Arc<MemoryLog>, settings: SettingsManager) -> Self
pub fn memory_log(&self) -> &Arc<MemoryLog>
Trait Implementations§
Source§impl Module for MemoryModule
impl Module for MemoryModule
fn prompt_components(&self) -> Vec<Arc<dyn PromptComponent>>
fn context_components(&self) -> Vec<Arc<dyn ContextComponent>>
fn tools(&self) -> Vec<Arc<dyn ToolExecutor>>
Source§fn slash_commands(&self) -> Vec<Arc<dyn SlashCommand>>
fn slash_commands(&self) -> Vec<Arc<dyn SlashCommand>>
Returns slash commands provided by this module.
Default implementation returns an empty vec (no commands).
Source§fn settings_namespace(&self) -> Option<&'static str>
fn settings_namespace(&self) -> Option<&'static str>
Option allows modules without configuration to opt-out, avoiding empty entries.
Source§fn settings_json_schema(&self) -> Option<RootSchema>
fn settings_json_schema(&self) -> Option<RootSchema>
Returns JSON Schema for this module’s settings configuration.
Used for auto-generating settings UI.
Source§fn session_state(&self) -> Option<Arc<dyn SessionStateComponent>>
fn session_state(&self) -> Option<Arc<dyn SessionStateComponent>>
Returns a session state component if this module has persistent state.
Return None if this module has no state to persist across sessions.
Auto Trait Implementations§
impl Freeze for MemoryModule
impl RefUnwindSafe for MemoryModule
impl Send for MemoryModule
impl Sync for MemoryModule
impl Unpin for MemoryModule
impl UnwindSafe for MemoryModule
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.