Table of Contents

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 = 0

Default value. This value is unused.

SAFETY = 1

Prompt was blocked due to safety reasons. Inspect SafetyRatings to understand which safety category blocked it.

OTHER = 2

Prompt was blocked due to unknown reasons.

BLOCKLIST = 3

Prompt was blocked due to the terms which are included from the terminology blocklist.

PROHIBITED_CONTENT = 4

Prompt was blocked due to prohibited content.

IMAGE_SAFETY = 5

Candidates blocked due to unsafe image generation content.

MODEL_ARMOR = 6

The prompt was blocked by Model Armor.

JAILBREAK = 7

The prompt was blocked as a jailbreak attempt.

See Also