ChatInputMessage

@Serializable
data class ChatInputMessage(val role: Role, val content: ChatInputContent? = null, val name: String? = null, val toolCalls: List<ChatResultToolCall>? = null, val toolCallId: String? = null, val audio: ChatAudio? = null, val refusal: String? = null, val functionCall: FunctionCall? = null, val reasoningContent: String? = null)

Advanced input message supporting multimodal content and custom tool calls.

Constructors

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

Properties

Link copied to clipboard
val audio: ChatAudio? = null

Prior audio output reference.

Link copied to clipboard

Plain text or structured content.

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

Legacy function call in assistant history.

Link copied to clipboard
val name: String? = null

Optional participant name.

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

Additional reasoning text in assistant history.

Link copied to clipboard
val refusal: String? = null

Refusal text for assistant history.

Link copied to clipboard
val role: Role

Message author.

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

Call answered by a tool message.

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

Calls emitted by an assistant message.