#[non_exhaustive]pub enum RequestDecision {
Proceed,
Modify(Box<ChatRequest>),
Block(String),
}Expand description
Decision returned by AgentHooks::pre_llm_request — an input guardrail
that runs before the outbound llm::ChatRequest is sent to the provider.
This is the place for prompt-injection scrubbing, PII gating, or system-prompt policy enforcement.
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.
Proceed
Send the request unchanged.
Modify(Box<ChatRequest>)
Send a modified request instead of the original.
Block(String)
Refuse to call the model; the string explains why.
Trait Implementations§
Source§impl Clone for RequestDecision
impl Clone for RequestDecision
Source§fn clone(&self) -> RequestDecision
fn clone(&self) -> RequestDecision
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 RequestDecision
impl RefUnwindSafe for RequestDecision
impl Send for RequestDecision
impl Sync for RequestDecision
impl Unpin for RequestDecision
impl UnsafeUnpin for RequestDecision
impl UnwindSafe for RequestDecision
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