Expand description
History-level compaction: summarises old messages to keep token usage under budget.
Implementations of HistoryCompactionStrategy decide whether and how to shorten
the conversation. The default SummaryHistoryCompaction asks the model to
summarise older turns in a single pass, then keeps that summary plus the most
recent context.
Structs§
- Summary
History Compaction - Compacts by asking the model to summarise old messages, keeping the most recent N.
Traits§
- History
Compaction Strategy - Strategy for compacting conversation history when tokens exceed a budget.