HarmCategory class final

The category of a rating.

These categories cover various kinds of harms that developers may wish to adjust.

Inheritance
  • Object
  • ProtoEnum
  • HarmCategory

Constructors

HarmCategory(String value)
const
HarmCategory.fromJson(Object? json)
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
isNotDefault bool
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value String
finalinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() String
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

$default → const HarmCategory
The default value for HarmCategory.
harmCategoryCivicIntegrity → const HarmCategory
Gemini - Content that may be used to harm civic integrity. DEPRECATED: use enable_enhanced_civic_answers instead.
harmCategoryDangerous → const HarmCategory
PaLM - Dangerous content that promotes, facilitates, or encourages harmful acts.
harmCategoryDangerousContent → const HarmCategory
Gemini - Dangerous content.
harmCategoryDerogatory → const HarmCategory
PaLM - Negative or harmful comments targeting identity and/or protected attribute.
harmCategoryHarassment → const HarmCategory
Gemini - Harassment content.
harmCategoryHateSpeech → const HarmCategory
Gemini - Hate speech and content.
harmCategoryMedical → const HarmCategory
PaLM - Promotes unchecked medical advice.
harmCategorySexual → const HarmCategory
PaLM - Contains references to sexual acts or other lewd content.
harmCategorySexuallyExplicit → const HarmCategory
Gemini - Sexually explicit content.
harmCategoryToxicity → const HarmCategory
PaLM - Content that is rude, disrespectful, or profane.
harmCategoryUnspecified → const HarmCategory
Category is unspecified.
harmCategoryViolence → const HarmCategory
PaLM - Describes scenarios depicting violence against an individual or group, or general descriptions of gore.