Content class final

The base structured datatype containing multi-part content of a message.

Constructors

Content(String? role, List<Part> parts)

Properties

hashCode int
The hash code for this object.
no setterinherited
parts List<Part>
Ordered Parts that constitute a single message.
final
role String?
The producer of the content.
final
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, Object?>
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

data(String mimeType, Uint8List bytes) Content
functionResponse(String name, Map<String, Object?>? response) Content
functionResponses(Iterable<FunctionResponse> responses) Content
model(Iterable<Part> parts) Content
multi(Iterable<Part> parts) Content
system(String instructions) Content
text(String text) Content