Message class

Constructors

Message({required Role role, Contents contents = Contents.empty, List<ToolCall> toolCalls = const [], Map<String, String> channels = const {}})
const
Message.fromJson(Map<String, Object?> json)
factory
Message.fromJsonString(String jsonString)
factory
Message.model({Contents contents = Contents.empty, List<ToolCall> toolCalls = const [], Map<String, String> channels = const {}})
factory
Message.modelText(String text)
factory
Message.system(String text)
factory
Message.systemContents(Contents contents)
factory
Message.tool(Contents contents)
factory
Message.user(String text)
factory
Message.userContents(Contents contents)
factory

Properties

channels Map<String, String>
final
contents Contents
final
hashCode int
The hash code for this object.
no setterinherited
role Role
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
text String
no setter
toolCalls List<ToolCall>
final

Methods

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

Operators

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