ToolCapable
Interface for chat clients that support automatic tool execution in a loop.
When the model requests a tool call, the client can automatically:
Parse the tool call arguments.
Find and execute the matching KoryTool.
Send the tool result back to the model.
Repeat until the model produces a text response.
This loop can be disabled with autoExecute = false, and callbacks are provided for monitoring tool calls.
Types
Callback invoked when a tool is called. Parameters: (toolName, argsJson).
Functions
Streams a chat with automatic tool execution.
Streams a chat with tools using full DSL configuration.
Sends a chat request with automatic tool execution.
Sends a chat request with tools using full DSL configuration.
Sends a chat request with tool support and wraps the result in a Result.
Sends a chat request with tool support using the request DSL and wraps the result in a Result.
Executes a tool call by finding the matching tool and running it.