Call

data class Call(val id: String?, val tool: String, val parts: List<ContentPart.Text>, val metaInfo: ResponseMetaInfo) : Message.Tool, Message.Response(source)

Represents a tool call message sent as a response.

Constructors

Link copied to clipboard
constructor(id: String?, tool: String, part: ContentPart.Text, metaInfo: ResponseMetaInfo)

Single content part tool call message constructor

constructor(id: String?, tool: String, content: String, metaInfo: ResponseMetaInfo)

Text content tool call message constructor

constructor(id: String?, tool: String, 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

Lazily parses the content of the tool call as a JSON object.

Link copied to clipboard
open override val id: String?

The unique identifier of the tool call.

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 parts: List<ContentPart.Text>

The parts of the tool call. Only the ContentPart.Text part is allowed.

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

The role associated with the message.

Link copied to clipboard
open override val tool: String

The name of the tool being called.

Functions

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

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