#[non_exhaustive]pub struct LlmScoreMetric<M>where
M: CompletionModel,{ /* private fields */ }Available on crate feature
experimental only.Expand description
An eval that scores an output based on some given criteria.
Trait Implementations§
Source§impl<M> Eval<LlmScoreMetricScore> for LlmScoreMetric<M>where
M: CompletionModel + 'static,
impl<M> Eval<LlmScoreMetricScore> for LlmScoreMetric<M>where
M: CompletionModel + 'static,
async fn eval(&self, input: String) -> EvalOutcome<LlmScoreMetricScore>
Source§fn eval_batch(
&self,
input: Vec<String>,
concurrency_limit: usize,
) -> impl Future<Output = Vec<EvalOutcome<Output>>> + Send
fn eval_batch( &self, input: Vec<String>, concurrency_limit: usize, ) -> impl Future<Output = Vec<EvalOutcome<Output>>> + Send
Send a bunch of inputs to be evaluated all in one call.
You can set the concurrency limit to help alleviate issues
with model provider API limits, as sending requests too quickly may
result in throttling or temporary request refusal.
Auto Trait Implementations§
impl<M> Freeze for LlmScoreMetric<M>
impl<M> !RefUnwindSafe for LlmScoreMetric<M>
impl<M> Send for LlmScoreMetric<M>
impl<M> Sync for LlmScoreMetric<M>
impl<M> Unpin for LlmScoreMetric<M>
impl<M> !UnwindSafe for LlmScoreMetric<M>
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> 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> 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