Message class

Available extensions
Annotations
  • @JsonSerializable(explicitToJson: true, includeIfNull: false)

Constructors

Message.new({required Role? role, required List<Part?>? content, Map<String, dynamic>? metadata})
Message.fromJson(Map<String, dynamic> json)
factory

Properties

content List<Part?>?
final
hashCode int
The hash code for this object.
no setterinherited
media Media?

Available on Message, provided by the MessageExtension extension

The media content of the message.
no setter
metadata Map<String, dynamic>?
final
role Role?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
text String

Available on Message, provided by the MessageExtension extension

The text content of the message.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

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