Skip to content

Commit

Permalink
feat(enums.ts): add HARM_CATEGORY_CIVIC_INTEGRITY
Browse files Browse the repository at this point in the history
- add HARM_CATEGORY_CIVIC_INTEGRITY
- improve JSDoc for better DX and readability in IDE
  • Loading branch information
ImBIOS authored Sep 29, 2024
1 parent bc65f79 commit 21b0fc3
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions types/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,23 @@ export enum HarmCategory {
HARM_CATEGORY_SEXUALLY_EXPLICIT = "HARM_CATEGORY_SEXUALLY_EXPLICIT",
HARM_CATEGORY_HARASSMENT = "HARM_CATEGORY_HARASSMENT",
HARM_CATEGORY_DANGEROUS_CONTENT = "HARM_CATEGORY_DANGEROUS_CONTENT",
HARM_CATEGORY_CIVIC_INTEGRITY = "HARM_CATEGORY_CIVIC_INTEGRITY"
}

/**
* Threshold above which a prompt or candidate will be blocked.
* @public
*/
export enum HarmBlockThreshold {
// Threshold is unspecified.
/** Threshold is unspecified. */
HARM_BLOCK_THRESHOLD_UNSPECIFIED = "HARM_BLOCK_THRESHOLD_UNSPECIFIED",
// Content with NEGLIGIBLE will be allowed.
/** Content with NEGLIGIBLE will be allowed. */
BLOCK_LOW_AND_ABOVE = "BLOCK_LOW_AND_ABOVE",
// Content with NEGLIGIBLE and LOW will be allowed.
/** Content with NEGLIGIBLE and LOW will be allowed. */
BLOCK_MEDIUM_AND_ABOVE = "BLOCK_MEDIUM_AND_ABOVE",
// Content with NEGLIGIBLE, LOW, and MEDIUM will be allowed.
/** Content with NEGLIGIBLE, LOW, and MEDIUM will be allowed. */
BLOCK_ONLY_HIGH = "BLOCK_ONLY_HIGH",
// All content will be allowed.
/** All content will be allowed. */
BLOCK_NONE = "BLOCK_NONE",
}

Expand All @@ -55,15 +56,15 @@ export enum HarmBlockThreshold {
* @public
*/
export enum HarmProbability {
// Probability is unspecified.
/** Probability is unspecified. */
HARM_PROBABILITY_UNSPECIFIED = "HARM_PROBABILITY_UNSPECIFIED",
// Content has a negligible chance of being unsafe.
/** Content has a negligible chance of being unsafe. */
NEGLIGIBLE = "NEGLIGIBLE",
// Content has a low chance of being unsafe.
/** Content has a low chance of being unsafe. */
LOW = "LOW",
// Content has a medium chance of being unsafe.
/** Content has a medium chance of being unsafe. */
MEDIUM = "MEDIUM",
// Content has a high chance of being unsafe.
/** Content has a high chance of being unsafe. */
HIGH = "HIGH",
}

Expand Down

0 comments on commit 21b0fc3

Please # to comment.