Vertex AI V1 API - Module Google::Cloud::AIPlatform::V1::Candidate::FinishReason (v0.49.0)

Reference documentation and code samples for the Vertex AI V1 API module Google::Cloud::AIPlatform::V1::Candidate::FinishReason.

The reason why the model stopped generating tokens. If empty, the model has not stopped generating the tokens.

Constants

FINISH_REASON_UNSPECIFIED

value: 0
The finish reason is unspecified.

STOP

value: 1
Token generation reached a natural stopping point or a configured stop sequence.

MAX_TOKENS

value: 2
Token generation reached the configured maximum output tokens.

SAFETY

value: 3
Token generation stopped because the content potentially contains safety violations. NOTE: When streaming, content is empty if content filters blocks the output.

RECITATION

value: 4
Token generation stopped because the content potentially contains copyright violations.

OTHER

value: 5
All other reasons that stopped the token generation.

BLOCKLIST

value: 6
Token generation stopped because the content contains forbidden terms.

PROHIBITED_CONTENT

value: 7
Token generation stopped for potentially containing prohibited content.

SPII

value: 8
Token generation stopped because the content potentially contains Sensitive Personally Identifiable Information (SPII).

MALFORMED_FUNCTION_CALL

value: 9
The function call generated by the model is invalid.