ChatMessageData class
Immutable message for hosts that do not already own a message model. id is stable across updates; revision must change when content changes.
- Implemented types
- Implementers
Constructors
-
ChatMessageData({String id = '', required ChatMessageRole role, required String text, DateTime? timestamp, int? turnId, int revision = 0, Map<
String, Object?> metadata = const {}, List<ChatInputOmission> omissions = const []})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
final
-
metadata
→ Map<
String, Object?> -
final
-
omissions
→ List<
ChatInputOmission> -
final
- previewText → String
-
no setteroverride
- revision → int
-
final
- role → ChatMessageRole
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- text → String
-
final
- timestamp → DateTime
-
final
- turnId → int?
-
final
Methods
-
copyWith(
{String? text, Map< String, Object?> ? metadata}) → ChatMessageData -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited