Enum Class CohereChatBedrockApi.CohereChatResponse.Generation.FinishReason
java.lang.Object
java.lang.Enum<CohereChatBedrockApi.CohereChatResponse.Generation.FinishReason>
org.springframework.ai.bedrock.cohere.api.CohereChatBedrockApi.CohereChatResponse.Generation.FinishReason
- All Implemented Interfaces:
Serializable
,Comparable<CohereChatBedrockApi.CohereChatResponse.Generation.FinishReason>
,Constable
- Enclosing class:
- CohereChatBedrockApi.CohereChatResponse.Generation
public static enum CohereChatBedrockApi.CohereChatResponse.Generation.FinishReason
extends Enum<CohereChatBedrockApi.CohereChatResponse.Generation.FinishReason>
The reason the response finished being generated.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe model sent back a finished reply.Something went wrong when generating the reply.the model generated a reply that was deemed toxic.The reply was cut off because the model reached the maximum number of tokens for its context length. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
COMPLETE
The model sent back a finished reply. -
MAX_TOKENS
The reply was cut off because the model reached the maximum number of tokens for its context length. -
ERROR
Something went wrong when generating the reply. -
ERROR_TOXIC
the model generated a reply that was deemed toxic. finish_reason is returned only when is_finished=true. (Not always returned).
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-