Skip to content

Commit 8cb21ff

Browse files
authored
feat(ai): Add HarmBlockThreshold.OFF (#9050)
1 parent ec91a86 commit 8cb21ff

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

common/api-review/ai.api.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,8 @@ export enum HarmBlockThreshold {
518518
BLOCK_LOW_AND_ABOVE = "BLOCK_LOW_AND_ABOVE",
519519
BLOCK_MEDIUM_AND_ABOVE = "BLOCK_MEDIUM_AND_ABOVE",
520520
BLOCK_NONE = "BLOCK_NONE",
521-
BLOCK_ONLY_HIGH = "BLOCK_ONLY_HIGH"
521+
BLOCK_ONLY_HIGH = "BLOCK_ONLY_HIGH",
522+
OFF = "OFF"
522523
}
523524

524525
// @public

docs-devsite/ai.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,7 @@ export declare enum HarmBlockThreshold
551551
| BLOCK\_MEDIUM\_AND\_ABOVE | <code>&quot;BLOCK_MEDIUM_AND_ABOVE&quot;</code> | Content with <code>NEGLIGIBLE</code> and <code>LOW</code> will be allowed. |
552552
| BLOCK\_NONE | <code>&quot;BLOCK_NONE&quot;</code> | All content will be allowed. |
553553
| BLOCK\_ONLY\_HIGH | <code>&quot;BLOCK_ONLY_HIGH&quot;</code> | Content with <code>NEGLIGIBLE</code>, <code>LOW</code>, and <code>MEDIUM</code> will be allowed. |
554+
| OFF | <code>&quot;OFF&quot;</code> | All content will be allowed. This is the same as <code>BLOCK_NONE</code>, but the metadata corresponding to the [HarmCategory](./ai.md#harmcategory) will not be present in the response. |
554555

555556
## HarmCategory
556557

packages/ai/src/types/enums.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,12 @@ export enum HarmBlockThreshold {
5858
/**
5959
* All content will be allowed.
6060
*/
61-
BLOCK_NONE = 'BLOCK_NONE'
61+
BLOCK_NONE = 'BLOCK_NONE',
62+
/**
63+
* All content will be allowed. This is the same as `BLOCK_NONE`, but the metadata corresponding
64+
* to the {@link HarmCategory} will not be present in the response.
65+
*/
66+
OFF = 'OFF'
6267
}
6368

6469
/**

0 commit comments

Comments
 (0)