pub struct DeterministicExtractiveSessionSummarizer { /* private fields */ }Expand description
Provider-neutral fallback compaction strategy. It does not invent facts or call a model: whole replay groups are ranked by overlap with required Context, then copied into a bounded, explicitly untrusted transcript.
Implementations§
Source§impl DeterministicExtractiveSessionSummarizer
impl DeterministicExtractiveSessionSummarizer
pub fn new(max_summary_chars: usize) -> Result<Self, SessionContextError>
pub fn max_summary_chars(&self) -> usize
Trait Implementations§
Source§impl AgentSessionSummarizer for DeterministicExtractiveSessionSummarizer
impl AgentSessionSummarizer for DeterministicExtractiveSessionSummarizer
fn descriptor(&self) -> SessionSummarizerDescriptor
Source§fn summarize_with_char_budget<'life0, 'async_trait>(
&'life0 self,
input: SessionCompactionInput,
max_chars: usize,
) -> Pin<Box<dyn Future<Output = Result<ModelMessage, SessionContextError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn summarize_with_char_budget<'life0, 'async_trait>(
&'life0 self,
input: SessionCompactionInput,
max_chars: usize,
) -> Pin<Box<dyn Future<Output = Result<ModelMessage, SessionContextError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
A size hint for pressure compaction, including the summary’s framing
text. The runtime still meters the complete candidate model input and
never commits a summary that increases its context use. Implementations
that do not support adaptive summaries may return their normal result.
fn summarize<'life0, 'async_trait>(
&'life0 self,
input: SessionCompactionInput,
) -> Pin<Box<dyn Future<Output = Result<ModelMessage, SessionContextError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl Freeze for DeterministicExtractiveSessionSummarizer
impl RefUnwindSafe for DeterministicExtractiveSessionSummarizer
impl Send for DeterministicExtractiveSessionSummarizer
impl Sync for DeterministicExtractiveSessionSummarizer
impl Unpin for DeterministicExtractiveSessionSummarizer
impl UnsafeUnpin for DeterministicExtractiveSessionSummarizer
impl UnwindSafe for DeterministicExtractiveSessionSummarizer
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.