#[non_exhaustive]pub struct PairwiseSummarizationQualityInstance {
pub prediction: Option<String>,
pub baseline_prediction: Option<String>,
pub reference: Option<String>,
pub context: Option<String>,
pub instruction: Option<String>,
/* private fields */
}Available on crate feature
evaluation-service only.Expand description
Spec for pairwise summarization quality instance.
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.prediction: Option<String>Required. Output of the candidate model.
baseline_prediction: Option<String>Required. Output of the baseline model.
reference: Option<String>Optional. Ground truth used to compare against the prediction.
context: Option<String>Required. Text to be summarized.
instruction: Option<String>Required. Summarization prompt for LLM.
Implementations§
Source§impl PairwiseSummarizationQualityInstance
impl PairwiseSummarizationQualityInstance
pub fn new() -> Self
Sourcepub fn set_prediction<T>(self, v: T) -> Self
pub fn set_prediction<T>(self, v: T) -> Self
Sets the value of prediction.
§Example
ⓘ
let x = PairwiseSummarizationQualityInstance::new().set_prediction("example");Sourcepub fn set_or_clear_prediction<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_prediction<T>(self, v: Option<T>) -> Self
Sets or clears the value of prediction.
§Example
ⓘ
let x = PairwiseSummarizationQualityInstance::new().set_or_clear_prediction(Some("example"));
let x = PairwiseSummarizationQualityInstance::new().set_or_clear_prediction(None::<String>);Sourcepub fn set_baseline_prediction<T>(self, v: T) -> Self
pub fn set_baseline_prediction<T>(self, v: T) -> Self
Sets the value of baseline_prediction.
§Example
ⓘ
let x = PairwiseSummarizationQualityInstance::new().set_baseline_prediction("example");Sourcepub fn set_or_clear_baseline_prediction<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_baseline_prediction<T>(self, v: Option<T>) -> Self
Sets or clears the value of baseline_prediction.
§Example
ⓘ
let x = PairwiseSummarizationQualityInstance::new().set_or_clear_baseline_prediction(Some("example"));
let x = PairwiseSummarizationQualityInstance::new().set_or_clear_baseline_prediction(None::<String>);Sourcepub fn set_reference<T>(self, v: T) -> Self
pub fn set_reference<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_reference<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_reference<T>(self, v: Option<T>) -> Self
Sourcepub fn set_context<T>(self, v: T) -> Self
pub fn set_context<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_context<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_context<T>(self, v: Option<T>) -> Self
Sourcepub fn set_instruction<T>(self, v: T) -> Self
pub fn set_instruction<T>(self, v: T) -> Self
Sets the value of instruction.
§Example
ⓘ
let x = PairwiseSummarizationQualityInstance::new().set_instruction("example");Sourcepub fn set_or_clear_instruction<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_instruction<T>(self, v: Option<T>) -> Self
Sets or clears the value of instruction.
§Example
ⓘ
let x = PairwiseSummarizationQualityInstance::new().set_or_clear_instruction(Some("example"));
let x = PairwiseSummarizationQualityInstance::new().set_or_clear_instruction(None::<String>);Trait Implementations§
Source§impl Clone for PairwiseSummarizationQualityInstance
impl Clone for PairwiseSummarizationQualityInstance
Source§fn clone(&self) -> PairwiseSummarizationQualityInstance
fn clone(&self) -> PairwiseSummarizationQualityInstance
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 Default for PairwiseSummarizationQualityInstance
impl Default for PairwiseSummarizationQualityInstance
Source§fn default() -> PairwiseSummarizationQualityInstance
fn default() -> PairwiseSummarizationQualityInstance
Returns the “default value” for a type. Read more
Source§impl PartialEq for PairwiseSummarizationQualityInstance
impl PartialEq for PairwiseSummarizationQualityInstance
Source§fn eq(&self, other: &PairwiseSummarizationQualityInstance) -> bool
fn eq(&self, other: &PairwiseSummarizationQualityInstance) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PairwiseSummarizationQualityInstance
Auto Trait Implementations§
impl Freeze for PairwiseSummarizationQualityInstance
impl RefUnwindSafe for PairwiseSummarizationQualityInstance
impl Send for PairwiseSummarizationQualityInstance
impl Sync for PairwiseSummarizationQualityInstance
impl Unpin for PairwiseSummarizationQualityInstance
impl UnwindSafe for PairwiseSummarizationQualityInstance
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