ChatResponseUpdate class

Represents a single streaming update to a chat response.

Constructors

ChatResponseUpdate({ChatRole? role, String? authorName, List<AIContent>? contents, Object? rawRepresentation, AdditionalPropertiesDictionary? additionalProperties, String? responseId, String? messageId, String? conversationId, DateTime? createdAt, ChatFinishReason? finishReason, String? modelId, ResponseContinuationToken? continuationToken, UsageDetails? usage})
Creates a new ChatResponseUpdate.
ChatResponseUpdate.fromText(ChatRole? role, String text)
Creates a ChatResponseUpdate with text content.

Properties

additionalProperties AdditionalPropertiesDictionary?
Additional properties.
getter/setter pair
authorName String?
The name of the update author.
getter/setter pair
contents List<AIContent>
The content items in this update.
final
continuationToken ResponseContinuationToken?
A token to resume an interrupted response.
getter/setter pair
conversationId String?
The conversation identifier.
getter/setter pair
createdAt DateTime?
When this update was created.
getter/setter pair
finishReason ChatFinishReason?
The reason the response finished being generated.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
messageId String?
The message group identifier.
getter/setter pair
modelId String?
The model that generated this update.
getter/setter pair
rawRepresentation Object?
The underlying implementation-specific object.
getter/setter pair
responseId String?
The parent response identifier.
getter/setter pair
role ChatRole?
The role of the update author.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
text String
Gets concatenated text from all TextContent items.
no setter
usage UsageDetails?
Usage details.
getter/setter pair

Methods

clone() ChatResponseUpdate
Creates a deep copy of this update.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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