Expand description
LLM-based context summarization.
When the conversation grows beyond the context window, older messages are summarized into a compact representation to preserve important context while reducing token usage.
Structs§
- Context
Summarizer - Generates summaries of conversation history using the LLM.
- Context
Summary - Summary of conversation context for compression.
- Token
Cost Display - Token and cost tracking display data.
Enums§
- Summarize
Error - Errors during summarization.
- Token
Alert - Token budget alerts.
Functions§
- smart_
fallback_ summary - Smart fallback summary that preserves structured information when LLM-based summarization fails. Instead of naive truncation, it extracts tool names, results, and preserves the first/last messages for continuity.