Enum ChatCompletionResponse.FinishReason
- java.lang.Object
-
- java.lang.Enum<ChatCompletionResponse.FinishReason>
-
- com.composum.ai.backend.base.service.chat.impl.chatmodel.ChatCompletionResponse.FinishReason
-
- All Implemented Interfaces:
Serializable
,Comparable<ChatCompletionResponse.FinishReason>
- Enclosing class:
- ChatCompletionResponse
public static enum ChatCompletionResponse.FinishReason extends Enum<ChatCompletionResponse.FinishReason>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CONTENT_FILTER
FUNCTION_CALL
Deprecated.LENGTH
STOP
TOOL_CALLS
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static GPTFinishReason
toGPTFinishReason(ChatCompletionResponse.FinishReason finishReason)
static ChatCompletionResponse.FinishReason
valueOf(String name)
Returns the enum constant of this type with the specified name.static ChatCompletionResponse.FinishReason[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
STOP
@SerializedName("stop") public static final ChatCompletionResponse.FinishReason STOP
-
LENGTH
@SerializedName("length") public static final ChatCompletionResponse.FinishReason LENGTH
-
CONTENT_FILTER
@SerializedName("content_filter") public static final ChatCompletionResponse.FinishReason CONTENT_FILTER
-
TOOL_CALLS
@SerializedName("tool_calls") public static final ChatCompletionResponse.FinishReason TOOL_CALLS
-
FUNCTION_CALL
@Deprecated @SerializedName("function_call") public static final ChatCompletionResponse.FinishReason FUNCTION_CALL
Deprecated.
-
-
Method Detail
-
values
public static ChatCompletionResponse.FinishReason[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ChatCompletionResponse.FinishReason c : ChatCompletionResponse.FinishReason.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ChatCompletionResponse.FinishReason valueOf(String name)
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
-
toGPTFinishReason
public static GPTFinishReason toGPTFinishReason(ChatCompletionResponse.FinishReason finishReason)
-
-