pub struct Memory<'a> { /* private fields */ }Implementations§
Source§impl Memory<'_>
impl Memory<'_>
pub async fn remember( &self, content: &str, vector: Option<Vec<f64>>, tags: Option<Vec<String>>, importance: Option<f64>, idempotency_key: Option<&str>, ) -> Result<MemoryOperationResponse, Box<dyn StdError + Send + Sync>>
pub async fn recall( &self, query: &str, limit: Option<i32>, vector: Option<Vec<f64>>, ) -> Result<RecallResponseModel, Box<dyn StdError + Send + Sync>>
pub async fn get( &self, memory_id: &str, ) -> Result<MemoryRow, Box<dyn StdError + Send + Sync>>
Sourcepub fn list(&self, limit: i32) -> MemoryList<'_>
pub fn list(&self, limit: i32) -> MemoryList<'_>
Auto-paginating cursor iterator. Call next until it returns None.
pub async fn status( &self, ) -> Result<MemoryStatusResponse, Box<dyn StdError + Send + Sync>>
pub async fn forget( &self, memory_id: &str, purge: bool, ) -> Result<ResponseForgetmemory, Box<dyn StdError + Send + Sync>>
pub async fn remember_batch( &self, items: Vec<Value>, idempotency_key: Option<&str>, ) -> Result<BatchRememberResponse, Box<dyn StdError + Send + Sync>>
pub async fn recall_federated( &self, query: &str, limit: Option<i32>, ) -> Result<Vec<FederatedRecallCandidate>, Box<dyn StdError + Send + Sync>>
pub async fn update( &self, memory_id: &str, request: UpdateMemoryRequest, ) -> Result<MemoryRow, Box<dyn StdError + Send + Sync>>
pub async fn reinforce( &self, memory_id: &str, delta: f64, ) -> Result<ReinforceResponse, Box<dyn StdError + Send + Sync>>
pub async fn reflect( &self, namespace: Option<&str>, ) -> Result<ReflectResponse, Box<dyn StdError + Send + Sync>>
pub async fn why_not( &self, memory_id: &str, query: &str, ) -> Result<WhyNotResponse, Box<dyn StdError + Send + Sync>>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Memory<'a>
impl<'a> !UnwindSafe for Memory<'a>
impl<'a> Freeze for Memory<'a>
impl<'a> Send for Memory<'a>
impl<'a> Sync for Memory<'a>
impl<'a> Unpin for Memory<'a>
impl<'a> UnsafeUnpin for Memory<'a>
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