LlmResponseEvent

data class LlmResponseEvent(val timestamp: Instant = Clock.System.now(), val correlationId: String, val model: String, val content: String?, val toolCalls: List<LlmToolCall>?, val callDuration: Duration, val usage: JsonObject? = null, val providerModel: String? = null, val finishReason: String? = null, val metadata: JsonObject? = null) : TracerEvent

Records the response received from an LLM call.

Constructors

Link copied to clipboard
constructor(timestamp: Instant = Clock.System.now(), correlationId: String, model: String, content: String?, toolCalls: List<LlmToolCall>?, callDuration: Duration, usage: JsonObject? = null, providerModel: String? = null, finishReason: String? = null, metadata: JsonObject? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val correlationId: String
Link copied to clipboard

Provider finish reason, when it reported one.

Link copied to clipboard
val metadata: JsonObject?

Other provider-reported metadata, when present.

Link copied to clipboard

The configured request model.

Link copied to clipboard

Model name the provider reported, when it reported one.

Link copied to clipboard
open override val timestamp: Instant
Link copied to clipboard
Link copied to clipboard
val usage: JsonObject?

Token usage exactly as the provider reported it; null when it reported none. Never estimated from text length or a tokenizer.

Functions

Link copied to clipboard
open override fun printableSummary(): String

Human-friendly multi-line summary suitable for printing in examples and demos. Mirrors tracer_events.py::printable_summary.