Request

sealed interface Request : Message(source)

Represents a request message in the chat.

Inheritors

Properties

Link copied to clipboard
open val content: String

The textual content of the message aggregated from all ContentPart.Text parts joined to String separated by newlines.

Link copied to clipboard
abstract override val metaInfo: RequestMetaInfo

Stores metadata information for the current message instance, such as token count and timestamp.

Link copied to clipboard
abstract val parts: List<ContentPart>

The content parts of the message. By default, if the message is a single text message, it will contain a single ContentPart.Text part. If the message contains multiple parts, it will contain an ordered list of ContentPart.Text and ContentPart.Attachment instances.

Link copied to clipboard
abstract val role: Message.Role

The role associated with the message.

Functions

Link copied to clipboard

Checks weather the message consists of attachments.

Link copied to clipboard

Checks weather the message consists of only sungle text content.