A datatype containing media content.

Exactly one field within a Part should be set, representing the specific type of content being conveyed. Using multiple fields within the same Part instance is considered invalid.

interface Part {
    codeExecutionResult?: CodeExecutionResult;
    executableCode?: ExecutableCode;
    fileData?: FileData;
    functionCall?: FunctionCall;
    functionResponse?: FunctionResponse;
    inlineData?: Blob;
    mediaResolution?: PartMediaResolution;
    text?: string;
    thought?: boolean;
    thoughtSignature?: string;
    videoMetadata?: VideoMetadata;
}

Properties

codeExecutionResult?: CodeExecutionResult

Optional. The result of executing the ExecutableCode.

executableCode?: ExecutableCode

Optional. Code generated by the model that is intended to be executed.

fileData?: FileData

Optional. The URI-based data of the part. This can be used to include files from Google Cloud Storage.

functionCall?: FunctionCall

Optional. A predicted function call returned from the model. This contains the name of the function to call and the arguments to pass to the function.

functionResponse?: FunctionResponse

Optional. The result of a function call. This is used to provide the model with the result of a function call that it predicted.

inlineData?: Blob

Optional. The inline data content of the part. This can be used to include images, audio, or video in a request.

mediaResolution?: PartMediaResolution

Media resolution for the input media.

text?: string

Optional. The text content of the part. When sent from the VSCode Gemini Code Assist extension, references to

items will be converted to markdown boldface text. For example @my-repo will be converted to and sent as **my-repo** by the IDE agent.

thought?: boolean

Optional. Indicates whether the part represents the model's thought process or reasoning.

thoughtSignature?: string

Optional. An opaque signature for the thought so it can be reused in subsequent requests.

Encoded as base64 string.

videoMetadata?: VideoMetadata

Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.