Content class final
The base structured datatype containing multi-part content of a message.
Constructors
-
Content.new(String? role, List<
Part> parts)
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object?> - Convert the Content to json format.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
functionResponse(
String name, Map< String, Object?> response) → Content - Return a Content with FunctionResponse.
-
functionResponses(
Iterable< FunctionResponse> responses) → Content - Return a Content with multiple FunctionResponse.
-
inlineData(
String mimeType, Uint8List bytes) → Content - Return a Content with InlineDataPart.
-
model(
Iterable< Part> parts) → Content - Return a Content with multiple Parts from the model.
-
multi(
Iterable< Part> parts) → Content - Return a Content with multiple Parts.
-
system(
String instructions) → Content - Return a Content with TextPart of system instruction.
-
text(
String text) → Content - Return a Content with TextPart.