Skip to content

Commit 33c3c24

Browse files
authoredFeb 26, 2025··
feat(enums.ts): add HARM_CATEGORY_CIVIC_INTEGRITY (#268)
* feat(enums.ts): add HARM_CATEGORY_CIVIC_INTEGRITY
1 parent 40ad9b8 commit 33c3c24

File tree

6 files changed

+29
-30
lines changed

6 files changed

+29
-30
lines changed
 

‎.changeset/spicy-lemons-walk.md

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

‎common/api-review/generative-ai.api.md

+2-10
Original file line numberDiff line numberDiff line change
@@ -613,20 +613,17 @@ export interface GroundingSupportSegment {
613613

614614
// @public
615615
export enum HarmBlockThreshold {
616-
// (undocumented)
617616
BLOCK_LOW_AND_ABOVE = "BLOCK_LOW_AND_ABOVE",
618-
// (undocumented)
619617
BLOCK_MEDIUM_AND_ABOVE = "BLOCK_MEDIUM_AND_ABOVE",
620-
// (undocumented)
621618
BLOCK_NONE = "BLOCK_NONE",
622-
// (undocumented)
623619
BLOCK_ONLY_HIGH = "BLOCK_ONLY_HIGH",
624-
// (undocumented)
625620
HARM_BLOCK_THRESHOLD_UNSPECIFIED = "HARM_BLOCK_THRESHOLD_UNSPECIFIED"
626621
}
627622

628623
// @public
629624
export enum HarmCategory {
625+
// (undocumented)
626+
HARM_CATEGORY_CIVIC_INTEGRITY = "HARM_CATEGORY_CIVIC_INTEGRITY",
630627
// (undocumented)
631628
HARM_CATEGORY_DANGEROUS_CONTENT = "HARM_CATEGORY_DANGEROUS_CONTENT",
632629
// (undocumented)
@@ -641,15 +638,10 @@ export enum HarmCategory {
641638

642639
// @public
643640
export enum HarmProbability {
644-
// (undocumented)
645641
HARM_PROBABILITY_UNSPECIFIED = "HARM_PROBABILITY_UNSPECIFIED",
646-
// (undocumented)
647642
HIGH = "HIGH",
648-
// (undocumented)
649643
LOW = "LOW",
650-
// (undocumented)
651644
MEDIUM = "MEDIUM",
652-
// (undocumented)
653645
NEGLIGIBLE = "NEGLIGIBLE"
654646
}
655647

‎docs/reference/main/generative-ai.harmblockthreshold.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ export declare enum HarmBlockThreshold
1616

1717
| Member | Value | Description |
1818
| --- | --- | --- |
19-
| BLOCK\_LOW\_AND\_ABOVE | <code>&quot;BLOCK_LOW_AND_ABOVE&quot;</code> | |
20-
| BLOCK\_MEDIUM\_AND\_ABOVE | <code>&quot;BLOCK_MEDIUM_AND_ABOVE&quot;</code> | |
21-
| BLOCK\_NONE | <code>&quot;BLOCK_NONE&quot;</code> | |
22-
| BLOCK\_ONLY\_HIGH | <code>&quot;BLOCK_ONLY_HIGH&quot;</code> | |
23-
| HARM\_BLOCK\_THRESHOLD\_UNSPECIFIED | <code>&quot;HARM_BLOCK_THRESHOLD_UNSPECIFIED&quot;</code> | |
19+
| BLOCK\_LOW\_AND\_ABOVE | <code>&quot;BLOCK_LOW_AND_ABOVE&quot;</code> | Content with NEGLIGIBLE will be allowed. |
20+
| BLOCK\_MEDIUM\_AND\_ABOVE | <code>&quot;BLOCK_MEDIUM_AND_ABOVE&quot;</code> | Content with NEGLIGIBLE and LOW will be allowed. |
21+
| BLOCK\_NONE | <code>&quot;BLOCK_NONE&quot;</code> | All content will be allowed. |
22+
| BLOCK\_ONLY\_HIGH | <code>&quot;BLOCK_ONLY_HIGH&quot;</code> | Content with NEGLIGIBLE, LOW, and MEDIUM will be allowed. |
23+
| HARM\_BLOCK\_THRESHOLD\_UNSPECIFIED | <code>&quot;HARM_BLOCK_THRESHOLD_UNSPECIFIED&quot;</code> | Threshold is unspecified. |
2424

‎docs/reference/main/generative-ai.harmcategory.md

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export declare enum HarmCategory
1616

1717
| Member | Value | Description |
1818
| --- | --- | --- |
19+
| HARM\_CATEGORY\_CIVIC\_INTEGRITY | <code>&quot;HARM_CATEGORY_CIVIC_INTEGRITY&quot;</code> | |
1920
| HARM\_CATEGORY\_DANGEROUS\_CONTENT | <code>&quot;HARM_CATEGORY_DANGEROUS_CONTENT&quot;</code> | |
2021
| HARM\_CATEGORY\_HARASSMENT | <code>&quot;HARM_CATEGORY_HARASSMENT&quot;</code> | |
2122
| HARM\_CATEGORY\_HATE\_SPEECH | <code>&quot;HARM_CATEGORY_HATE_SPEECH&quot;</code> | |

‎docs/reference/main/generative-ai.harmprobability.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ export declare enum HarmProbability
1616

1717
| Member | Value | Description |
1818
| --- | --- | --- |
19-
| HARM\_PROBABILITY\_UNSPECIFIED | <code>&quot;HARM_PROBABILITY_UNSPECIFIED&quot;</code> | |
20-
| HIGH | <code>&quot;HIGH&quot;</code> | |
21-
| LOW | <code>&quot;LOW&quot;</code> | |
22-
| MEDIUM | <code>&quot;MEDIUM&quot;</code> | |
23-
| NEGLIGIBLE | <code>&quot;NEGLIGIBLE&quot;</code> | |
19+
| HARM\_PROBABILITY\_UNSPECIFIED | <code>&quot;HARM_PROBABILITY_UNSPECIFIED&quot;</code> | Probability is unspecified. |
20+
| HIGH | <code>&quot;HIGH&quot;</code> | Content has a high chance of being unsafe. |
21+
| LOW | <code>&quot;LOW&quot;</code> | Content has a low chance of being unsafe. |
22+
| MEDIUM | <code>&quot;MEDIUM&quot;</code> | Content has a medium chance of being unsafe. |
23+
| NEGLIGIBLE | <code>&quot;NEGLIGIBLE&quot;</code> | Content has a negligible chance of being unsafe. |
2424

‎types/enums.ts

+11-10
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,23 @@ export enum HarmCategory {
3131
HARM_CATEGORY_SEXUALLY_EXPLICIT = "HARM_CATEGORY_SEXUALLY_EXPLICIT",
3232
HARM_CATEGORY_HARASSMENT = "HARM_CATEGORY_HARASSMENT",
3333
HARM_CATEGORY_DANGEROUS_CONTENT = "HARM_CATEGORY_DANGEROUS_CONTENT",
34+
HARM_CATEGORY_CIVIC_INTEGRITY = "HARM_CATEGORY_CIVIC_INTEGRITY"
3435
}
3536

3637
/**
3738
* Threshold above which a prompt or candidate will be blocked.
3839
* @public
3940
*/
4041
export enum HarmBlockThreshold {
41-
// Threshold is unspecified.
42+
/** Threshold is unspecified. */
4243
HARM_BLOCK_THRESHOLD_UNSPECIFIED = "HARM_BLOCK_THRESHOLD_UNSPECIFIED",
43-
// Content with NEGLIGIBLE will be allowed.
44+
/** Content with NEGLIGIBLE will be allowed. */
4445
BLOCK_LOW_AND_ABOVE = "BLOCK_LOW_AND_ABOVE",
45-
// Content with NEGLIGIBLE and LOW will be allowed.
46+
/** Content with NEGLIGIBLE and LOW will be allowed. */
4647
BLOCK_MEDIUM_AND_ABOVE = "BLOCK_MEDIUM_AND_ABOVE",
47-
// Content with NEGLIGIBLE, LOW, and MEDIUM will be allowed.
48+
/** Content with NEGLIGIBLE, LOW, and MEDIUM will be allowed. */
4849
BLOCK_ONLY_HIGH = "BLOCK_ONLY_HIGH",
49-
// All content will be allowed.
50+
/** All content will be allowed. */
5051
BLOCK_NONE = "BLOCK_NONE",
5152
}
5253

@@ -55,15 +56,15 @@ export enum HarmBlockThreshold {
5556
* @public
5657
*/
5758
export enum HarmProbability {
58-
// Probability is unspecified.
59+
/** Probability is unspecified. */
5960
HARM_PROBABILITY_UNSPECIFIED = "HARM_PROBABILITY_UNSPECIFIED",
60-
// Content has a negligible chance of being unsafe.
61+
/** Content has a negligible chance of being unsafe. */
6162
NEGLIGIBLE = "NEGLIGIBLE",
62-
// Content has a low chance of being unsafe.
63+
/** Content has a low chance of being unsafe. */
6364
LOW = "LOW",
64-
// Content has a medium chance of being unsafe.
65+
/** Content has a medium chance of being unsafe. */
6566
MEDIUM = "MEDIUM",
66-
// Content has a high chance of being unsafe.
67+
/** Content has a high chance of being unsafe. */
6768
HIGH = "HIGH",
6869
}
6970

0 commit comments

Comments
 (0)
Please sign in to comment.