@@ -31,6 +31,10 @@ option java_outer_classname = "ContentProto";
3131option java_package = "com.google.cloud.aiplatform.v1" ;
3232option php_namespace = "Google\\Cloud\\AIPlatform\\V1" ;
3333option ruby_package = "Google::Cloud::AIPlatform::V1" ;
34+ option (google.api.resource_definition ) = {
35+ type : "modelarmor.googleapis.com/Template"
36+ pattern : "projects/{project}/locations/{location}/templates/{template}"
37+ };
3438
3539// Harm categories that will block the content.
3640enum HarmCategory {
@@ -503,6 +507,9 @@ message Candidate {
503507
504508 // The function call generated by the model is invalid.
505509 MALFORMED_FUNCTION_CALL = 9 ;
510+
511+ // The model response was blocked by Model Armor.
512+ MODEL_ARMOR = 10 ;
506513 }
507514
508515 // Output only. Index of the candidate.
@@ -725,6 +732,27 @@ message RetrievalMetadata {
725732 [(google.api.field_behavior ) = OPTIONAL ];
726733}
727734
735+ // Configuration for Model Armor integrations of prompt and responses.
736+ message ModelArmorConfig {
737+ // Optional. The name of the Model Armor template to use for prompt
738+ // sanitization.
739+ string prompt_template_name = 1 [
740+ (google.api.field_behavior ) = OPTIONAL ,
741+ (google.api.resource_reference ) = {
742+ type : "modelarmor.googleapis.com/Template"
743+ }
744+ ];
745+
746+ // Optional. The name of the Model Armor template to use for response
747+ // sanitization.
748+ string response_template_name = 2 [
749+ (google.api.field_behavior ) = OPTIONAL ,
750+ (google.api.resource_reference ) = {
751+ type : "modelarmor.googleapis.com/Template"
752+ }
753+ ];
754+ }
755+
728756// Represents token counting info for a single modality.
729757message ModalityTokenCount {
730758 // The modality associated with this token count.
0 commit comments