AnswerGenerated class final

An answer was generated from retrieved passages.

Inheritance

Constructors

AnswerGenerated({required String id, required DateTime timestamp, required int citationsOffered, required int citationsUsed, required Duration duration, bool answeredFromContext = true, String? runId, String? source, String? traceId, String? spanId})
Creates the event.
const

Properties

answeredFromContext bool
Whether the model reported it could answer from what it was given.
final
citationsOffered int
How many passages the model was given.
final
citationsUsed int
How many it actually cited.
final
duration Duration
How long generation took.
final
hashCode int
The hash code for this object.
no setterinherited
id String
Unique, sortable identifier for this event.
finalinherited
runId String?
Identifier of the run this event belongs to.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
source String?
Component that published the event, such as agent:researcher.
finalinherited
spanId String?
Span this event was emitted within, when tracing is active.
finalinherited
timestamp DateTime
When the event occurred, in UTC.
finalinherited
traceId String?
Trace this event was emitted within, when tracing is active.
finalinherited
type String
Stable, dotted type name, such as llm.response.completed.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
payload() → JsonMap
Event-specific payload, excluding the envelope fields.
toJson() → JsonMap
Serialises the complete event, envelope included.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited