Tool
Declaration of a tool the model may call during a chat completion.
The DeepSeek API currently supports function tools only; provide the schema via FunctionRequest.parameters so the model can emit matching arguments.
Example:
val weather = Tool(
type = ToolCallType.FUNCTION,
function = FunctionRequest(
name = "get_weather",
description = "Get the current weather for a city",
parameters = buildJsonObject {
put("type", "object")
putJsonObject("properties") {
putJsonObject("city") { put("type", "string") }
}
putJsonArray("required") { add("city") }
},
),
)Content copied to clipboard
Properties
Link copied to clipboard
Function signature the model can call.
Link copied to clipboard
Tool type discriminator; currently always ToolCallType.FUNCTION.