ToolFunction

@Serializable(with = ToolFunctionSerializer::class)
sealed interface ToolFunction

A function referenced by a tool.

Has two concrete forms: FunctionRequest — the signature the model may call, sent in the request — and FunctionResponse — the call the model actually emitted, received in the response. The ToolFunctionSerializer picks the right form at deserialization based on the presence of parameters vs. arguments.

Inheritors

Properties

Link copied to clipboard
abstract val name: String

Function name, shared by both variants.