Skip to content

Commit b109f27

Browse files
authored
Merge 3bb9992 into 82373b3
2 parents 82373b3 + 3bb9992 commit b109f27

File tree

4 files changed

+44
-2
lines changed

4 files changed

+44
-2
lines changed

.changeset/stupid-apples-shave.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@firebase/vertexai': minor
3+
'firebase': minor
4+
---
5+
6+
Added missing `BlockReason` and `FinishReason` enum values.

common/api-review/vertexai.api.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ export interface BaseParams {
2828

2929
// @public
3030
export enum BlockReason {
31+
BLOCKLIST = "BLOCKLIST",
3132
// (undocumented)
3233
OTHER = "OTHER",
34+
PROHIBITED_CONTENT = "PROHIBITED_CONTENT",
3335
// (undocumented)
3436
SAFETY = "SAFETY"
3537
}
@@ -157,14 +159,18 @@ export interface FileDataPart {
157159

158160
// @public
159161
export enum FinishReason {
162+
BLOCKLIST = "BLOCKLIST",
163+
MALFORMED_FUNCTION_CALL = "MALFORMED_FUNCTION_CALL",
160164
// (undocumented)
161165
MAX_TOKENS = "MAX_TOKENS",
162166
// (undocumented)
163167
OTHER = "OTHER",
168+
PROHIBITED_CONTENT = "PROHIBITED_CONTENT",
164169
// (undocumented)
165170
RECITATION = "RECITATION",
166171
// (undocumented)
167172
SAFETY = "SAFETY",
173+
SPII = "SPII",
168174
// (undocumented)
169175
STOP = "STOP"
170176
}

docs-devsite/vertexai.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,9 @@ export declare enum BlockReason
231231

232232
| Member | Value | Description |
233233
| --- | --- | --- |
234+
| BLOCKLIST | <code>&quot;BLOCKLIST&quot;</code> | Content was blocked because it contained terms from the terminology blocklist. |
234235
| OTHER | <code>&quot;OTHER&quot;</code> | |
236+
| PROHIBITED\_CONTENT | <code>&quot;PROHIBITED_CONTENT&quot;</code> | Content was blocked due to prohibited content. |
235237
| SAFETY | <code>&quot;SAFETY&quot;</code> | |
236238

237239
## FinishReason
@@ -248,10 +250,14 @@ export declare enum FinishReason
248250

249251
| Member | Value | Description |
250252
| --- | --- | --- |
253+
| BLOCKLIST | <code>&quot;BLOCKLIST&quot;</code> | The candidate content contained forbidden terms. |
254+
| MALFORMED\_FUNCTION\_CALL | <code>&quot;MALFORMED_FUNCTION_CALL&quot;</code> | The function call generated by the model was invalid. |
251255
| MAX\_TOKENS | <code>&quot;MAX_TOKENS&quot;</code> | |
252256
| OTHER | <code>&quot;OTHER&quot;</code> | |
257+
| PROHIBITED\_CONTENT | <code>&quot;PROHIBITED_CONTENT&quot;</code> | The candidate content potentially contained prohibited content. |
253258
| RECITATION | <code>&quot;RECITATION&quot;</code> | |
254259
| SAFETY | <code>&quot;SAFETY&quot;</code> | |
260+
| SPII | <code>&quot;SPII&quot;</code> | The candidate content potentially contained Sensitive Personally Identifiable Information (SPII). |
255261
| STOP | <code>&quot;STOP&quot;</code> | |
256262

257263
## FunctionCallingMode

packages/vertexai/src/types/enums.ts

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,15 @@ export enum BlockReason {
101101
// Content was blocked by safety settings.
102102
SAFETY = 'SAFETY',
103103
// Content was blocked, but the reason is uncategorized.
104-
OTHER = 'OTHER'
104+
OTHER = 'OTHER',
105+
/**
106+
* Content was blocked because it contained terms from the terminology blocklist.
107+
*/
108+
BLOCKLIST = 'BLOCKLIST',
109+
/**
110+
* Content was blocked due to prohibited content.
111+
*/
112+
PROHIBITED_CONTENT = 'PROHIBITED_CONTENT'
105113
}
106114

107115
/**
@@ -118,7 +126,23 @@ export enum FinishReason {
118126
// The candidate content was flagged for recitation reasons.
119127
RECITATION = 'RECITATION',
120128
// Unknown reason.
121-
OTHER = 'OTHER'
129+
OTHER = 'OTHER',
130+
/**
131+
* The candidate content contained forbidden terms.
132+
*/
133+
BLOCKLIST = 'BLOCKLIST',
134+
/**
135+
* The candidate content potentially contained prohibited content.
136+
*/
137+
PROHIBITED_CONTENT = 'PROHIBITED_CONTENT',
138+
/**
139+
* The candidate content potentially contained Sensitive Personally Identifiable Information (SPII).
140+
*/
141+
SPII = 'SPII',
142+
/**
143+
* The function call generated by the model was invalid.
144+
*/
145+
MALFORMED_FUNCTION_CALL = 'MALFORMED_FUNCTION_CALL'
122146
}
123147

124148
/**

0 commit comments

Comments
 (0)