AssistantChatMessage class

A class representing a chat message from an assistant.

This class extends the ChatMessage class and overrides the role getter to return 'assistant', indicating that the message is from an assistant.

Example usage:

var message = AssistantChatMessage('Hello, how can I assist you?');
print(message.role); // Outputs: assistant
print(message.content); // Outputs: Hello, how can I assist you?

See also:

Inheritance

Constructors

AssistantChatMessage.new(String content)
Represents a chat message from the assistant.

Properties

content String
The content of the chat message.
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
role String
The role of the chat message sender.
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
toMap() Map<String, String>
Converts the current ChatMessage instance to a map.
inherited
toString() String
A string representation of this object.
inherited

Operators

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