SimpleTool
Represents a simplified tool base class that processes specific arguments and produces a textual result.
Parameters
The type of arguments the tool accepts, which must be a subtype of Tool.Args
.
Properties
Serializer responsible for encoding and decoding the arguments required for the tool execution. This abstract property is used to define the specific KSerializer corresponding to the type of arguments expected by the tool.
Provides a descriptor detailing the tool's metadata, including its name, description, and parameter requirements. This property defines the structure and characteristics of the tool, offering an overview of its functionality and how it should be used.
Functions
Decodes the provided raw JSON arguments into an instance of the specified arguments type.
Decodes a raw string representation of arguments into the corresponding object of type TArgs.
Encodes the given arguments into a JSON representation.
Encodes the provided arguments into a JSON string representation using the configured serializer.
Encodes the given result of type TResult to its string representation for the LLM.s
Encodes the provided result object into a JSON string representation without type safety checks.