Package chat.octet.model.enums
Enum Class FinishReason
- All Implemented Interfaces:
Serializable,Comparable<FinishReason>,java.lang.constant.Constable
Token generate status
- Author:
- William
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionCompleted generation.Generation has exceeded the maximum token limit and has been truncated.Default type.Generation stopped by StoppingCriteria.Generation has exceeded the maximum context limit and has been truncated.Unknown type, no available token state. -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck if the token has been completed else return false.static FinishReasonReturns the enum constant of this class with the specified name.static FinishReason[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FINISHED
Completed generation. -
LENGTH
Generation has exceeded the maximum token limit and has been truncated. -
STOP
Generation stopped by StoppingCriteria.- See Also:
-
NONE
Default type. -
UNKNOWN
Unknown type, no available token state. -
TRUNCATED
Generation has exceeded the maximum context limit and has been truncated.
-
-
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
-
isFinished
public boolean isFinished()Check if the token has been completed else return false. Finished reason: FINISHED / LENGTH / STOP / TRUNCATED- Returns:
- boolean
-