The base structured datatype containing multi-part content of a message.
A Content
includes a role
field designating the producer of the Content
and a parts
field containing multi-part data that contains the content of the message turn.
role
string
Optional. The producer of the content. Must be either 'user' or 'model'.
Useful to set for multi-turn conversations, otherwise can be left blank or unset.
Required. Ordered Parts
that constitute a single message. Parts may have different IANA MIME types.
JSON representation |
---|
{
"role": string,
"parts": [
{
object ( |
Part
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 inlineData
or fileData
field is filled with raw bytes.
data
Union type
data
can be only one of the following:text
string
Optional. Text part (can be code).
Optional. Inlined bytes data.
Optional. URI based data.
Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values.
Optional. 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 call. It is used as context to the model.
metadata
Union type
metadata
can be only one of the following:Optional. Video metadata. The metadata should only be specified while the video data is presented in inlineData or fileData.
JSON representation |
---|
{ // data "text": string, "inlineData": { object ( |
Blob
Content blob.
mimeType
string
Required. The IANA standard MIME type of the source data.
Required. Raw bytes.
A base64-encoded string.
JSON representation |
---|
{ "mimeType": string, "data": string } |
FileData
URI based data.
mimeType
string
Required. The IANA standard MIME type of the source data.
fileUri
string
Required. URI.
JSON representation |
---|
{ "mimeType": string, "fileUri": string } |
FunctionCall
A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing the parameters and their values.
name
string
Required. The name of the function to call. Matches [FunctionDeclaration.name].
Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details.
JSON representation |
---|
{ "name": string, "args": { object } } |
FunctionResponse
The result output from 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. This should contain the result of a [FunctionCall] made based on model prediction.
name
string
Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name].
Required. The function response in JSON object format. Use "output" key to specify function output and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as function output.
JSON representation |
---|
{ "name": string, "response": { object } } |
VideoMetadata
metadata describes the input video content.
Optional. The start offset of the video.
A duration in seconds with up to nine fractional digits, ending with 's
'. Example: "3.5s"
.
Optional. The end offset of the video.
A duration in seconds with up to nine fractional digits, ending with 's
'. Example: "3.5s"
.
JSON representation |
---|
{ "startOffset": string, "endOffset": string } |