Event
data class Event(val id: String = Uuid.random(), val invocationId: String? = null, val author: String, val content: Content? = null, val actions: EventActions = EventActions(), val longRunningToolIds: Set<String> = emptySet(), val partial: Boolean = false, val turnComplete: Boolean = false, val errorCode: String? = null, val errorMessage: String? = null, val finishReason: FinishReason? = null, val usageMetadata: UsageMetadata? = null, val avgLogProbs: Double? = null, val interrupted: Boolean = false, val branch: String? = null, val groundingMetadata: GroundingMetadata? = null, val modelVersion: String? = null, val citationMetadata: CitationMetadata? = null, val customMetadata: Map<String, Any>? = null, val timestamp: Long = Clock.System.now().toEpochMilliseconds())
Represents an event in a session.
Constructors
Link copied to clipboard
constructor(id: String = Uuid.random(), invocationId: String? = null, author: String, content: Content? = null, actions: EventActions = EventActions(), longRunningToolIds: Set<String> = emptySet(), partial: Boolean = false, turnComplete: Boolean = false, errorCode: String? = null, errorMessage: String? = null, finishReason: FinishReason? = null, usageMetadata: UsageMetadata? = null, avgLogProbs: Double? = null, interrupted: Boolean = false, branch: String? = null, groundingMetadata: GroundingMetadata? = null, modelVersion: String? = null, citationMetadata: CitationMetadata? = null, customMetadata: Map<String, Any>? = null, timestamp: Long = Clock.System.now().toEpochMilliseconds())
Properties
Link copied to clipboard
Optional actions associated with this event.
Link copied to clipboard
The average log probabilities of the generated tokens.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
A human-readable error message if an error occurred.
Link copied to clipboard
The reason the LLM generation finished.
Link copied to clipboard
The grounding metadata of the event.
Link copied to clipboard
True if the generation of this event was interrupted.
Link copied to clipboard
Id of the invocation that this event belongs to.
Link copied to clipboard
Returns true if this is a final response.
Link copied to clipboard
Set of ids of the long running function calls. Agent client will know from this field about which function call is long running.
Link copied to clipboard
The model version used to generate the response.
Link copied to clipboard
True if this event marks the completion of a turn.
Link copied to clipboard
Metadata about the token usage for the LLM call.