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 |
---|
{
"parts": [
{
object ( |
Fields | |
---|---|
parts[] |
Ordered |
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. |
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 the inlineData
field is filled with raw bytes.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field
|
|
text |
Inline text. |
inlineData |
Inline media bytes. |
Blob
Raw media bytes.
Text should not be sent as raw bytes, use the 'text' field.
JSON representation |
---|
{ "mimeType": string, "data": string } |
Fields | |
---|---|
mimeType |
The IANA standard MIME type of the source data. Examples: - image/png - image/jpeg If an unsupported MIME type is provided, an error will be returned. For a complete list of supported types, see Supported file formats. |
data |
Raw bytes for media formats. A base64-encoded string. |