Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(enums.ts): add HARM_CATEGORY_CIVIC_INTEGRITY #268

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
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
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