ToolResult
@SerialName(value = "tool_result")
@Serializable
The result of executing a tool, sent back to the model.
Samples
// ToolCall and ToolResult are used as a request only if you have disabled autoExecute and are processing the tool manually.
val executeResult = executeTool(toolCall.name, toolCall.argumentsJson) // Returns String.
// Create a ToolResult.
val toolResult = Content.ToolResult(
toolCallId = toolCall.id,
name = toolCall.name,
content = toolCall.argumentsJson
)
// Send toolResult to API...Content copied to clipboard