Skip to main content

should_continue_turn

Function should_continue_turn 

Source
pub fn should_continue_turn(
    turn_tokens: u64,
    total_budget: Option<u64>,
    consecutive_low_progress_turns: u32,
) -> bool
Expand description

Continuation check for token budget during multi-turn execution.

After each turn, decide whether to continue based on how many tokens were consumed and whether progress is diminishing.