Reasoning

data class Reasoning(val id: String? = null, val encrypted: String? = null, val parts: List<ContentPart.Text>, val metaInfo: ResponseMetaInfo) : Message.Response(source)

Represents a reasoning message exchanged in a chat system, encapsulating the content, role, and associated metadata, with an optional reference to the original thinking process.

Constructors

Link copied to clipboard
constructor(id: String? = null, encrypted: String? = null, content: String, metaInfo: ResponseMetaInfo)

Single content part reasoning message constructor

constructor(id: String? = null, encrypted: String? = null, parts: List<ContentPart.Text>, metaInfo: ResponseMetaInfo)

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
val encrypted: String? = null

The encrypted content of the reasoning message.

Link copied to clipboard
val id: String? = null

An optional identifier for the reasoning process.

Link copied to clipboard
open override val metaInfo: ResponseMetaInfo

Metadata associated with the reasoning, captured as a ResponseMetaInfo instance. Provides details such as token usage and timestamps.

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

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
open override val role: Message.Role

The Role of the message, indicating its source or function in the chat (e.g., assistant, user). Defaults to Role.Assistant.

Functions

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

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

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.

Link copied to clipboard