ChatMessageDelta

data class ChatMessageDelta(val role: ChatUser? = null, val content: String? = null, val toolCalls: List<ToolCallDelta>? = null)

Represents the "delta," or changes of a chat message. This is used by streams stream 1 token at a time.

Constructors

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

Properties

Link copied to clipboard
val content: String? = null

1 token of the message. Will always be null for tool calls

Link copied to clipboard
val role: ChatUser? = null

Who sent the message. Will always be ChatUser.ASSISTANT for the first message, then null

Link copied to clipboard

Modifications to the tool calls. Will always be null when content is not null