Enum BlockReason
- Namespace
- GenerativeAI.Types
- Assembly
- GenerativeAI.dll
Specifies the reason why the prompt was blocked.
[JsonConverter(typeof(JsonStringEnumConverter<BlockReason>))]
public enum BlockReason
- Extension Methods
Fields
BLOCK_REASON_UNSPECIFIED = 0Default value. This value is unused.
SAFETY = 1Prompt was blocked due to safety reasons. Inspect SafetyRatings to understand which safety category blocked it.
OTHER = 2Prompt was blocked due to unknown reasons.
BLOCKLIST = 3Prompt was blocked due to the terms which are included from the terminology blocklist.
PROHIBITED_CONTENT = 4Prompt was blocked due to prohibited content.
IMAGE_SAFETY = 5Candidates blocked due to unsafe image generation content.
MODEL_ARMOR = 6The prompt was blocked by Model Armor.
JAILBREAK = 7The prompt was blocked as a jailbreak attempt.