ExitTool

An object representing the exit tool, primarily intended for ending conversations upon user request or based on agent decision. This tool finalizes interactions with a provided message.

The tool utilizes a structured set of arguments, which includes the final message of the agent to provide closure to the conversation. It returns the result as a standardized string, signaling the execution has been completed.

The descriptor defines the tool's metadata including its name, description, and required parameters.

Types

Link copied to clipboard
@Serializable
data class Args(val message: String) : Tool.Args

Properties

Link copied to clipboard
open override val argsSerializer: KSerializer<ExitTool.Args>
Link copied to clipboard
open override val descriptor: ToolDescriptor
Link copied to clipboard

Functions

Link copied to clipboard
fun decodeArgs(rawArgs: JsonObject): ExitTool.Args
Link copied to clipboard
Link copied to clipboard
open suspend override fun doExecute(args: ExitTool.Args): String
Link copied to clipboard
fun encodeArgs(args: ExitTool.Args): JsonObject
Link copied to clipboard
Link copied to clipboard
open override fun encodeResultToString(result: ToolResult.Text): String
Link copied to clipboard