#[non_exhaustive]pub struct PairwiseMetricSpec {
pub metric_prompt_template: Option<String>,
/* private fields */
}Available on crate feature
evaluation-service only.Expand description
Spec for pairwise metric.
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.metric_prompt_template: Option<String>Required. Metric prompt template for pairwise metric.
Implementations§
Source§impl PairwiseMetricSpec
impl PairwiseMetricSpec
pub fn new() -> Self
Sourcepub fn set_metric_prompt_template<T>(self, v: T) -> Self
pub fn set_metric_prompt_template<T>(self, v: T) -> Self
Sets the value of metric_prompt_template.
§Example
ⓘ
let x = PairwiseMetricSpec::new().set_metric_prompt_template("example");Sourcepub fn set_or_clear_metric_prompt_template<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_metric_prompt_template<T>(self, v: Option<T>) -> Self
Sets or clears the value of metric_prompt_template.
§Example
ⓘ
let x = PairwiseMetricSpec::new().set_or_clear_metric_prompt_template(Some("example"));
let x = PairwiseMetricSpec::new().set_or_clear_metric_prompt_template(None::<String>);Trait Implementations§
Source§impl Clone for PairwiseMetricSpec
impl Clone for PairwiseMetricSpec
Source§fn clone(&self) -> PairwiseMetricSpec
fn clone(&self) -> PairwiseMetricSpec
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 PairwiseMetricSpec
impl Debug for PairwiseMetricSpec
Source§impl Default for PairwiseMetricSpec
impl Default for PairwiseMetricSpec
Source§fn default() -> PairwiseMetricSpec
fn default() -> PairwiseMetricSpec
Returns the “default value” for a type. Read more
Source§impl Message for PairwiseMetricSpec
impl Message for PairwiseMetricSpec
Source§impl PartialEq for PairwiseMetricSpec
impl PartialEq for PairwiseMetricSpec
impl StructuralPartialEq for PairwiseMetricSpec
Auto Trait Implementations§
impl Freeze for PairwiseMetricSpec
impl RefUnwindSafe for PairwiseMetricSpec
impl Send for PairwiseMetricSpec
impl Sync for PairwiseMetricSpec
impl Unpin for PairwiseMetricSpec
impl UnwindSafe for PairwiseMetricSpec
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