pub struct MemoryManager { /* private fields */ }Implementations§
Source§impl MemoryManager
impl MemoryManager
pub async fn new(longterm_path: impl AsRef<Path>) -> Result<Self>
pub async fn with_threshold( longterm_path: impl AsRef<Path>, token_threshold: usize, ) -> Result<Self>
pub async fn load(&mut self) -> Result<()>
pub async fn record(&mut self, message: Message) -> Result<()>
pub async fn recall( &self, query: &str, limit: usize, ) -> Result<Vec<CompressedEntry>>
pub async fn get_context(&self, query: &str) -> Result<String>
pub async fn flush(&mut self) -> Result<()>
pub async fn clear_session(&mut self)
pub async fn stats(&self) -> Result<MemoryStats>
Auto Trait Implementations§
impl Freeze for MemoryManager
impl RefUnwindSafe for MemoryManager
impl Send for MemoryManager
impl Sync for MemoryManager
impl Unpin for MemoryManager
impl UnsafeUnpin for MemoryManager
impl UnwindSafe 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