ChatResultMessage

@Serializable
data class ChatResultMessage(val id: String? = null, val name: String? = null, val contentParts: List<ChatInputPart>? = null, val role: Role? = null, val content: String? = null, val toolCalls: List<ChatResultToolCall>? = null, val annotations: List<ChatResultAnnotation>? = null, val audio: ChatAudio? = null, val refusal: String? = null, val functionCall: FunctionCall? = null, val reasoningContent: String? = null)

Complete or incremental assistant message with custom tool calls.

Constructors

Link copied to clipboard
constructor(id: String? = null, name: String? = null, contentParts: List<ChatInputPart>? = null, role: Role? = null, content: String? = null, toolCalls: List<ChatResultToolCall>? = null, annotations: List<ChatResultAnnotation>? = null, audio: ChatAudio? = null, refusal: String? = null, functionCall: FunctionCall? = null, reasoningContent: String? = null)

Properties

Link copied to clipboard

Output citations.

Link copied to clipboard
val audio: ChatAudio? = null

Audio output.

Link copied to clipboard
val content: String? = null

Output text.

Link copied to clipboard
@SerialName(value = "content_parts")
val contentParts: List<ChatInputPart>? = null

Structured content returned when stored message content is null.

Link copied to clipboard
@SerialName(value = "function_call")
val functionCall: FunctionCall? = null

Legacy function output when requested alongside advanced options.

Link copied to clipboard
val id: String? = null

Stored message ID, when returned by message listing.

Link copied to clipboard
val name: String? = null

Participant name returned for stored messages.

Link copied to clipboard
@SerialName(value = "reasoning_content")
val reasoningContent: String? = null

Additional reasoning text from compatible providers.

Link copied to clipboard
val refusal: String? = null

Refusal explanation.

Link copied to clipboard
val role: Role? = null

Message role.

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

Function and custom calls.