pub struct LlmSummarizer { /* private fields */ }Expand description
LLM-based summarizer that calls the current session’s model to generate a rich summary of compressed/removed messages.
Falls back to HeuristicSummarizer if the LLM call fails.
Implementations§
Source§impl LlmSummarizer
impl LlmSummarizer
pub fn new( llm: Arc<dyn LLMProvider>, model: String, existing_summary: Option<String>, task_list_prompt: Option<String>, ) -> Self
pub fn with_context_blocks(self, context_blocks: Vec<ContextBlock>) -> Self
pub fn with_custom_instructions(self, instructions: Option<String>) -> Self
pub fn with_summary_mode(self, mode: SummaryMode) -> Self
Trait Implementations§
Source§impl Debug for LlmSummarizer
impl Debug for LlmSummarizer
Source§impl Summarizer for LlmSummarizer
impl Summarizer for LlmSummarizer
Auto Trait Implementations§
impl !RefUnwindSafe for LlmSummarizer
impl !UnwindSafe for LlmSummarizer
impl Freeze for LlmSummarizer
impl Send for LlmSummarizer
impl Sync for LlmSummarizer
impl Unpin for LlmSummarizer
impl UnsafeUnpin for LlmSummarizer
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