pub enum ModelTurnOutcome {
Continue {
response_hook_suppressed: bool,
},
NeedsResolution(InvalidToolCallContext),
TurnRetried,
}Expand description
Result of feeding a model turn (or an invalid tool-call resolution) into the machine.
Deliberately exhaustive: a driver must handle every outcome, so adding a variant is a breaking change by design.
Variants§
Continue
The turn was accepted. Unless response_hook_suppressed is set, the
driver should run its completion-response hook now, then call
AgentRun::next_step.
response_hook_suppressed is set when invalid tool-call recovery
(repair or skip) modified the turn, matching the agent loop’s behavior
of not invoking on_completion_response for recovered turns.
Fields
NeedsResolution(InvalidToolCallContext)
The model emitted a tool call that is unknown or disallowed for this
turn. The driver must decide how to recover (typically by asking its
invalid tool-call hook) and answer via
AgentRun::resolve_invalid_tool_call.
TurnRetried
The turn was rolled back with corrective feedback appended to the
history. Call AgentRun::next_step to obtain the retry
AgentRunStep::CallModel.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ModelTurnOutcome
impl RefUnwindSafe for ModelTurnOutcome
impl Send for ModelTurnOutcome
impl Sync for ModelTurnOutcome
impl Unpin for ModelTurnOutcome
impl UnsafeUnpin for ModelTurnOutcome
impl UnwindSafe for ModelTurnOutcome
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> DebuggableStorage for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more