Skip to main content

cut_for_policy

Function cut_for_policy 

Source
pub fn cut_for_policy(ctx: &[AgentMessage], policy: &CompactionPolicy) -> usize
Expand description

Cut for policy: keep the newest messages up to keep_recent_tokens but never fewer than keep_recent_turns turns, made tool-safe by safe_cut.