#[non_exhaustive]pub enum ResponseDecision {
Accept,
Block(String),
RetryWithFeedback(String),
}Expand description
Decision returned by AgentHooks::on_llm_response — an output guardrail
that runs after the provider responds but before the response is persisted
and surfaced.
This is the place for output moderation or secret-leakage detection.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Accept
Accept the response as-is.
Block(String)
Reject the response; the string explains why.
RetryWithFeedback(String)
Reject the response and feed the string back to the model so it can retry on the next turn.
Trait Implementations§
Source§impl Clone for ResponseDecision
impl Clone for ResponseDecision
Source§fn clone(&self) -> ResponseDecision
fn clone(&self) -> ResponseDecision
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 moreAuto Trait Implementations§
impl Freeze for ResponseDecision
impl RefUnwindSafe for ResponseDecision
impl Send for ResponseDecision
impl Sync for ResponseDecision
impl Unpin for ResponseDecision
impl UnsafeUnpin for ResponseDecision
impl UnwindSafe for ResponseDecision
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