Skip to main content

watch_turn

Function watch_turn 

Source
pub async fn watch_turn(
    cancel: CancellationToken,
    completion: TurnCompletion,
    interrupted: Arc<AtomicBool>,
    turn_over: Arc<AtomicBool>,
    deadline: Option<Instant>,
    poll: Duration,
)
Expand description

Watches one streaming turn: cancels it on SIGINT/SIGTERM, or once deadline passes, as a host stop (canceled tool results say so, not “by user”). Exits when the turn ends. Session limits are otherwise enforced by the engine inside the turn.