UserMessage class

User message.

Inheritance

Constructors

UserMessage({String? name, required List<MessageContent> contents})
create a user message with complex / multi-part content.
UserMessage.text({String? name, required String content})
create a basic text user message.
const

Properties

content String?
Text content in case of basic text user message.
final
contents List<MessageContent>
List of message content parts.
final
hashCode int
The hash code for this object.
no setterinherited
name String?
name of the message.
finalinherited
role String
Role of the message.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Operators

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