ToolResult

interface ToolResult(source)

Deprecated

Extending ToolResult is no longer required. Tool results are entirely handled by KotlinX Serialization.

Represents a result produced by a tool operation. This is a marker interface implemented by various result types.

Inheritors

Types

Link copied to clipboard

A serializer that converts an object implementing the TextSerializable interface into a textual format by utilizing the textForLLM function defined in the interface.

Link copied to clipboard
value class Boolean(val result: Boolean) : ToolResult

A custom inline value class that wraps a kotlin.Boolean to provide additional functionality or semantics.

Link copied to clipboard
object Companion

Companion object for the enclosing class.

Link copied to clipboard

Represents an interface that provides functionality for serializing implementing classes into JSON format using kotlinx.serialization library.

Link copied to clipboard
value class Number(val result: Number) : ToolResult

Represents a numeric value as a tool result.

Link copied to clipboard

Result implementation representing a simple tool result, just a string.

Link copied to clipboard

Abstract class representing a text-serializable object. This class provides a contract for converting an object to a text representation that can be utilized by language learning models (LLMs) or other text-processing systems.

Functions

Link copied to clipboard
abstract fun toStringDefault(): String

Provides a string representation of the implementing instance with default formatting.