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.
JSON representation |
---|
{
"role": string,
"parts": [
{
object ( |
Fields | |
---|---|
role |
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. |
parts[] |
Required. Ordered |
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.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field
|
|
text |
Optional. Text part (can be code). |
inlineData |
Optional. Inlined bytes data. |
fileData |
Optional. URI based data. |
functionCall |
Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values. |
functionResponse |
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. |
Union field
|
|
videoMetadata |
Optional. Video metadata. The metadata should only be specified while the video data is presented in inlineData or fileData. |
Blob
Content blob.
It's preferred to send as text
directly rather than raw bytes.
JSON representation |
---|
{ "mimeType": string, "data": string } |
Fields | |
---|---|
mimeType |
Required. The IANA standard MIME type of the source data. |
data |
Required. Raw bytes. A base64-encoded string. |
FileData
URI based data.
JSON representation |
---|
{ "mimeType": string, "fileUri": string } |
Fields | |
---|---|
mimeType |
Required. The IANA standard MIME type of the source data. |
fileUri |
Required. URI. |
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.
JSON representation |
---|
{ "name": string, "args": { object } } |
Fields | |
---|---|
name |
Required. The name of the function to call. Matches [FunctionDeclaration.name]. |
args |
Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. |
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.
JSON representation |
---|
{ "name": string, "response": { object } } |
Fields | |
---|---|
name |
Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. |
response |
Required. The function response in JSON object format. |
VideoMetadata
metadata describes the input video content.
JSON representation |
---|
{ "startOffset": string, "endOffset": string } |
Fields | |
---|---|
startOffset |
Optional. The start offset of the video. A duration in seconds with up to nine fractional digits, ending with ' |
endOffset |
Optional. The end offset of the video. A duration in seconds with up to nine fractional digits, ending with ' |