#[non_exhaustive]pub struct ModelArmorConfig {
pub prompt_template_name: String,
pub response_template_name: String,
/* private fields */
}Available on crate feature
prediction-service only.Expand description
Configuration for Model Armor integrations of prompt and responses.
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.prompt_template_name: StringOptional. The name of the Model Armor template to use for prompt sanitization.
response_template_name: StringOptional. The name of the Model Armor template to use for response sanitization.
Implementations§
Source§impl ModelArmorConfig
impl ModelArmorConfig
pub fn new() -> Self
Sourcepub fn set_prompt_template_name<T: Into<String>>(self, v: T) -> Self
pub fn set_prompt_template_name<T: Into<String>>(self, v: T) -> Self
Sets the value of prompt_template_name.
Sourcepub fn set_response_template_name<T: Into<String>>(self, v: T) -> Self
pub fn set_response_template_name<T: Into<String>>(self, v: T) -> Self
Sets the value of response_template_name.
Trait Implementations§
Source§impl Clone for ModelArmorConfig
impl Clone for ModelArmorConfig
Source§fn clone(&self) -> ModelArmorConfig
fn clone(&self) -> ModelArmorConfig
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 ModelArmorConfig
impl Debug for ModelArmorConfig
Source§impl Default for ModelArmorConfig
impl Default for ModelArmorConfig
Source§fn default() -> ModelArmorConfig
fn default() -> ModelArmorConfig
Returns the “default value” for a type. Read more
Source§impl Message for ModelArmorConfig
impl Message for ModelArmorConfig
Source§impl PartialEq for ModelArmorConfig
impl PartialEq for ModelArmorConfig
impl StructuralPartialEq for ModelArmorConfig
Auto Trait Implementations§
impl Freeze for ModelArmorConfig
impl RefUnwindSafe for ModelArmorConfig
impl Send for ModelArmorConfig
impl Sync for ModelArmorConfig
impl Unpin for ModelArmorConfig
impl UnwindSafe for ModelArmorConfig
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