pub struct SafetyEvaluator { /* private fields */ }Expand description
Evaluates agent responses for safety violations.
Uses configurable heuristics to detect potential safety issues in model outputs. The threshold determines the minimum safety score required to pass (scores below the threshold indicate safety concerns).
Implementations§
Trait Implementations§
Source§impl Default for SafetyEvaluator
impl Default for SafetyEvaluator
Source§impl Evaluator for SafetyEvaluator
impl Evaluator for SafetyEvaluator
Source§fn evaluate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
actual: &'life1 [Invocation],
_expected: Option<&'life2 [Invocation]>,
) -> Pin<Box<dyn Future<Output = Result<EvalResult, EvalError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn evaluate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
actual: &'life1 [Invocation],
_expected: Option<&'life2 [Invocation]>,
) -> Pin<Box<dyn Future<Output = Result<EvalResult, EvalError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Evaluate agent invocations. Read more
Auto Trait Implementations§
impl Freeze for SafetyEvaluator
impl RefUnwindSafe for SafetyEvaluator
impl Send for SafetyEvaluator
impl Sync for SafetyEvaluator
impl Unpin for SafetyEvaluator
impl UnwindSafe for SafetyEvaluator
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