#[non_exhaustive]pub struct SanitizeModelResponseRequest {
pub name: String,
pub model_response_data: Option<DataItem>,
pub user_prompt: String,
pub multi_language_detection_metadata: Option<MultiLanguageDetectionMetadata>,
/* private fields */
}Expand description
Sanitize Model Response request.
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.name: StringRequired. Represents resource name of template e.g. name=projects/sample-project/locations/us-central1/templates/templ01
model_response_data: Option<DataItem>Required. Model response data to sanitize.
user_prompt: StringOptional. User Prompt associated with Model response.
multi_language_detection_metadata: Option<MultiLanguageDetectionMetadata>Optional. Metadata related for multi language detection.
Implementations§
Source§impl SanitizeModelResponseRequest
impl SanitizeModelResponseRequest
pub fn new() -> Self
Sourcepub fn set_model_response_data<T>(self, v: T) -> Self
pub fn set_model_response_data<T>(self, v: T) -> Self
Sets the value of model_response_data.
Sourcepub fn set_or_clear_model_response_data<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_model_response_data<T>(self, v: Option<T>) -> Self
Sets or clears the value of model_response_data.
Sourcepub fn set_user_prompt<T: Into<String>>(self, v: T) -> Self
pub fn set_user_prompt<T: Into<String>>(self, v: T) -> Self
Sets the value of user_prompt.
Sourcepub fn set_multi_language_detection_metadata<T>(self, v: T) -> Selfwhere
T: Into<MultiLanguageDetectionMetadata>,
pub fn set_multi_language_detection_metadata<T>(self, v: T) -> Selfwhere
T: Into<MultiLanguageDetectionMetadata>,
Sets the value of multi_language_detection_metadata.
Sourcepub fn set_or_clear_multi_language_detection_metadata<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<MultiLanguageDetectionMetadata>,
pub fn set_or_clear_multi_language_detection_metadata<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<MultiLanguageDetectionMetadata>,
Sets or clears the value of multi_language_detection_metadata.
Trait Implementations§
Source§impl Clone for SanitizeModelResponseRequest
impl Clone for SanitizeModelResponseRequest
Source§fn clone(&self) -> SanitizeModelResponseRequest
fn clone(&self) -> SanitizeModelResponseRequest
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 SanitizeModelResponseRequest
impl Debug for SanitizeModelResponseRequest
Source§impl Default for SanitizeModelResponseRequest
impl Default for SanitizeModelResponseRequest
Source§fn default() -> SanitizeModelResponseRequest
fn default() -> SanitizeModelResponseRequest
Returns the “default value” for a type. Read more
Source§impl PartialEq for SanitizeModelResponseRequest
impl PartialEq for SanitizeModelResponseRequest
Source§fn eq(&self, other: &SanitizeModelResponseRequest) -> bool
fn eq(&self, other: &SanitizeModelResponseRequest) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SanitizeModelResponseRequest
Auto Trait Implementations§
impl Freeze for SanitizeModelResponseRequest
impl RefUnwindSafe for SanitizeModelResponseRequest
impl Send for SanitizeModelResponseRequest
impl Sync for SanitizeModelResponseRequest
impl Unpin for SanitizeModelResponseRequest
impl UnwindSafe for SanitizeModelResponseRequest
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