pub enum ModelTurnAction {
Continue,
Retry(RetryRequest),
Stop(String),
}Expand description
Action for the medium-neutral ModelTurnFinished event.
Every retry consumes the run’s existing total model-call budget. Rig does
not impose a separate response-retry limit; hooks that need one should keep
run-scoped state in HookContext::scratchpad. Retrying a turn containing
tool calls is rejected so provider-visible history never contains unanswered
calls. Use tool-call hooks to steer those turns instead.
Variants§
Continue
Accept the turn and continue the run.
Retry(RetryRequest)
Reject the turn and request another model call.
Stop(String)
Stop the run with a reason.
Implementations§
Source§impl ModelTurnAction
impl ModelTurnAction
Sourcepub fn continue_run() -> Self
pub fn continue_run() -> Self
Accepts the completed model turn.
Sourcepub fn repeat() -> Self
pub fn repeat() -> Self
Discards the response and reuses the same prompt and preceding history with fresh request preparation.
Sourcepub fn retry_with_feedback(feedback: impl Into<String>) -> Self
pub fn retry_with_feedback(feedback: impl Into<String>) -> Self
Preserves the response, appends corrective feedback, and retries.
Trait Implementations§
Source§impl Clone for ModelTurnAction
impl Clone for ModelTurnAction
Source§fn clone(&self) -> ModelTurnAction
fn clone(&self) -> ModelTurnAction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModelTurnAction
impl Debug for ModelTurnAction
impl Eq for ModelTurnAction
Source§impl PartialEq for ModelTurnAction
impl PartialEq for ModelTurnAction
impl StructuralPartialEq for ModelTurnAction
Auto Trait Implementations§
impl Freeze for ModelTurnAction
impl RefUnwindSafe for ModelTurnAction
impl Send for ModelTurnAction
impl Sync for ModelTurnAction
impl Unpin for ModelTurnAction
impl UnsafeUnpin for ModelTurnAction
impl UnwindSafe for ModelTurnAction
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
impl<T> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
fn clone_storage(&self) -> Box<dyn CloneDebuggableStorage>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CloneableStorage for T
impl<T> CloneableStorage for T
fn clone_storage(&self) -> Box<dyn CloneableStorage>
impl<T> DebuggableStorage for T
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§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
Compare self to
key and return true if they are equal.