AIChatMessage class

Type of message that is spoken by the AI.

Inheritance
Annotations
  • @immutable

Constructors

AIChatMessage({required String content, List<AIChatMessageToolCall> toolCalls = const []})
Type of message that is spoken by the AI.
const

Properties

content String
The content of the message.
final
contentAsString String
Returns to content of the message as a string.
no setterinherited
hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
toolCalls List<AIChatMessageToolCall>
The list of tool that the model wants to call. If the model does not want to call any tool, this list will be empty.
final

Methods

concat(ChatMessage other) AIChatMessage
Merges this message with another by concatenating the content.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(covariant AIChatMessage other) bool
The equality operator.
override

Constants

defaultPrefix → const String
Default prefix for AIChatMessage.