Tool Message
@Serializable
@SerialName(value = "tool" )
Tool-role message — the result of executing a ToolCall produced by the model.
Echo toolCallId from the matching ToolCall so the model can correlate the result with its original call.
Example:
val toolResult = ToolMessage(
content = Json.encodeToString(weatherResponse),
toolCallId = toolCall.id,
)Content copied to clipboard