ToolResult

@Serializable
@SerialName(value = "tool_result")
data class ToolResult(val toolCallId: String, val toolName: String, val text: String, val isError: Boolean = false) : ChatMessage

The outcome of one ToolCall, sent back to the model.

Constructors

Link copied to clipboard
constructor(toolCallId: String, toolName: String, text: String, isError: Boolean = false)

Properties

Link copied to clipboard

true when the tool failed. The model sees the error and can try again.

Link copied to clipboard
open override val text: String

what the tool returned, or what went wrong when isError is true.

Link copied to clipboard

the ToolCall.id this result answers.

Link copied to clipboard

the ToolCall.name this result answers.