Skip to content

Commit a59d4e6

Browse files
feat(firebaseml): update the API
#### firebaseml:v2beta The following keys were added: - schemas.GoogleCloudAiplatformV1beta1GenerateContentRequest.properties.modelArmorConfig.$ref - schemas.GoogleCloudAiplatformV1beta1GenerateContentRequest.properties.modelArmorConfig.description - schemas.GoogleCloudAiplatformV1beta1ModelArmorConfig.description - schemas.GoogleCloudAiplatformV1beta1ModelArmorConfig.id - schemas.GoogleCloudAiplatformV1beta1ModelArmorConfig.properties.promptTemplateName.description - schemas.GoogleCloudAiplatformV1beta1ModelArmorConfig.properties.promptTemplateName.type - schemas.GoogleCloudAiplatformV1beta1ModelArmorConfig.properties.responseTemplateName.description - schemas.GoogleCloudAiplatformV1beta1ModelArmorConfig.properties.responseTemplateName.type - schemas.GoogleCloudAiplatformV1beta1ModelArmorConfig.type The following keys were changed: - schemas.GoogleCloudAiplatformV1beta1Candidate.properties.finishReason.enum - schemas.GoogleCloudAiplatformV1beta1Candidate.properties.finishReason.enumDescriptions - schemas.GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback.properties.blockReason.enum - schemas.GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback.properties.blockReason.enumDescriptions
1 parent 7e2837c commit a59d4e6

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

discovery/firebaseml-v2beta.json

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@
206206
}
207207
}
208208
},
209-
"revision": "20250727",
209+
"revision": "20250731",
210210
"rootUrl": "https://firebaseml.googleapis.com/",
211211
"schemas": {
212212
"Date": {
@@ -455,6 +455,7 @@
455455
"PROHIBITED_CONTENT",
456456
"SPII",
457457
"MALFORMED_FUNCTION_CALL",
458+
"MODEL_ARMOR",
458459
"IMAGE_SAFETY",
459460
"IMAGE_PROHIBITED_CONTENT",
460461
"IMAGE_RECITATION",
@@ -472,6 +473,7 @@
472473
"Token generation stopped for potentially containing prohibited content.",
473474
"Token generation stopped because the content potentially contains Sensitive Personally Identifiable Information (SPII).",
474475
"The function call generated by the model is invalid.",
476+
"The model response was blocked by Model Armor.",
475477
"Token generation stopped because generated images has safety violations.",
476478
"Image generation stopped because generated images has other prohibited content.",
477479
"Image generation stopped due to recitation.",
@@ -958,6 +960,10 @@
958960
"description": "Optional. The labels with user-defined metadata for the request. It is used for billing and reporting only. Label keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.",
959961
"type": "object"
960962
},
963+
"modelArmorConfig": {
964+
"$ref": "GoogleCloudAiplatformV1beta1ModelArmorConfig",
965+
"description": "Optional. Settings for prompt and response sanitization using the Model Armor service. If supplied, safety_settings must not be supplied."
966+
},
961967
"safetySettings": {
962968
"description": "Optional. Per request settings for blocking unsafe content. Enforced on GenerateContentResponse.candidates.",
963969
"items": {
@@ -1035,6 +1041,7 @@
10351041
"OTHER",
10361042
"BLOCKLIST",
10371043
"PROHIBITED_CONTENT",
1044+
"MODEL_ARMOR",
10381045
"IMAGE_SAFETY"
10391046
],
10401047
"enumDescriptions": [
@@ -1043,6 +1050,7 @@
10431050
"Candidates blocked due to other reason.",
10441051
"Candidates blocked due to the terms which are included from the terminology blocklist.",
10451052
"Candidates blocked due to prohibited content.",
1053+
"The user prompt was blocked by Model Armor.",
10461054
"Candidates blocked due to unsafe image generation content."
10471055
],
10481056
"readOnly": true,
@@ -1716,6 +1724,21 @@
17161724
},
17171725
"type": "object"
17181726
},
1727+
"GoogleCloudAiplatformV1beta1ModelArmorConfig": {
1728+
"description": "Configuration for Model Armor integrations of prompt and responses.",
1729+
"id": "GoogleCloudAiplatformV1beta1ModelArmorConfig",
1730+
"properties": {
1731+
"promptTemplateName": {
1732+
"description": "Optional. The name of the Model Armor template to use for prompt sanitization.",
1733+
"type": "string"
1734+
},
1735+
"responseTemplateName": {
1736+
"description": "Optional. The name of the Model Armor template to use for response sanitization.",
1737+
"type": "string"
1738+
}
1739+
},
1740+
"type": "object"
1741+
},
17191742
"GoogleCloudAiplatformV1beta1Part": {
17201743
"description": "A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes.",
17211744
"id": "GoogleCloudAiplatformV1beta1Part",

src/apis/firebaseml/v2beta.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,10 @@ export namespace firebaseml_v2beta {
627627
* Optional. The labels with user-defined metadata for the request. It is used for billing and reporting only. Label keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.
628628
*/
629629
labels?: {[key: string]: string} | null;
630+
/**
631+
* Optional. Settings for prompt and response sanitization using the Model Armor service. If supplied, safety_settings must not be supplied.
632+
*/
633+
modelArmorConfig?: Schema$GoogleCloudAiplatformV1beta1ModelArmorConfig;
630634
/**
631635
* Optional. Per request settings for blocking unsafe content. Enforced on GenerateContentResponse.candidates.
632636
*/
@@ -1144,6 +1148,19 @@ export namespace firebaseml_v2beta {
11441148
*/
11451149
tokenCount?: number | null;
11461150
}
1151+
/**
1152+
* Configuration for Model Armor integrations of prompt and responses.
1153+
*/
1154+
export interface Schema$GoogleCloudAiplatformV1beta1ModelArmorConfig {
1155+
/**
1156+
* Optional. The name of the Model Armor template to use for prompt sanitization.
1157+
*/
1158+
promptTemplateName?: string | null;
1159+
/**
1160+
* Optional. The name of the Model Armor template to use for response sanitization.
1161+
*/
1162+
responseTemplateName?: string | null;
1163+
}
11471164
/**
11481165
* A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes.
11491166
*/
@@ -2015,6 +2032,7 @@ export namespace firebaseml_v2beta {
20152032
* // "contents": [],
20162033
* // "generationConfig": {},
20172034
* // "labels": {},
2035+
* // "modelArmorConfig": {},
20182036
* // "safetySettings": [],
20192037
* // "systemInstruction": {},
20202038
* // "toolConfig": {},
@@ -2186,6 +2204,7 @@ export namespace firebaseml_v2beta {
21862204
* // "contents": [],
21872205
* // "generationConfig": {},
21882206
* // "labels": {},
2207+
* // "modelArmorConfig": {},
21892208
* // "safetySettings": [],
21902209
* // "systemInstruction": {},
21912210
* // "toolConfig": {},

0 commit comments

Comments
 (0)