pub struct ModelCompactor { /* private fields */ }Expand description
Default Compactor that asks the same model for a structured summary through a durable provider attempt.
Implementations§
Trait Implementations§
Source§impl Compactor for ModelCompactor
impl Compactor for ModelCompactor
Source§fn summarize<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
model: &'life1 str,
messages: &'life2 [ChatMessage],
operation_id: &'life3 str,
cancellation: CancellationToken,
deadline: Instant,
) -> Pin<Box<dyn Future<Output = Result<CompactionResult, RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn summarize<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
model: &'life1 str,
messages: &'life2 [ChatMessage],
operation_id: &'life3 str,
cancellation: CancellationToken,
deadline: Instant,
) -> Pin<Box<dyn Future<Output = Result<CompactionResult, RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Summarize
transcript, returning the summary and the usage it cost.Auto Trait Implementations§
impl !RefUnwindSafe for ModelCompactor
impl !UnwindSafe for ModelCompactor
impl Freeze for ModelCompactor
impl Send for ModelCompactor
impl Sync for ModelCompactor
impl Unpin for ModelCompactor
impl UnsafeUnpin for ModelCompactor
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