#[non_exhaustive]pub struct AutoraterConfig {
pub sampling_count: Option<i32>,
pub flip_enabled: Option<bool>,
pub autorater_model: String,
pub generation_config: Option<GenerationConfig>,
/* private fields */
}gen-ai-tuning-service only.Expand description
The configs for autorater. This is applicable to both EvaluateInstances and EvaluateDataset.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.sampling_count: Option<i32>Optional. Number of samples for each instance in the dataset. If not specified, the default is 4. Minimum value is 1, maximum value is 32.
flip_enabled: Option<bool>Optional. Default is true. Whether to flip the candidate and baseline responses. This is only applicable to the pairwise metric. If enabled, also provide PairwiseMetricSpec.candidate_response_field_name and PairwiseMetricSpec.baseline_response_field_name. When rendering PairwiseMetricSpec.metric_prompt_template, the candidate and baseline fields will be flipped for half of the samples to reduce bias.
autorater_model: StringOptional. The fully qualified name of the publisher model or tuned autorater endpoint to use.
Publisher model format:
projects/{project}/locations/{location}/publishers/*/models/*
Tuned model endpoint format:
projects/{project}/locations/{location}/endpoints/{endpoint}
generation_config: Option<GenerationConfig>Optional. Configuration options for model generation and outputs.
Implementations§
Source§impl AutoraterConfig
impl AutoraterConfig
Sourcepub fn set_sampling_count<T>(self, v: T) -> Self
pub fn set_sampling_count<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_sampling_count<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_sampling_count<T>(self, v: Option<T>) -> Self
Sets or clears the value of sampling_count.
§Example
let x = AutoraterConfig::new().set_or_clear_sampling_count(Some(42));
let x = AutoraterConfig::new().set_or_clear_sampling_count(None::<i32>);Sourcepub fn set_flip_enabled<T>(self, v: T) -> Self
pub fn set_flip_enabled<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_flip_enabled<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_flip_enabled<T>(self, v: Option<T>) -> Self
Sets or clears the value of flip_enabled.
§Example
let x = AutoraterConfig::new().set_or_clear_flip_enabled(Some(false));
let x = AutoraterConfig::new().set_or_clear_flip_enabled(None::<bool>);Sourcepub fn set_autorater_model<T: Into<String>>(self, v: T) -> Self
pub fn set_autorater_model<T: Into<String>>(self, v: T) -> Self
Sets the value of autorater_model.
§Example
let x = AutoraterConfig::new().set_autorater_model("example");Sourcepub fn set_generation_config<T>(self, v: T) -> Selfwhere
T: Into<GenerationConfig>,
pub fn set_generation_config<T>(self, v: T) -> Selfwhere
T: Into<GenerationConfig>,
Sets the value of generation_config.
§Example
use google_cloud_aiplatform_v1::model::GenerationConfig;
let x = AutoraterConfig::new().set_generation_config(GenerationConfig::default()/* use setters */);Sourcepub fn set_or_clear_generation_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<GenerationConfig>,
pub fn set_or_clear_generation_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<GenerationConfig>,
Sets or clears the value of generation_config.
§Example
use google_cloud_aiplatform_v1::model::GenerationConfig;
let x = AutoraterConfig::new().set_or_clear_generation_config(Some(GenerationConfig::default()/* use setters */));
let x = AutoraterConfig::new().set_or_clear_generation_config(None::<GenerationConfig>);Trait Implementations§
Source§impl Clone for AutoraterConfig
impl Clone for AutoraterConfig
Source§fn clone(&self) -> AutoraterConfig
fn clone(&self) -> AutoraterConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AutoraterConfig
impl Debug for AutoraterConfig
Source§impl Default for AutoraterConfig
impl Default for AutoraterConfig
Source§fn default() -> AutoraterConfig
fn default() -> AutoraterConfig
Source§impl Message for AutoraterConfig
impl Message for AutoraterConfig
Source§impl PartialEq for AutoraterConfig
impl PartialEq for AutoraterConfig
impl StructuralPartialEq for AutoraterConfig
Auto Trait Implementations§
impl Freeze for AutoraterConfig
impl RefUnwindSafe for AutoraterConfig
impl Send for AutoraterConfig
impl Sync for AutoraterConfig
impl Unpin for AutoraterConfig
impl UnsafeUnpin for AutoraterConfig
impl UnwindSafe for AutoraterConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request