User

data class User @JvmOverloads constructor(val parts: List<ContentPart>, val metaInfo: RequestMetaInfo) : Message.Request(source)

Represents a message sent by the user as a request.

Constructors

Link copied to clipboard
constructor(part: ContentPart, metaInfo: RequestMetaInfo)

Single content part user message constructor

constructor(content: String, metaInfo: RequestMetaInfo)

Text content user message constructor

constructor(parts: List<ContentPart>, metaInfo: RequestMetaInfo)

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
open override val metaInfo: RequestMetaInfo

Metadata associated with the request, including timestamp information. Defaults to a new RequestMetaInfo.

Link copied to clipboard
open override val parts: List<ContentPart>

The parts of the user's message.

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

The role of the message, which is fixed as Role.User for this implementation.

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.