@@ -32,6 +32,10 @@ option java_outer_classname = "ContentProto";
3232option java_package = "com.google.cloud.aiplatform.v1beta1" ;
3333option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1" ;
3434option ruby_package = "Google::Cloud::AIPlatform::V1beta1" ;
35+ option (google.api.resource_definition ) = {
36+ type : "modelarmor.googleapis.com/Template"
37+ pattern : "projects/{project}/locations/{location}/templates/{template}"
38+ };
3539
3640// Harm categories that will block the content.
3741enum HarmCategory {
@@ -596,6 +600,9 @@ message Candidate {
596600
597601 // The function call generated by the model is invalid.
598602 MALFORMED_FUNCTION_CALL = 9 ;
603+
604+ // The model response was blocked by Model Armor.
605+ MODEL_ARMOR = 10 ;
599606 }
600607
601608 // Output only. Index of the candidate.
@@ -819,6 +826,27 @@ message RetrievalMetadata {
819826 [(google.api.field_behavior ) = OPTIONAL ];
820827}
821828
829+ // Configuration for Model Armor integrations of prompt and responses.
830+ message ModelArmorConfig {
831+ // Optional. The name of the Model Armor template to use for prompt
832+ // sanitization.
833+ string prompt_template_name = 1 [
834+ (google.api.field_behavior ) = OPTIONAL ,
835+ (google.api.resource_reference ) = {
836+ type : "modelarmor.googleapis.com/Template"
837+ }
838+ ];
839+
840+ // Optional. The name of the Model Armor template to use for response
841+ // sanitization.
842+ string response_template_name = 2 [
843+ (google.api.field_behavior ) = OPTIONAL ,
844+ (google.api.resource_reference ) = {
845+ type : "modelarmor.googleapis.com/Template"
846+ }
847+ ];
848+ }
849+
822850// Represents token counting info for a single modality.
823851message ModalityTokenCount {
824852 // The modality associated with this token count.
0 commit comments