pub enum ModelDecision {
Accept,
Reject {
message: String,
},
Stop {
reason: String,
},
}Expand description
What an after_model hook decides about a response.
Variants§
Accept
Carry on with the response as the hooks left it.
Reject
Do not act on this response: none of its tool calls run and it is
not a final answer. Its text stays in the transcript, so the model
can see what it is correcting, followed by message, and another
turn runs. To keep the text from the model, clear it first.
Stop
End the run now with crate::RunStatus::Stopped: none of the
response’s tool calls run and it is not recorded. For a hook that
knows nothing more may happen, such as a spent budget.
Trait Implementations§
Source§impl Clone for ModelDecision
impl Clone for ModelDecision
Source§fn clone(&self) -> ModelDecision
fn clone(&self) -> ModelDecision
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 ModelDecision
impl Debug for ModelDecision
Source§impl PartialEq for ModelDecision
impl PartialEq for ModelDecision
impl StructuralPartialEq for ModelDecision
Auto Trait Implementations§
impl Forget for ModelDecision
impl Freeze for ModelDecision
impl Move for ModelDecision
impl RefUnwindSafe for ModelDecision
impl Send for ModelDecisionwhere
RawVecInner: Send,
impl Sync for ModelDecisionwhere
RawVecInner: Sync,
impl Unpin for ModelDecision
impl UnsafeUnpin for ModelDecision
impl UnwindSafe for ModelDecisionwhere
RawVecInner: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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