Package dev.langchain4j.model.output
Enum Class FinishReason
- All Implemented Interfaces:
Serializable
,Comparable<FinishReason>
,Constable
The reason why a model call finished.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe call finished signalling a need for content filtering.The call finished because the token length was reached.The call finished for some other reason.The model call finished because the model decided the request was done.The call finished signalling a need for tool execution. -
Method Summary
Modifier and TypeMethodDescriptionstatic FinishReason
Returns 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
-
STOP
The model call finished because the model decided the request was done. -
LENGTH
The call finished because the token length was reached. -
TOOL_EXECUTION
The call finished signalling a need for tool execution. -
CONTENT_FILTER
The call finished signalling a need for content filtering. -
OTHER
The call finished for some other reason.
-
-
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
-