Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fifty-pans-fail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@firebase/vertexai': patch
---

Added missing `BlockReason` and `FinishReason` enum values.
12 changes: 12 additions & 0 deletions common/api-review/vertexai.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,13 @@ export interface BaseParams {

// @public
export enum BlockReason {
// (undocumented)
BLOCKLIST = "BLOCKLIST",
// (undocumented)
OTHER = "OTHER",
// (undocumented)
PROHIBITED_CONTENT = "PROHIBITED_CONTENT",
// (undocumented)
SAFETY = "SAFETY"
}

Expand Down Expand Up @@ -157,15 +161,23 @@ export interface FileDataPart {

// @public
export enum FinishReason {
// (undocumented)
BLOCKLIST = "BLOCKLIST",
// (undocumented)
MALFORMED_FUNCTION_CALL = "MALFORMED_FUNCTION_CALL",
// (undocumented)
MAX_TOKENS = "MAX_TOKENS",
// (undocumented)
OTHER = "OTHER",
// (undocumented)
PROHIBITED_CONTENT = "PROHIBITED_CONTENT",
// (undocumented)
RECITATION = "RECITATION",
// (undocumented)
SAFETY = "SAFETY",
// (undocumented)
SPII = "SPII",
// (undocumented)
STOP = "STOP"
}

Expand Down
6 changes: 6 additions & 0 deletions docs-devsite/vertexai.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,9 @@ export declare enum BlockReason

| Member | Value | Description |
| --- | --- | --- |
| BLOCKLIST | <code>&quot;BLOCKLIST&quot;</code> | |
| OTHER | <code>&quot;OTHER&quot;</code> | |
| PROHIBITED\_CONTENT | <code>&quot;PROHIBITED_CONTENT&quot;</code> | |
| SAFETY | <code>&quot;SAFETY&quot;</code> | |

## FinishReason
Expand All @@ -248,10 +250,14 @@ export declare enum FinishReason

| Member | Value | Description |
| --- | --- | --- |
| BLOCKLIST | <code>&quot;BLOCKLIST&quot;</code> | |
| MALFORMED\_FUNCTION\_CALL | <code>&quot;MALFORMED_FUNCTION_CALL&quot;</code> | |
| MAX\_TOKENS | <code>&quot;MAX_TOKENS&quot;</code> | |
| OTHER | <code>&quot;OTHER&quot;</code> | |
| PROHIBITED\_CONTENT | <code>&quot;PROHIBITED_CONTENT&quot;</code> | |
| RECITATION | <code>&quot;RECITATION&quot;</code> | |
| SAFETY | <code>&quot;SAFETY&quot;</code> | |
| SPII | <code>&quot;SPII&quot;</code> | |
| STOP | <code>&quot;STOP&quot;</code> | |

## FunctionCallingMode
Expand Down
16 changes: 14 additions & 2 deletions packages/vertexai/src/types/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,11 @@ export enum BlockReason {
// Content was blocked by safety settings.
SAFETY = 'SAFETY',
// Content was blocked, but the reason is uncategorized.
OTHER = 'OTHER'
OTHER = 'OTHER',
// Content was blocked because it contained terms from the terminology blocklist.
BLOCKLIST = 'BLOCKLIST',
// Content was blocked due to prohibited content.
PROHIBITED_CONTENT = 'PROHIBITED_CONTENT'
}

/**
Expand All @@ -118,7 +122,15 @@ export enum FinishReason {
// The candidate content was flagged for recitation reasons.
RECITATION = 'RECITATION',
// Unknown reason.
OTHER = 'OTHER'
OTHER = 'OTHER',
// The candidate content contained forbidden terms.
BLOCKLIST = 'BLOCKLIST',
// The candidate content potentially contained prohibited content.
PROHIBITED_CONTENT = 'PROHIBITED_CONTENT',
// The candidate content potentially contained Sensitive Personally Identifiable Information (SPII).
SPII = 'SPII',
// The function call generated by the model was invalid.
MALFORMED_FUNCTION_CALL = 'MALFORMED_FUNCTION_CALL'
}

/**
Expand Down
Loading