pub struct SemanticMemoryBackend { /* private fields */ }Expand description
Adapter that implements ContextMemoryBackend by delegating to SemanticMemory.
Implementations§
Source§impl SemanticMemoryBackend
impl SemanticMemoryBackend
Sourcepub fn new(inner: Arc<SemanticMemory>) -> Self
pub fn new(inner: Arc<SemanticMemory>) -> Self
Wrap an Arc<SemanticMemory> in the backend adapter.
Trait Implementations§
Source§impl ContextMemoryBackend for SemanticMemoryBackend
impl ContextMemoryBackend for SemanticMemoryBackend
Source§fn load_persona_facts(
&self,
min_confidence: f64,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemPersonaFact>, Box<dyn Error + Send + Sync>>> + Send + '_>>
fn load_persona_facts( &self, min_confidence: f64, ) -> Pin<Box<dyn Future<Output = Result<Vec<MemPersonaFact>, Box<dyn Error + Send + Sync>>> + Send + '_>>
Load persona facts with at least
min_confidence.Source§fn load_trajectory_entries<'a>(
&'a self,
tier: Option<&'a str>,
top_k: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemTrajectoryEntry>, Box<dyn Error + Send + Sync>>> + Send + 'a>>
fn load_trajectory_entries<'a>( &'a self, tier: Option<&'a str>, top_k: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<MemTrajectoryEntry>, Box<dyn Error + Send + Sync>>> + Send + 'a>>
Load
top_k trajectory entries for the given tier filter (e.g. "procedural").Source§fn load_tree_nodes(
&self,
level: u32,
top_k: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemTreeNode>, Box<dyn Error + Send + Sync>>> + Send + '_>>
fn load_tree_nodes( &self, level: u32, top_k: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<MemTreeNode>, Box<dyn Error + Send + Sync>>> + Send + '_>>
Load
top_k memory tree nodes at the given level.Source§fn load_summaries(
&self,
conversation_id: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemSummary>, Box<dyn Error + Send + Sync>>> + Send + '_>>
fn load_summaries( &self, conversation_id: i64, ) -> Pin<Box<dyn Future<Output = Result<Vec<MemSummary>, Box<dyn Error + Send + Sync>>> + Send + '_>>
Load all summaries for the given conversation (raw row ID).
Source§fn retrieve_reasoning_strategies<'a>(
&'a self,
query: &'a str,
top_k: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemReasoningStrategy>, Box<dyn Error + Send + Sync>>> + Send + 'a>>
fn retrieve_reasoning_strategies<'a>( &'a self, query: &'a str, top_k: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<MemReasoningStrategy>, Box<dyn Error + Send + Sync>>> + Send + 'a>>
Retrieve the top-
top_k reasoning strategies for query.Source§fn mark_reasoning_used<'a>(
&'a self,
ids: &'a [String],
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'a>>
fn mark_reasoning_used<'a>( &'a self, ids: &'a [String], ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'a>>
Mark reasoning strategies as used (fire-and-forget; best-effort).
Source§fn retrieve_corrections<'a>(
&'a self,
query: &'a str,
limit: usize,
min_score: f32,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemCorrection>, Box<dyn Error + Send + Sync>>> + Send + 'a>>
fn retrieve_corrections<'a>( &'a self, query: &'a str, limit: usize, min_score: f32, ) -> Pin<Box<dyn Future<Output = Result<Vec<MemCorrection>, Box<dyn Error + Send + Sync>>> + Send + 'a>>
Retrieve corrections similar to
query, up to limit with min_score.Source§fn recall<'a>(
&'a self,
query: &'a str,
limit: usize,
router: Option<&'a dyn AsyncMemoryRouter>,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemRecalledMessage>, Box<dyn Error + Send + Sync>>> + Send + 'a>>
fn recall<'a>( &'a self, query: &'a str, limit: usize, router: Option<&'a dyn AsyncMemoryRouter>, ) -> Pin<Box<dyn Future<Output = Result<Vec<MemRecalledMessage>, Box<dyn Error + Send + Sync>>> + Send + 'a>>
Recall semantically similar messages for
query, up to limit.Source§fn recall_graph_facts<'a>(
&'a self,
query: &'a str,
params: GraphRecallParams<'a>,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemGraphFact>, Box<dyn Error + Send + Sync>>> + Send + 'a>>
fn recall_graph_facts<'a>( &'a self, query: &'a str, params: GraphRecallParams<'a>, ) -> Pin<Box<dyn Future<Output = Result<Vec<MemGraphFact>, Box<dyn Error + Send + Sync>>> + Send + 'a>>
Recall graph facts for
query with view-aware enrichment.Source§fn search_session_summaries<'a>(
&'a self,
query: &'a str,
limit: usize,
current_conversation_id: Option<i64>,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemSessionSummary>, Box<dyn Error + Send + Sync>>> + Send + 'a>>
fn search_session_summaries<'a>( &'a self, query: &'a str, limit: usize, current_conversation_id: Option<i64>, ) -> Pin<Box<dyn Future<Output = Result<Vec<MemSessionSummary>, Box<dyn Error + Send + Sync>>> + Send + 'a>>
Search cross-session summaries for
query, excluding current_conversation_id.Auto Trait Implementations§
impl Freeze for SemanticMemoryBackend
impl !RefUnwindSafe for SemanticMemoryBackend
impl Send for SemanticMemoryBackend
impl Sync for SemanticMemoryBackend
impl Unpin for SemanticMemoryBackend
impl UnsafeUnpin for SemanticMemoryBackend
impl !UnwindSafe for SemanticMemoryBackend
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request