pub struct EmbeddingMemory { /* private fields */ }Expand description
Decorator that generates embeddings on store and passes through to inner Memory.
When storing a MemoryEntry without an embedding, this wrapper generates
one via the configured EmbeddingProvider before delegating to the inner store.
All other operations pass through unchanged.
Implementations§
Trait Implementations§
Source§impl Memory for EmbeddingMemory
impl Memory for EmbeddingMemory
Source§fn store(
&self,
scope: &TenantScope,
entry: MemoryEntry,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + '_>>
fn store( &self, scope: &TenantScope, entry: MemoryEntry, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + '_>>
Source§fn recall(
&self,
scope: &TenantScope,
query: MemoryQuery,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryEntry>, Error>> + Send + '_>>
fn recall( &self, scope: &TenantScope, query: MemoryQuery, ) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryEntry>, Error>> + Send + '_>>
fn update( &self, scope: &TenantScope, id: &str, content: String, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + '_>>
fn forget( &self, scope: &TenantScope, id: &str, ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + '_>>
Auto Trait Implementations§
impl Freeze for EmbeddingMemory
impl !RefUnwindSafe for EmbeddingMemory
impl Send for EmbeddingMemory
impl Sync for EmbeddingMemory
impl Unpin for EmbeddingMemory
impl UnsafeUnpin for EmbeddingMemory
impl !UnwindSafe for EmbeddingMemory
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