Assistant

data class Assistant(val content: String, val metaInfo: ResponseMetaInfo, val attachments: List<Attachment> = emptyList(), val finishReason: String? = null) : Message.Response, Message.WithAttachments(source)

Represents a message generated by the assistant as a response.

Constructors

Link copied to clipboard
constructor(content: String, metaInfo: ResponseMetaInfo, attachments: List<Attachment> = emptyList(), finishReason: String? = null)

Properties

Link copied to clipboard
open override val attachments: List<Attachment>

Optional media content attached to the message.

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
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.

Functions

Link copied to clipboard
open override fun copy(updatedMetaInfo: ResponseMetaInfo): Message.Assistant

Creates a copy of the current Response instance with updated metadata.