BlockReason Enumeration

Specifies the reason why the prompt was blocked.

Definition

Namespace: GenerativeAI.Types
Assembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
C#
public enum BlockReason

Members

BLOCK_REASON_UNSPECIFIED0 Default value. This value is unused.
SAFETY1 Prompt was blocked due to safety reasons. Inspect SafetyRatings to understand which safety category blocked it.
OTHER2 Prompt was blocked due to unknown reasons.
BLOCKLIST3 Prompt was blocked due to the terms which are included from the terminology blocklist.
PROHIBITED_CONTENT4 Prompt was blocked due to prohibited content.
IMAGE_SAFETY5 Candidates blocked due to unsafe image generation content.

See Also