Package com.google.cloud.aiplatform.v1
Enum Candidate.FinishReason
- All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite,com.google.protobuf.ProtocolMessageEnum,Serializable,Comparable<Candidate.FinishReason>
- Enclosing class:
- Candidate
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 Summary
Enum ConstantsEnum ConstantDescriptionToken generation stopped because the content contains forbidden terms.The finish reason is unspecified.The function call generated by the model is invalid.Token generation reached the configured maximum output tokens.The model response was blocked by Model Armor.All other reasons that stopped the token generation.Token generation stopped for potentially containing prohibited content.Token generation stopped because the content potentially contains copyright violations.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. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intToken generation stopped because the content contains forbidden terms.static final intThe finish reason is unspecified.static final intThe function call generated by the model is invalid.static final intToken generation reached the configured maximum output tokens.static final intThe model response was blocked by Model Armor.static final intAll other reasons that stopped the token generation.static final intToken generation stopped for potentially containing prohibited content.static final intToken generation stopped because the content potentially contains copyright violations.static final intToken generation stopped because the content potentially contains safety violations.static final intToken generation stopped because the content potentially contains Sensitive Personally Identifiable Information (SPII).static final intToken generation reached a natural stopping point or a configured stop sequence. -
Method Summary
Modifier and TypeMethodDescriptionstatic Candidate.FinishReasonforNumber(int value) static com.google.protobuf.Descriptors.EnumDescriptorfinal com.google.protobuf.Descriptors.EnumDescriptorfinal intfinal com.google.protobuf.Descriptors.EnumValueDescriptorstatic com.google.protobuf.Internal.EnumLiteMap<Candidate.FinishReason>static Candidate.FinishReasonvalueOf(int value) Deprecated.static Candidate.FinishReasonvalueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) Returns the enum constant of this type with the specified name.static Candidate.FinishReasonReturns 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.
-
Enum Constant Details
-
FINISH_REASON_UNSPECIFIED
The finish reason is unspecified.
FINISH_REASON_UNSPECIFIED = 0; -
STOP
Token generation reached a natural stopping point or a configured stop sequence.
STOP = 1; -
MAX_TOKENS
Token generation reached the configured maximum output tokens.
MAX_TOKENS = 2; -
SAFETY
Token generation stopped because the content potentially contains safety violations. NOTE: When streaming, [content][google.cloud.aiplatform.v1.Candidate.content] is empty if content filters blocks the output.
SAFETY = 3; -
RECITATION
Token generation stopped because the content potentially contains copyright violations.
RECITATION = 4; -
OTHER
All other reasons that stopped the token generation.
OTHER = 5; -
BLOCKLIST
Token generation stopped because the content contains forbidden terms.
BLOCKLIST = 6; -
PROHIBITED_CONTENT
Token generation stopped for potentially containing prohibited content.
PROHIBITED_CONTENT = 7; -
SPII
Token generation stopped because the content potentially contains Sensitive Personally Identifiable Information (SPII).
SPII = 8; -
MALFORMED_FUNCTION_CALL
The function call generated by the model is invalid.
MALFORMED_FUNCTION_CALL = 9; -
MODEL_ARMOR
The model response was blocked by Model Armor.
MODEL_ARMOR = 10; -
UNRECOGNIZED
-
-
Field Details
-
FINISH_REASON_UNSPECIFIED_VALUE
public static final int FINISH_REASON_UNSPECIFIED_VALUEThe finish reason is unspecified.
FINISH_REASON_UNSPECIFIED = 0;- See Also:
-
STOP_VALUE
public static final int STOP_VALUEToken generation reached a natural stopping point or a configured stop sequence.
STOP = 1;- See Also:
-
MAX_TOKENS_VALUE
public static final int MAX_TOKENS_VALUEToken generation reached the configured maximum output tokens.
MAX_TOKENS = 2;- See Also:
-
SAFETY_VALUE
public static final int SAFETY_VALUEToken generation stopped because the content potentially contains safety violations. NOTE: When streaming, [content][google.cloud.aiplatform.v1.Candidate.content] is empty if content filters blocks the output.
SAFETY = 3;- See Also:
-
RECITATION_VALUE
public static final int RECITATION_VALUEToken generation stopped because the content potentially contains copyright violations.
RECITATION = 4;- See Also:
-
OTHER_VALUE
public static final int OTHER_VALUEAll other reasons that stopped the token generation.
OTHER = 5;- See Also:
-
BLOCKLIST_VALUE
public static final int BLOCKLIST_VALUEToken generation stopped because the content contains forbidden terms.
BLOCKLIST = 6;- See Also:
-
PROHIBITED_CONTENT_VALUE
public static final int PROHIBITED_CONTENT_VALUEToken generation stopped for potentially containing prohibited content.
PROHIBITED_CONTENT = 7;- See Also:
-
SPII_VALUE
public static final int SPII_VALUEToken generation stopped because the content potentially contains Sensitive Personally Identifiable Information (SPII).
SPII = 8;- See Also:
-
MALFORMED_FUNCTION_CALL_VALUE
public static final int MALFORMED_FUNCTION_CALL_VALUEThe function call generated by the model is invalid.
MALFORMED_FUNCTION_CALL = 9;- See Also:
-
MODEL_ARMOR_VALUE
public static final int MODEL_ARMOR_VALUEThe model response was blocked by Model Armor.
MODEL_ARMOR = 10;- See Also:
-
-
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
-
getNumber
public final int getNumber()- Specified by:
getNumberin interfacecom.google.protobuf.Internal.EnumLite- Specified by:
getNumberin interfacecom.google.protobuf.ProtocolMessageEnum
-
valueOf
Deprecated.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:
value- 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
-
forNumber
- Parameters:
value- The numeric wire value of the corresponding enum entry.- Returns:
- The enum associated with the given numeric wire value.
-
internalGetValueMap
public static com.google.protobuf.Internal.EnumLiteMap<Candidate.FinishReason> internalGetValueMap() -
getValueDescriptor
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()- Specified by:
getValueDescriptorin interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptorForType
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptor
public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() -
valueOf
public static Candidate.FinishReason valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) 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:
desc- 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
-