pub struct MemoryManager { /* private fields */ }Expand description
Central memory manager that orchestrates NRA, REM, embedding, and reasoning.
Implementations§
Source§impl MemoryManager
impl MemoryManager
Sourcepub fn new(bridge: Arc<EmbeddingBridge>) -> Self
pub fn new(bridge: Arc<EmbeddingBridge>) -> Self
Create a new MemoryManager with default configurations.
Sourcepub fn with_configs(
bridge: Arc<EmbeddingBridge>,
nra_config: NRAConfig,
rem_config: REMConfig,
) -> Self
pub fn with_configs( bridge: Arc<EmbeddingBridge>, nra_config: NRAConfig, rem_config: REMConfig, ) -> Self
Create with custom NRA/REM configs.
Sourcepub async fn store(&self, content: &str) -> Result<InterferenceReport, RaiError>
pub async fn store(&self, content: &str) -> Result<InterferenceReport, RaiError>
Store a fact and return an interference report.
Sourcepub async fn recall(&self, query: &str) -> Result<RetrievalResult, RaiError>
pub async fn recall(&self, query: &str) -> Result<RetrievalResult, RaiError>
Recall a memory with confidence diagnostics.
Sourcepub async fn intersect(
&self,
concepts: &[String],
) -> Result<IntersectionResult, RaiError>
pub async fn intersect( &self, concepts: &[String], ) -> Result<IntersectionResult, RaiError>
Query at concept intersection using compositional addressing.
Sourcepub async fn check_contradiction(
&self,
fact: &str,
) -> Result<InterferenceReport, RaiError>
pub async fn check_contradiction( &self, fact: &str, ) -> Result<InterferenceReport, RaiError>
Check if a new fact contradicts existing memory.
Sourcepub async fn measure_surprise(
&self,
content: &str,
) -> Result<SurpriseResult, RaiError>
pub async fn measure_surprise( &self, content: &str, ) -> Result<SurpriseResult, RaiError>
Measure novelty/surprise of a fact using REM prior.
Sourcepub async fn explain_confidence(
&self,
query: &str,
) -> Result<ConfidenceExplanation, RaiError>
pub async fn explain_confidence( &self, query: &str, ) -> Result<ConfidenceExplanation, RaiError>
Explain the confidence of a retrieval in detail.
Sourcepub async fn health(&self) -> Result<HealthReport, RaiError>
pub async fn health(&self) -> Result<HealthReport, RaiError>
Get system health diagnostics.
Sourcepub async fn load(
path: &Path,
bridge: Arc<EmbeddingBridge>,
) -> Result<Self, RaiError>
pub async fn load( path: &Path, bridge: Arc<EmbeddingBridge>, ) -> Result<Self, RaiError>
Load state from disk. Returns a new MemoryManager.
Sourcepub async fn energy_snapshot(&self) -> Vec<(Vec64, f64)>
pub async fn energy_snapshot(&self) -> Vec<(Vec64, f64)>
Take an NRA energy snapshot for external use.
Auto Trait Implementations§
impl !RefUnwindSafe for MemoryManager
impl !UnwindSafe for MemoryManager
impl Freeze for MemoryManager
impl Send for MemoryManager
impl Sync for MemoryManager
impl Unpin for MemoryManager
impl UnsafeUnpin for MemoryManager
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.