System

data class System @JvmOverloads constructor(val parts: List<ContentPart.Text>, val metaInfo: RequestMetaInfo, val cacheControl: CacheControl? = null) : Message.Request(source)

Represents a system-generated message.

Constructors

Link copied to clipboard
constructor(parts: List<ContentPart.Text>, metaInfo: RequestMetaInfo, cacheControl: CacheControl? = null)
constructor(part: ContentPart.Text, metaInfo: RequestMetaInfo, cacheControl: CacheControl? = null)

Single content part system message constructor

constructor(content: String, metaInfo: RequestMetaInfo, cacheControl: CacheControl? = null)

Text content system message constructor

Properties

Link copied to clipboard

The cache strategy for this message.

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

The parts of the system message.

Link copied to clipboard
open override 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 single text content.