ChatCompletionDelta

@Serializable
class ChatCompletionDelta(val role: String? = null, val content: String? = null, val reasoningContent: String? = null, val toolCalls: List<ToolCallDelta>? = null)

A chat completion delta generated by streamed model responses.

Each streaming chunk's ChatChoiceChunk.delta carries only the fields that changed on this step. Clients reconstruct the full assistant message by concatenating content and reasoningContent across chunks, and by merging toolCalls by ToolCallDelta.index.

Constructors

Link copied to clipboard
constructor(role: String? = null, content: String? = null, reasoningContent: String? = null, toolCalls: List<ToolCallDelta>? = null)

Properties

Link copied to clipboard

Incremental content produced by the model on this step, if any.

Link copied to clipboard

For the deepseek-reasoner model: incremental reasoning content produced on this step, if any.

Link copied to clipboard
val role: String?

The role of the author of this message. Typically present only on the first chunk of a response.

Link copied to clipboard

Incremental tool call updates produced on this step, if any.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String