MediaGenerationResult class
Streaming chunk returned by a media generation model.
Each chunk represents the latest state of an in-flight media run. Providers should incrementally emit new assets, links, metadata, and usage updates.
- Inheritance
-
- Object
- LanguageModelResult<
List< Part> > - MediaGenerationResult
Constructors
-
MediaGenerationResult({List<
Part> assets = const [], List<LinkPart> links = const [], List<ChatMessage> messages = const [], bool isComplete = false, FinishReason finishReason = FinishReason.unspecified, Map<String, dynamic> metadata = const {}, LanguageModelUsage? usage, String? id}) - Creates a new media generation result chunk.
Properties
-
assets
→ List<
Part> -
Convenience getter for access to the emitted assets.
no setter
- finishReason → FinishReason
-
The reason the model stopped generating tokens.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Result id.
finalinherited
- isComplete → bool
-
Whether this chunk marks completion of the media generation request.
final
-
links
→ List<
LinkPart> -
Hosted links associated with this chunk.
no setter
-
messages
→ List<
ChatMessage> -
Messages generated during the media run.
no setter
-
metadata
→ Map<
String, dynamic> -
Other metadata about the generation.
finalinherited
-
output
→ List<
Part> -
Generated output.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- usage → LanguageModelUsage?
-
Usage stats for the generation.
finalinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited