ChatMessage class
- Implemented types
Constructors
-
ChatMessage({required ChatMessageRole role, required String text, DateTime? timestamp, Map<
String, Object?> metadata = const <String, Object?>{}, List<ChatInputOmission> omissions = const <acp.ChatInputOmission>[], ChatInputBudget inputBudget = const acp.ChatInputBudget()}) -
factory
-
ChatMessage.projectionGuarded({required ChatMessageRole role, required String text, DateTime? timestamp, required Map<
String, Object?> metadata, required List<ChatInputOmission> omissions, required ChatInputBudget inputBudget}) -
factory
Properties
- acceptedUtf8Bytes → int
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- materializationCount → int
-
no setter
-
metadata
→ Map<
String, Object?> -
final
-
omissions
→ List<
ChatInputOmission> -
no setteroverride
- previewText → String
-
A stable bounded prefix for compact UI projections that must not
materialize a multi-megabyte streaming response on every text delta.
no setteroverride
- projectionOwnerToken ↔ Object?
-
getter/setter pair
- projectionTurnId ↔ int?
-
getter/setter pair
- retainedBytes → int
-
no setter
- revision → int
-
no setteroverride
- role → ChatMessageRole
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- text ↔ String
-
getter/setter pairoverride-getter
- timestamp → DateTime
-
final
- turnId → int?
-
no setteroverride
Methods
-
addOmission(
ChatInputOmission omission) → bool -
appendAcceptedText(
String value, {required int acceptedUtf8Bytes}) → void -
freeze(
) → ChatMessage -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
projectionAddOmissionForOwner(
Object ownerToken, ChatInputOmission omission) → bool -
projectionAppendAcceptedTextForOwner(
Object ownerToken, String value, {required int acceptedUtf8Bytes}) → void -
projectionClaimOwnership(
Object ownerToken, int turnId) → void -
projectionCopyForBudget(
ChatInputBudget inputBudget, {required bool frozen, bool preserveTurnId = true}) → ChatMessage -
projectionRequireOwner(
Object ownerToken) → void -
projectionSetTextForOwner(
Object ownerToken, String value) → void -
thaw(
) → ChatMessage -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited