koryTools
Creates a list of tools using the DSL builder.
Return
A list of KoryTool instances.
Parameters
init
A ToolsBuilder lambda for registering tools.
See also
Samples
// Create tool instance.
val getWeatherTool = TestWeatherTool()
// Create koryTools
val tools = koryTools {
tool(getWeatherTool) // Add getWeatherTool.
}
// Add tools to request.
val requestWithKoryChat = koryChat(model = "gpt-5.6-sol") {
user("Hello, what's the weather like in London?")
}.asChatRequest(
tools = tools
)
// Or with request.
val requestWithKoryRequest = koryChatRequest {
registerTools(tools)
chat(model = "gpt-5.6-sol") {
user("Hello, what's the weather like in London?")
}
}Content copied to clipboard