Skip to content

Commit 25d3a92

Browse files
authoredOct 11, 2024··
Update FinishReason enum (#270)
* update enums * run all the yarns
1 parent bb553d0 commit 25d3a92

File tree

4 files changed

+25
-0
lines changed

4 files changed

+25
-0
lines changed
 

Diff for: ‎.changeset/good-beans-cheat.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@google/generative-ai": patch
3+
---
4+
5+
update FinishReason enum

Diff for: ‎common/api-review/generative-ai.api.md

+8
Original file line numberDiff line numberDiff line change
@@ -267,19 +267,27 @@ export interface FileDataPart {
267267

268268
// @public
269269
export enum FinishReason {
270+
// (undocumented)
271+
BLOCKLIST = "BLOCKLIST",
270272
// (undocumented)
271273
FINISH_REASON_UNSPECIFIED = "FINISH_REASON_UNSPECIFIED",
272274
// (undocumented)
273275
LANGUAGE = "LANGUAGE",
274276
// (undocumented)
277+
MALFORMED_FUNCTION_CALL = "MALFORMED_FUNCTION_CALL",
278+
// (undocumented)
275279
MAX_TOKENS = "MAX_TOKENS",
276280
// (undocumented)
277281
OTHER = "OTHER",
278282
// (undocumented)
283+
PROHIBITED_CONTENT = "PROHIBITED_CONTENT",
284+
// (undocumented)
279285
RECITATION = "RECITATION",
280286
// (undocumented)
281287
SAFETY = "SAFETY",
282288
// (undocumented)
289+
SPII = "SPII",
290+
// (undocumented)
283291
STOP = "STOP"
284292
}
285293

Diff for: ‎docs/reference/main/generative-ai.finishreason.md

+4
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,15 @@ export declare enum FinishReason
1616

1717
| Member | Value | Description |
1818
| --- | --- | --- |
19+
| BLOCKLIST | <code>&quot;BLOCKLIST&quot;</code> | |
1920
| FINISH\_REASON\_UNSPECIFIED | <code>&quot;FINISH_REASON_UNSPECIFIED&quot;</code> | |
2021
| LANGUAGE | <code>&quot;LANGUAGE&quot;</code> | |
22+
| MALFORMED\_FUNCTION\_CALL | <code>&quot;MALFORMED_FUNCTION_CALL&quot;</code> | |
2123
| MAX\_TOKENS | <code>&quot;MAX_TOKENS&quot;</code> | |
2224
| OTHER | <code>&quot;OTHER&quot;</code> | |
25+
| PROHIBITED\_CONTENT | <code>&quot;PROHIBITED_CONTENT&quot;</code> | |
2326
| RECITATION | <code>&quot;RECITATION&quot;</code> | |
2427
| SAFETY | <code>&quot;SAFETY&quot;</code> | |
28+
| SPII | <code>&quot;SPII&quot;</code> | |
2529
| STOP | <code>&quot;STOP&quot;</code> | |
2630

Diff for: ‎types/enums.ts

+8
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,14 @@ export enum FinishReason {
9797
RECITATION = "RECITATION",
9898
// The candidate content was flagged for using an unsupported language.
9999
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",
100108
// Unknown reason.
101109
OTHER = "OTHER",
102110
}

0 commit comments

Comments
 (0)
Please sign in to comment.