pub struct LlmMemoryExtractor<M: BaseChatModel + Send + Sync> { /* private fields */ }Expand description
lc_memory::MemoryExtractor backed by any chat model.
Implementations§
Source§impl<M: BaseChatModel + Send + Sync> LlmMemoryExtractor<M>
impl<M: BaseChatModel + Send + Sync> LlmMemoryExtractor<M>
Sourcepub fn from_model(model: M) -> Self
pub fn from_model(model: M) -> Self
Wraps an owned model.
Trait Implementations§
Source§impl<M> MemoryExtractor for LlmMemoryExtractor<M>
impl<M> MemoryExtractor for LlmMemoryExtractor<M>
Source§fn extract<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
user_input: &'life2 str,
assistant_output: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryItem>, MemoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn extract<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
user_input: &'life2 str,
assistant_output: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryItem>, MemoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Extracts zero or more memories from one user/assistant exchange.
Auto Trait Implementations§
impl<M> Freeze for LlmMemoryExtractor<M>
impl<M> RefUnwindSafe for LlmMemoryExtractor<M>where
Arc<M>: RefUnwindSafe,
impl<M> Send for LlmMemoryExtractor<M>
impl<M> Sync for LlmMemoryExtractor<M>
impl<M> Unpin for LlmMemoryExtractor<M>
impl<M> UnsafeUnpin for LlmMemoryExtractor<M>where
Arc<M>: UnsafeUnpin,
impl<M> UnwindSafe for LlmMemoryExtractor<M>where
Arc<M>: UnwindSafe,
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