pub struct MemoryAwareRetrievalEngine { /* private fields */ }Expand description
Main memory-aware retrieval engine
Implementations§
Source§impl MemoryAwareRetrievalEngine
impl MemoryAwareRetrievalEngine
pub fn new( config: EnhancedRetrievalConfig, repository: Arc<MemoryRepository>, reflection_engine: Option<Arc<ReflectionEngine>>, ) -> Self
Sourcepub async fn search(
&self,
request: MemoryAwareSearchRequest,
) -> Result<MemoryAwareSearchResponse>
pub async fn search( &self, request: MemoryAwareSearchRequest, ) -> Result<MemoryAwareSearchResponse>
Execute memory-aware search with all enhancements
Sourcepub async fn calculate_consolidation_boosts_batch(
&self,
memory_ids: &[Uuid],
) -> Result<HashMap<Uuid, f64>>
pub async fn calculate_consolidation_boosts_batch( &self, memory_ids: &[Uuid], ) -> Result<HashMap<Uuid, f64>>
BATCH OPTIMIZATION: Calculate consolidation boosts for multiple memories in a single query
Sourcepub async fn check_recently_consolidated_batch(
&self,
memory_ids: &[Uuid],
) -> Result<HashMap<Uuid, bool>>
pub async fn check_recently_consolidated_batch( &self, memory_ids: &[Uuid], ) -> Result<HashMap<Uuid, bool>>
BATCH OPTIMIZATION: Check recently consolidated status for multiple memories
Sourcepub async fn get_cache_stats(&self) -> Option<CacheOperationMetrics>
pub async fn get_cache_stats(&self) -> Option<CacheOperationMetrics>
Get cache statistics
Sourcepub async fn clear_cache(&self) -> Result<()>
pub async fn clear_cache(&self) -> Result<()>
Clear cache
Sourcepub async fn cleanup_cache(&self) -> Result<usize>
pub async fn cleanup_cache(&self) -> Result<usize>
Cleanup expired cache entries
Auto Trait Implementations§
impl Freeze for MemoryAwareRetrievalEngine
impl !RefUnwindSafe for MemoryAwareRetrievalEngine
impl Send for MemoryAwareRetrievalEngine
impl Sync for MemoryAwareRetrievalEngine
impl Unpin for MemoryAwareRetrievalEngine
impl !UnwindSafe for MemoryAwareRetrievalEngine
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 more