pub struct ResponseEvaluator { /* private fields */ }Expand description
Evaluates the agent’s final response against expected output.
Implementations§
Source§impl ResponseEvaluator
impl ResponseEvaluator
Sourcepub fn new(strategy: MatchStrategy) -> Self
pub fn new(strategy: MatchStrategy) -> Self
Create a new response evaluator with the given matching strategy.
Sourcepub fn with_metric_name(self, name: impl Into<String>) -> Self
pub fn with_metric_name(self, name: impl Into<String>) -> Self
Set a custom metric name.
Trait Implementations§
Source§impl Clone for ResponseEvaluator
impl Clone for ResponseEvaluator
Source§fn clone(&self) -> ResponseEvaluator
fn clone(&self) -> ResponseEvaluator
Returns a duplicate of the value. Read more
1.0.0 · 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 ResponseEvaluator
impl Debug for ResponseEvaluator
Source§impl Default for ResponseEvaluator
impl Default for ResponseEvaluator
Source§impl Evaluator for ResponseEvaluator
impl Evaluator for ResponseEvaluator
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 ResponseEvaluator
impl RefUnwindSafe for ResponseEvaluator
impl Send for ResponseEvaluator
impl Sync for ResponseEvaluator
impl Unpin for ResponseEvaluator
impl UnwindSafe for ResponseEvaluator
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