FinishReason

@Serializable
enum FinishReason : Enum<FinishReason>

Reason the model stopped producing tokens for a ChatChoice or FIMChoice.

Entries

Link copied to clipboard
@SerialName(value = "stop")
STOP

The model hit a natural stop point or a provided stop sequence.

Link copied to clipboard
@SerialName(value = "length")
LENGTH

The maximum number of tokens specified in the request was reached.

Link copied to clipboard
@SerialName(value = "content_filter")
CONTENT_FILTER

Content was omitted due to a content-filter flag.

Link copied to clipboard
@SerialName(value = "tool_calls")
TOOL_CALLS

The model called one or more tools. Chat completions only.

Link copied to clipboard
@SerialName(value = "insufficient_system_resource")
INSUFFICIENT_SYSTEM_RESOURCE

The request was interrupted because the inference system ran out of resources.

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
expect val name: String
Link copied to clipboard
expect val ordinal: Int

Functions

Link copied to clipboard

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.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.