ModelMessage class

A message generated by the AI model, including text output, function calls, and multi-modal content.

Inheritance

Constructors

ModelMessage({String? thought, String? thoughtSignature, List<FunctionCall> functionCalls = const [], String? textOutput, List<ModelImagePart> imageOutputs = const [], List<ModelVideoPart> videoOutputs = const [], List<ModelAudioPart> audioOutputs = const [], ModelUsage? usage, Map<String, dynamic>? metadata, String? stopReason, required String model, String? responseId, int? timestamp})
ModelMessage.fromJson(Map<String, dynamic> json)
factory

Properties

audioOutputs List<ModelAudioPart>
final
functionCalls List<FunctionCall>
final
hashCode int
The hash code for this object.
no setterinherited
imageOutputs List<ModelImagePart>
final
metadata Map<String, dynamic>?
final
model String
final
responseId String?
final
role MessageRole
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stopReason String?
final
textOutput String?
final
thought String?
final
thoughtSignature String?
final
timestamp int
final
usage ModelUsage?
final
videoOutputs List<ModelVideoPart>
final

Methods

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

Operators

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