google.ai.generativelanguage.GenerateContentResponse.PromptFeedback.BlockReason

Specifies what was the reason why prompt was blocked.

BLOCK_REASON_UNSPECIFIED 0

Default value. This value is unused.

SAFETY 1

Prompt was blocked due to safety reasons. You can inspect safety_ratings to understand which safety category blocked it.

OTHER 2

Prompt was blocked due to unknown reaasons.

BLOCK_REASON_UNSPECIFIED <BlockReason.BLOCK_REASON_UNSPECIFIED: 0>
OTHER <BlockReason.OTHER: 2>
SAFETY <BlockReason.SAFETY: 1>