Expand description
Context compaction for long conversations
This module provides functionality to compact conversation history when it becomes too large, using the LLM itself to summarize older messages.
Structs§
- Compacted
Context - Result of context compaction
- Compaction
Config - Compaction configuration for LLM-based compaction
- Compaction
Manager - Context manager that handles compaction automatically
- Compaction
Metadata - Metadata about a compaction operation
- LlmCompactor
- LLM-based compactor that uses the model itself to summarize
- Noop
Context Transformer - A no-op transformer that returns the context unchanged.
Enums§
- Compaction
Error - Error type for compaction operations
- Compaction
Strategy - Compaction strategy determining when to compact
Traits§
- Compactor
- Trait for context compaction implementations
- Context
Transformer - Context transformer — applied before provider stream call.
Functions§
- generate_
branch_ summary - Generate a concise summary of the last N conversation messages.
Type Aliases§
- Frame
Bag - Rendered snapcompact PNG frames:
(frame_index, png_bytes).