#[non_exhaustive]pub struct SemanticSimilarityMetricScore {
pub score: f64,
}Available on crate feature
experimental only.Expand description
The scoring metric used for SemanticSimilarityMetric.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.score: f64Trait Implementations§
Source§impl Clone for SemanticSimilarityMetricScore
impl Clone for SemanticSimilarityMetricScore
Source§fn clone(&self) -> SemanticSimilarityMetricScore
fn clone(&self) -> SemanticSimilarityMetricScore
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<'de> Deserialize<'de> for SemanticSimilarityMetricScore
impl<'de> Deserialize<'de> for SemanticSimilarityMetricScore
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<E> Eval<SemanticSimilarityMetricScore> for SemanticSimilarityMetric<E>where
E: EmbeddingModel + 'static,
impl<E> Eval<SemanticSimilarityMetricScore> for SemanticSimilarityMetric<E>where
E: EmbeddingModel + 'static,
async fn eval( &self, input: String, ) -> EvalOutcome<SemanticSimilarityMetricScore>
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 Freeze for SemanticSimilarityMetricScore
impl RefUnwindSafe for SemanticSimilarityMetricScore
impl Send for SemanticSimilarityMetricScore
impl Sync for SemanticSimilarityMetricScore
impl Unpin for SemanticSimilarityMetricScore
impl UnwindSafe for SemanticSimilarityMetricScore
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> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
impl<T> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
fn clone_storage(&self) -> Box<dyn CloneDebuggableStorage>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CloneableStorage for T
impl<T> CloneableStorage for T
fn clone_storage(&self) -> Box<dyn CloneableStorage>
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