Message class

Available extensions

Constructors

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

Properties

content List<Part>
getter/setter pair
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>?
getter/setter pair
role Role
getter/setter pair
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
toolRequests List<ToolRequest>

Available on Message, provided by the MessageExtension extension

The tool requests in the response.
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.
override

Operators

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

Constants

$schema → const SchemanticType<Message>