Package com.google.genai.types
Enum FinishReason.Known
- All Implemented Interfaces:
Serializable
,Comparable<FinishReason.Known>
- Enclosing class:
- FinishReason
Enum representing the known values for FinishReason.
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionToken generation stopped because the content contains forbidden terms.The finish reason is unspecified.Token generation stopped because generated images have safety violations.The token generation stopped because of using an unsupported language.The function call generated by the model is invalid.Token generation reached the configured maximum output tokens.All other reasons that stopped the token generation.Token generation stopped for potentially containing prohibited content.The token generation stopped because of potential recitation.Token generation stopped because the content potentially contains safety violations.Token generation stopped because the content potentially contains Sensitive Personally Identifiable Information (SPII).Token generation reached a natural stopping point or a configured stop sequence.The tool call generated by the model is invalid. -
Method Summary
Modifier and TypeMethodDescriptionstatic FinishReason.Known
Returns the enum constant of this type with the specified name.static FinishReason.Known[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
FINISH_REASON_UNSPECIFIED
The finish reason is unspecified. -
STOP
Token generation reached a natural stopping point or a configured stop sequence. -
MAX_TOKENS
Token generation reached the configured maximum output tokens. -
SAFETY
Token generation stopped because the content potentially contains safety violations. NOTE: When streaming, [content][] is empty if content filters blocks the output. -
RECITATION
The token generation stopped because of potential recitation. -
LANGUAGE
The token generation stopped because of using an unsupported language. -
OTHER
All other reasons that stopped the token generation. -
BLOCKLIST
Token generation stopped because the content contains forbidden terms. -
PROHIBITED_CONTENT
Token generation stopped for potentially containing prohibited content. -
SPII
Token generation stopped because the content potentially contains Sensitive Personally Identifiable Information (SPII). -
MALFORMED_FUNCTION_CALL
The function call generated by the model is invalid. -
IMAGE_SAFETY
Token generation stopped because generated images have safety violations. -
UNEXPECTED_TOOL_CALL
The tool call generated by the model is invalid.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-