File tree 4 files changed +25
-0
lines changed
4 files changed +25
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @google/generative-ai " : patch
3
+ ---
4
+
5
+ update FinishReason enum
Original file line number Diff line number Diff line change @@ -267,19 +267,27 @@ export interface FileDataPart {
267
267
268
268
// @public
269
269
export enum FinishReason {
270
+ // (undocumented)
271
+ BLOCKLIST = " BLOCKLIST" ,
270
272
// (undocumented)
271
273
FINISH_REASON_UNSPECIFIED = " FINISH_REASON_UNSPECIFIED" ,
272
274
// (undocumented)
273
275
LANGUAGE = " LANGUAGE" ,
274
276
// (undocumented)
277
+ MALFORMED_FUNCTION_CALL = " MALFORMED_FUNCTION_CALL" ,
278
+ // (undocumented)
275
279
MAX_TOKENS = " MAX_TOKENS" ,
276
280
// (undocumented)
277
281
OTHER = " OTHER" ,
278
282
// (undocumented)
283
+ PROHIBITED_CONTENT = " PROHIBITED_CONTENT" ,
284
+ // (undocumented)
279
285
RECITATION = " RECITATION" ,
280
286
// (undocumented)
281
287
SAFETY = " SAFETY" ,
282
288
// (undocumented)
289
+ SPII = " SPII" ,
290
+ // (undocumented)
283
291
STOP = " STOP"
284
292
}
285
293
Original file line number Diff line number Diff line change @@ -16,11 +16,15 @@ export declare enum FinishReason
16
16
17
17
| Member | Value | Description |
18
18
| --- | --- | --- |
19
+ | BLOCKLIST | <code>"BLOCKLIST"</code> | |
19
20
| FINISH\_REASON\_UNSPECIFIED | <code>"FINISH_REASON_UNSPECIFIED"</code> | |
20
21
| LANGUAGE | <code>"LANGUAGE"</code> | |
22
+ | MALFORMED\_FUNCTION\_CALL | <code>"MALFORMED_FUNCTION_CALL"</code> | |
21
23
| MAX\_TOKENS | <code>"MAX_TOKENS"</code> | |
22
24
| OTHER | <code>"OTHER"</code> | |
25
+ | PROHIBITED\_CONTENT | <code>"PROHIBITED_CONTENT"</code> | |
23
26
| RECITATION | <code>"RECITATION"</code> | |
24
27
| SAFETY | <code>"SAFETY"</code> | |
28
+ | SPII | <code>"SPII"</code> | |
25
29
| STOP | <code>"STOP"</code> | |
26
30
Original file line number Diff line number Diff line change @@ -97,6 +97,14 @@ export enum FinishReason {
97
97
RECITATION = "RECITATION" ,
98
98
// The candidate content was flagged for using an unsupported language.
99
99
LANGUAGE = "LANGUAGE" ,
100
+ // Token generation stopped because the content contains forbidden terms.
101
+ BLOCKLIST = "BLOCKLIST" ,
102
+ // Token generation stopped for potentially containing prohibited content.
103
+ PROHIBITED_CONTENT = "PROHIBITED_CONTENT" ,
104
+ // Token generation stopped because the content potentially contains Sensitive Personally Identifiable Information (SPII).
105
+ SPII = "SPII" ,
106
+ // The function call generated by the model is invalid.
107
+ MALFORMED_FUNCTION_CALL = "MALFORMED_FUNCTION_CALL" ,
100
108
// Unknown reason.
101
109
OTHER = "OTHER" ,
102
110
}
You can’t perform that action at this time.
0 commit comments