Skip to main content

should_compact

Function should_compact 

Source
pub fn should_compact(
    messages: &[Message],
    compact_at_tokens: u64,
    tool_overhead_tokens: u64,
) -> bool
Expand description

Returns true if compaction should fire. Fires when estimate_tokens(messages) + tool_overhead_tokens >= compact_at_tokens.