Part class final

A datatype containing media that is part of a multi-part Content message.

A Part consists of data which has an associated datatype. A Part can only contain one of the accepted types in Part.data.

A Part must have a fixed IANA MIME type identifying the type and subtype of the media if the inline_data field is filled with raw bytes.

Constructors

Part({String? text, Blob? inlineData, FunctionCall? functionCall, FunctionResponse? functionResponse, FileData? fileData, ExecutableCode? executableCode, CodeExecutionResult? codeExecutionResult, VideoMetadata? videoMetadata, bool thought = false, Uint8List? thoughtSignature, Struct? partMetadata})
Part.fromJson(Object? j)
factory

Properties

codeExecutionResult → CodeExecutionResult?
Result of executing the ExecutableCode.
final
executableCode → ExecutableCode?
Code generated by the model that is meant to be executed.
final
fileData → FileData?
URI based data.
final
functionCall → FunctionCall?
A predicted FunctionCall returned from the model that contains a string representing the FunctionDeclaration.name with the arguments and their values.
final
functionResponse → FunctionResponse?
The result output of a FunctionCall that contains a string representing the FunctionDeclaration.name and a structured JSON object containing any output from the function is used as context to the model.
final
hashCode → int
The hash code for this object.
no setterinherited
inlineData → Blob?
Inline media bytes.
final
partMetadata → Struct?
Custom metadata associated with the Part. Agents using genai.Part as content representation may need to keep track of the additional information. For example it can be name of a file/source from which the Part originates or a way to multiplex multiple Part streams.
final
qualifiedName → String
The fully qualified name of this message, i.e., google.protobuf.Duration or google.rpc.ErrorInfo.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
text → String?
Inline text.
final
thought → bool
Optional. Indicates if the part is thought from the model.
final
thoughtSignature → Uint8List
Optional. An opaque signature for the thought so it can be reused in subsequent requests.
final
videoMetadata → VideoMetadata?
Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.
final

Methods

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

Operators

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

Constants

fullyQualifiedName → const String