Assistant

@Serializable
@SerialName(value = "assistant")
data class Assistant(val content: OpenAIChatCompletionContent? = null, val name: String? = null, val refusal: String? = null, val audio: OpenAIAssistantAudioParam? = null, val functionCall: OpenAIFunctionCall? = null, val toolCalls: List<OpenAIToolCall>? = null) : OpenAIMessageParam

An assistant message (for conversation history).

Constructors

Link copied to clipboard
constructor(content: OpenAIChatCompletionContent? = null, name: String? = null, refusal: String? = null, audio: OpenAIAssistantAudioParam? = null, functionCall: OpenAIFunctionCall? = null, toolCalls: List<OpenAIToolCall>? = null)

Properties

Link copied to clipboard

Data about a previous audio response from the model. null when not continuing an audio conversation.

Link copied to clipboard

The assistant's response content. null when only tool calls are present.

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

Deprecated function call, replaced by toolCalls. null when legacy function calling is not used.

Link copied to clipboard
val name: String?

Optional identifier.

Link copied to clipboard

The refusal message by the assistant. null when the model did not refuse.

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

Tool calls made by the assistant.