Skip to main content

needs_continuation

Function needs_continuation 

Source
pub fn needs_continuation(items: &[Item]) -> bool
Expand description

Whether a projection ends on the model’s turn to speak (M4/#8): the last item is a user prompt or a batch of tool results the model never answered — i.e. an interrupted turn worth continuing on resume. A projection ending in an assistant item (or holding only instructions) is complete.