FinishReason
public final class FinishReason
Represents the reason why the model stopped generating content.
Summary
Nested types |
|---|
public static class FinishReason.Companion |
Public fields |
|
|---|---|
final @NonNull FinishReason |
Token generation stopped because the content contains forbidden terms. |
final @NonNull FinishReason |
The function call generated by the model is invalid. |
final @NonNull FinishReason |
Model hit the token limit. |
final @NonNull FinishReason |
Model stopped for another reason. |
final @NonNull FinishReason |
Token generation stopped for potentially containing prohibited content. |
final @NonNull FinishReason |
The token generation was stopped because the response was flagged for unauthorized citations. |
final @NonNull FinishReason |
|
final @NonNull FinishReason |
Token generation stopped because the content potentially contains Sensitive Personally Identifiable Information (SPII). |
final @NonNull FinishReason |
Model finished successfully and stopped. |
final @NonNull FinishReason |
A new and not yet supported value. |
final @NonNull String |
The name of the finish reason. |
final int |
The ordinal value of the finish reason. |
Public fields
BLOCKLIST
public final @NonNull FinishReason BLOCKLIST
Token generation stopped because the content contains forbidden terms.
MALFORMED_FUNCTION_CALL
public final @NonNull FinishReason MALFORMED_FUNCTION_CALL
The function call generated by the model is invalid.
PROHIBITED_CONTENT
public final @NonNull FinishReason PROHIBITED_CONTENT
Token generation stopped for potentially containing prohibited content.
RECITATION
public final @NonNull FinishReason RECITATION
The token generation was stopped because the response was flagged for unauthorized citations.
SAFETY
public final @NonNull FinishReason SAFETY
SafetySetting prevented the model from outputting content.
SPII
public final @NonNull FinishReason SPII
Token generation stopped because the content potentially contains Sensitive Personally Identifiable Information (SPII).