public static enum Candidate.FinishReason extends Enum<Candidate.FinishReason> implements com.google.protobuf.ProtocolMessageEnum
The reason why the model stopped generating tokens. If empty, the model has not stopped generating the tokens.Protobuf enum
google.cloud.aiplatform.v1.Candidate.FinishReason| Enum Constant and Description |
|---|
BLOCKLIST
The token generation was stopped as the response was flagged for the
terms which are included from the terminology blocklist.
|
FINISH_REASON_UNSPECIFIED
The finish reason is unspecified.
|
MAX_TOKENS
The maximum number of tokens as specified in the request was reached.
|
OTHER
All other reasons that stopped the token generation
|
PROHIBITED_CONTENT
The token generation was stopped as the response was flagged for
the prohibited contents.
|
RECITATION
The token generation was stopped as the response was flagged for
unauthorized citations.
|
SAFETY
The token generation was stopped as the response was flagged for safety
reasons.
|
SPII
The token generation was stopped as the response was flagged for
Sensitive Personally Identifiable Information (SPII) contents.
|
STOP
Natural stop point of the model or provided stop sequence.
|
UNRECOGNIZED |
| Modifier and Type | Field and Description |
|---|---|
static int |
BLOCKLIST_VALUE
The token generation was stopped as the response was flagged for the
terms which are included from the terminology blocklist.
|
static int |
FINISH_REASON_UNSPECIFIED_VALUE
The finish reason is unspecified.
|
static int |
MAX_TOKENS_VALUE
The maximum number of tokens as specified in the request was reached.
|
static int |
OTHER_VALUE
All other reasons that stopped the token generation
|
static int |
PROHIBITED_CONTENT_VALUE
The token generation was stopped as the response was flagged for
the prohibited contents.
|
static int |
RECITATION_VALUE
The token generation was stopped as the response was flagged for
unauthorized citations.
|
static int |
SAFETY_VALUE
The token generation was stopped as the response was flagged for safety
reasons.
|
static int |
SPII_VALUE
The token generation was stopped as the response was flagged for
Sensitive Personally Identifiable Information (SPII) contents.
|
static int |
STOP_VALUE
Natural stop point of the model or provided stop sequence.
|
| Modifier and Type | Method and Description |
|---|---|
static Candidate.FinishReason |
forNumber(int value) |
static com.google.protobuf.Descriptors.EnumDescriptor |
getDescriptor() |
com.google.protobuf.Descriptors.EnumDescriptor |
getDescriptorForType() |
int |
getNumber() |
com.google.protobuf.Descriptors.EnumValueDescriptor |
getValueDescriptor() |
static com.google.protobuf.Internal.EnumLiteMap<Candidate.FinishReason> |
internalGetValueMap() |
static Candidate.FinishReason |
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) |
static Candidate.FinishReason |
valueOf(int value)
Deprecated.
Use
forNumber(int) instead. |
static Candidate.FinishReason |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Candidate.FinishReason[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Candidate.FinishReason FINISH_REASON_UNSPECIFIED
The finish reason is unspecified.
FINISH_REASON_UNSPECIFIED = 0;public static final Candidate.FinishReason STOP
Natural stop point of the model or provided stop sequence.
STOP = 1;public static final Candidate.FinishReason MAX_TOKENS
The maximum number of tokens as specified in the request was reached.
MAX_TOKENS = 2;public static final Candidate.FinishReason SAFETY
The token generation was stopped as the response was flagged for safety reasons. NOTE: When streaming the Candidate.content will be empty if content filters blocked the output.
SAFETY = 3;public static final Candidate.FinishReason RECITATION
The token generation was stopped as the response was flagged for unauthorized citations.
RECITATION = 4;public static final Candidate.FinishReason OTHER
All other reasons that stopped the token generation
OTHER = 5;public static final Candidate.FinishReason BLOCKLIST
The token generation was stopped as the response was flagged for the terms which are included from the terminology blocklist.
BLOCKLIST = 6;public static final Candidate.FinishReason PROHIBITED_CONTENT
The token generation was stopped as the response was flagged for the prohibited contents.
PROHIBITED_CONTENT = 7;public static final Candidate.FinishReason SPII
The token generation was stopped as the response was flagged for Sensitive Personally Identifiable Information (SPII) contents.
SPII = 8;public static final Candidate.FinishReason UNRECOGNIZED
public static final int FINISH_REASON_UNSPECIFIED_VALUE
The finish reason is unspecified.
FINISH_REASON_UNSPECIFIED = 0;public static final int STOP_VALUE
Natural stop point of the model or provided stop sequence.
STOP = 1;public static final int MAX_TOKENS_VALUE
The maximum number of tokens as specified in the request was reached.
MAX_TOKENS = 2;public static final int SAFETY_VALUE
The token generation was stopped as the response was flagged for safety reasons. NOTE: When streaming the Candidate.content will be empty if content filters blocked the output.
SAFETY = 3;public static final int RECITATION_VALUE
The token generation was stopped as the response was flagged for unauthorized citations.
RECITATION = 4;public static final int OTHER_VALUE
All other reasons that stopped the token generation
OTHER = 5;public static final int BLOCKLIST_VALUE
The token generation was stopped as the response was flagged for the terms which are included from the terminology blocklist.
BLOCKLIST = 6;public static final int PROHIBITED_CONTENT_VALUE
The token generation was stopped as the response was flagged for the prohibited contents.
PROHIBITED_CONTENT = 7;public static final int SPII_VALUE
The token generation was stopped as the response was flagged for Sensitive Personally Identifiable Information (SPII) contents.
SPII = 8;public static Candidate.FinishReason[] values()
for (Candidate.FinishReason c : Candidate.FinishReason.values()) System.out.println(c);
public static Candidate.FinishReason valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic final int getNumber()
getNumber in interface com.google.protobuf.Internal.EnumLitegetNumber in interface com.google.protobuf.ProtocolMessageEnum@Deprecated public static Candidate.FinishReason valueOf(int value)
forNumber(int) instead.value - The numeric wire value of the corresponding enum entry.public static Candidate.FinishReason forNumber(int value)
value - The numeric wire value of the corresponding enum entry.public static com.google.protobuf.Internal.EnumLiteMap<Candidate.FinishReason> internalGetValueMap()
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnumpublic final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.ProtocolMessageEnumpublic static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
public static Candidate.FinishReason valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
Copyright © 2024 Google LLC. All rights reserved.