Assistant

data class Assistant(val content: String, val metaInfo: ResponseMetaInfo, val mediaContent: MediaContent? = null, val finishReason: String? = null) : Message.Response(source)

Represents a message generated by the assistant as a response.

Constructors

Link copied to clipboard
constructor(content: String, metaInfo: ResponseMetaInfo, mediaContent: MediaContent? = null, finishReason: String? = null)

Properties

Link copied to clipboard
open override val content: String

The textual content of the assistant's response.

Link copied to clipboard
val finishReason: String? = null

An optional explanation for why the assistant's response was finalized. Defaults to null if not provided.

Link copied to clipboard

Optional media content attached to the message.

Link copied to clipboard
open override val metaInfo: ResponseMetaInfo

Metadata related to the response, including token counts and timestamp.

Link copied to clipboard
open override val role: Message.Role

The role associated with the response, which is fixed as Role.Assistant.