OpenAITruncation

@Serializable
enum OpenAITruncation : Enum<OpenAITruncation>

The truncation strategy used for the model response.

  • Auto: if the input exceeds the model's context window, the model truncates the response to fit by dropping items from the beginning of the conversation.

  • Disabled (default): if the input size exceeds the context window, the request fails with a 400 error.

See also

Entries

Link copied to clipboard
@SerialName(value = "auto")
AUTO

Truncate the response to fit the context window.

Link copied to clipboard
@SerialName(value = "disabled")
DISABLED

Fail the request when the input exceeds the context window.

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.