OutputTextDeltaEvent class
Event with a text delta.
- Inheritance
-
- Object
- StreamingEvent
- OutputTextDeltaEvent
- Available extensions
- Annotations
-
- @immutable
Constructors
-
OutputTextDeltaEvent({required int sequenceNumber, required String itemId, required int outputIndex, required int contentIndex, required String delta, List<
LogProb> logprobs = const [], String? obfuscation}) -
Creates an OutputTextDeltaEvent.
const
-
OutputTextDeltaEvent.fromJson(Map<
String, dynamic> json) -
Creates an OutputTextDeltaEvent from JSON.
factory
Properties
- contentIndex → int
-
The content index.
final
- delta → String
-
The text delta.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- isFinal → bool
-
Available on StreamingEvent, provided by the StreamingEventExtensions extension
Whether this is the final event (response completed/failed/incomplete).no setter - itemId → String
-
The item ID.
final
-
logprobs
→ List<
LogProb> -
Token log probabilities emitted with the delta.
final
- obfuscation → String?
-
An obfuscation string added to pad the event payload.
final
- outputIndex → int
-
The output index.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sequenceNumber → int
-
The sequence number of the event.
final
- textDelta → String?
-
Available on StreamingEvent, provided by the StreamingEventExtensions extension
Extract text delta if this is a text delta event.no setter - type → String
-
The event type.
no setter
Methods
-
copyWith(
{int? sequenceNumber, String? itemId, int? outputIndex, int? contentIndex, String? delta, List< LogProb> ? logprobs, Object? obfuscation = unsetCopyWithValue}) → OutputTextDeltaEvent - Creates a copy with replaced values.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Converts to JSON.
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override