OpenAIStreamOptions

@Serializable
data class OpenAIStreamOptions(val includeUsage: Boolean? = null)

Options for a streaming chat completion response.

Only set this when io.kory.openai.completions.dto.OpenAIChatCompletionRequest.stream is true.

See also

Constructors

Link copied to clipboard
constructor(includeUsage: Boolean? = null)

Properties

Link copied to clipboard
@SerialName(value = "include_usage")
val includeUsage: Boolean?

If true, an additional chunk is streamed before the data: [DONE] message. The usage field on that chunk shows the token usage statistics for the entire request, and its choices field is always an empty array. null omits the field (provider default applies).