ToolCall

@Serializable
class ToolCall(val id: String, val type: ToolCallType, val function: FunctionResponse)

A tool invocation emitted by the model inside a ChatCompletionMessage.

Echo id back in a follow-up ToolMessage so the model can correlate the tool result with its original call.

Constructors

Link copied to clipboard
constructor(id: String, type: ToolCallType, function: FunctionResponse)

Properties

Link copied to clipboard

Function name the model asked to call, together with the JSON arguments it produced.

Link copied to clipboard
val id: String

Identifier that must be echoed back in the matching ToolMessage.

Link copied to clipboard

Tool type discriminator; currently always ToolCallType.FUNCTION.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String