Tool

sealed interface Tool : Message(source)

Represents messages exchanged with tools, either as calls or results.

Inheritors

Types

Link copied to clipboard
data class Call(val id: String?, val tool: String, val content: String, val metaInfo: ResponseMetaInfo) : Message.Tool, Message.Response

Represents a tool call message sent as a response.

Link copied to clipboard
data class Result(val id: String?, val tool: String, val content: String, val metaInfo: RequestMetaInfo) : Message.Tool, Message.Request

Represents the result of a tool call sent as a request.

Properties

Link copied to clipboard
abstract val content: String

The content of the message.

Link copied to clipboard
abstract val id: String?

The unique identifier of the tool call.

Link copied to clipboard

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

Link copied to clipboard
abstract val role: Message.Role

The role associated with the message.

Link copied to clipboard
abstract val tool: String

The name of the tool used.