Table of Contents

Enum HarmCategory

Namespace
GenerativeAI.Types
Assembly
GenerativeAI.dll

The category of a rating. These categories cover various kinds of harms that developers may wish to adjust.

[JsonConverter(typeof(JsonStringEnumConverter<HarmCategory>))]
public enum HarmCategory
Extension Methods

Fields

HARM_CATEGORY_UNSPECIFIED = 0

Category is unspecified.

HARM_CATEGORY_DEROGATORY = 1

PaLM - Negative or harmful comments targeting identity and/or protected attribute.

HARM_CATEGORY_TOXICITY = 2

PaLM - Content that is rude, disrespectful, or profane.

HARM_CATEGORY_VIOLENCE = 3

PaLM - Describes scenarios depicting violence against an individual or group, or general descriptions of gore.

HARM_CATEGORY_SEXUAL = 4

PaLM - Contains references to sexual acts or other lewd content.

HARM_CATEGORY_MEDICAL = 5

PaLM - Promotes unchecked medical advice.

HARM_CATEGORY_DANGEROUS = 6

PaLM - Dangerous content that promotes, facilitates, or encourages harmful acts.

HARM_CATEGORY_HARASSMENT = 7

Gemini - Harassment content.

HARM_CATEGORY_HATE_SPEECH = 8

Gemini - Hate speech and content.

HARM_CATEGORY_SEXUALLY_EXPLICIT = 9

Gemini - Sexually explicit content.

HARM_CATEGORY_DANGEROUS_CONTENT = 10

Gemini - Dangerous content.

HARM_CATEGORY_CIVIC_INTEGRITY = 11

Gemini - Content that may be used to harm civic integrity.

HARM_CATEGORY_JAILBREAK = 12

Prompts that try to bypass safety filters (jailbreaks).

HARM_CATEGORY_IMAGE_HATE = 13

Hateful image content.

HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT = 14

Dangerous image content.

HARM_CATEGORY_IMAGE_HARASSMENT = 15

Harassing image content.

HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT = 16

Sexually explicit image content.

See Also