File tree Expand file tree Collapse file tree 4 files changed +44
-2
lines changed
packages/vertexai/src/types Expand file tree Collapse file tree 4 files changed +44
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @firebase/vertexai ' : minor
3+ ' firebase ' : minor
4+ ---
5+
6+ Added missing ` BlockReason ` and ` FinishReason ` enum values.
Original file line number Diff line number Diff line change @@ -28,8 +28,10 @@ export interface BaseParams {
2828
2929// @public
3030export enum BlockReason {
31+ BLOCKLIST = " BLOCKLIST" ,
3132 // (undocumented)
3233 OTHER = " OTHER" ,
34+ PROHIBITED_CONTENT = " PROHIBITED_CONTENT" ,
3335 // (undocumented)
3436 SAFETY = " SAFETY"
3537}
@@ -158,14 +160,18 @@ export interface FileDataPart {
158160
159161// @public
160162export enum FinishReason {
163+ BLOCKLIST = " BLOCKLIST" ,
164+ MALFORMED_FUNCTION_CALL = " MALFORMED_FUNCTION_CALL" ,
161165 // (undocumented)
162166 MAX_TOKENS = " MAX_TOKENS" ,
163167 // (undocumented)
164168 OTHER = " OTHER" ,
169+ PROHIBITED_CONTENT = " PROHIBITED_CONTENT" ,
165170 // (undocumented)
166171 RECITATION = " RECITATION" ,
167172 // (undocumented)
168173 SAFETY = " SAFETY" ,
174+ SPII = " SPII" ,
169175 // (undocumented)
170176 STOP = " STOP"
171177}
Original file line number Diff line number Diff line change @@ -277,7 +277,9 @@ export declare enum BlockReason
277277
278278| Member | Value | Description |
279279| --- | --- | --- |
280+ | BLOCKLIST | <code>"BLOCKLIST"</code> | Content was blocked because it contained terms from the terminology blocklist. |
280281| OTHER | <code>"OTHER"</code> | |
282+ | PROHIBITED\_CONTENT | <code>"PROHIBITED_CONTENT"</code> | Content was blocked due to prohibited content. |
281283| SAFETY | <code>"SAFETY"</code> | |
282284
283285## FinishReason
@@ -294,10 +296,14 @@ export declare enum FinishReason
294296
295297| Member | Value | Description |
296298| --- | --- | --- |
299+ | BLOCKLIST | <code>"BLOCKLIST"</code> | The candidate content contained forbidden terms. |
300+ | MALFORMED\_FUNCTION\_CALL | <code>"MALFORMED_FUNCTION_CALL"</code> | The function call generated by the model was invalid. |
297301| MAX\_TOKENS | <code>"MAX_TOKENS"</code> | |
298302| OTHER | <code>"OTHER"</code> | |
303+ | PROHIBITED\_CONTENT | <code>"PROHIBITED_CONTENT"</code> | The candidate content potentially contained prohibited content. |
299304| RECITATION | <code>"RECITATION"</code> | |
300305| SAFETY | <code>"SAFETY"</code> | |
306+ | SPII | <code>"SPII"</code> | The candidate content potentially contained Sensitive Personally Identifiable Information (SPII). |
301307| STOP | <code>"STOP"</code> | |
302308
303309## FunctionCallingMode
Original file line number Diff line number Diff 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/**
You can’t perform that action at this time.
0 commit comments