pub enum TurnKind {
Acts,
Answers,
Truncated,
Stalled,
}Expand description
What one finished model turn amounts to.
Every decision about “what does this response mean” is made here, once, and the loop acts on the result. Before this existed the same question was answered in several places, and each new shape of response (a turn cut off at the token limit, a turn that only thought) was a fresh bug: the one place that forgot about it let the turn through as a finished answer.
A stream cut mid-turn never gets here: it is a transport error, retried in
model_call before there is an output to classify.
Variants§
Acts
It asked for tools. The only kind that moves the work forward.
Answers
It stopped with text. A candidate answer, still subject to acceptance.
Truncated
The provider cut it off at the output-token limit with no tool call. Whatever came out is not the model saying “done”.
Stalled
It stopped by itself with reasoning only, or with nothing at all. Never an answer, however the acceptance set is configured.
Implementations§
Trait Implementations§
impl Copy for TurnKind
impl Eq for TurnKind
impl StructuralPartialEq for TurnKind
Auto Trait Implementations§
impl Forget for TurnKind
impl Freeze for TurnKind
impl RefUnwindSafe for TurnKind
impl Send for TurnKind
impl Sync for TurnKind
impl Unpin for TurnKind
impl UnsafeUnpin for TurnKind
impl UnwindSafe for TurnKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.