Message

@Serializable
data class Message(val content: String, val role: String, val images: List<String> = emptyList(), val thinking: String = "")(source)

One chat message — the role-tagged unit of conversation between the user, the assistant, and (in the case of tool calls) the tools.

Constructors

Link copied to clipboard
constructor(content: String, role: String, images: List<String> = emptyList(), thinking: String = "")

Properties

Link copied to clipboard
@SerialName(value = "content")
val content: String

Body of the message; markdown-flavoured plain text.

Link copied to clipboard
@SerialName(value = "images")
val images: List<String>

Base64-encoded image payloads for multimodal models.

Link copied to clipboard
@SerialName(value = "role")
val role: String

Speaker role — typically "user", "assistant", "system", or "tool".

Link copied to clipboard
@SerialName(value = "thinking")
val thinking: String

Raw chain-of-thought emitted by the model; surfaced for debugging only.