Content class sealed
Represents content in the message of the conversation.
Constructors
- Content.audioBytes(Uint8List bytes)
-
Audio provided as raw bytes.
factory
- Content.audioFile(String path)
-
Audio provided by a file path.
factory
-
Content.fromJson(Map<
String, Object?> json) -
Creates content from JSON-compatible values.
factory
- Content.imageBytes(Uint8List bytes)
-
Image provided as raw bytes.
factory
- Content.imageFile(String path)
-
Image provided by a file path.
factory
- Content.text(String text)
-
Text.
factory
- Content.toolResponse({required String name, required Object? response})
-
Tool response provided by the user.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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?> - Converts this content to JSON-compatible values.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited