Message

data class Message(val role: String, val content: String, val thinking: String? = null, val images: List<String>? = null, val toolCalls: List<ToolCall>? = null, val toolName: String? = null)(source)

Represents a message in a chat conversation.

Constructors

Link copied to clipboard
constructor(role: String, content: String, thinking: String? = null, images: List<String>? = null, toolCalls: List<ToolCall>? = null, toolName: String? = null)

Properties

Link copied to clipboard

The content of the message

Link copied to clipboard

A list of images to include in the message (for multimodal models)

Link copied to clipboard

The role of the message, either "system", "user", "assistant", or "tool"

Link copied to clipboard

The model's thinking process (for thinking models)

Link copied to clipboard
@SerialName(value = "tool_calls")
val toolCalls: List<ToolCall>?

A list of tools in JSON that the model wants to use

Link copied to clipboard
@SerialName(value = "tool_name")
val toolName: String?

The name of the tool that was executed to inform the model of the result