- •The Generate content action generates a response from the model based on the given input. It creates a requestBody that contains fields with different types, such as string or array.
You must insert the access_token field from the Get access token action and the model_ID field to call the model, and create a payload. For example, the model_ID value can be gemini-1.5-flash-001 or gemini-1.5-pro-001.
The following snippet is a sample to build a requestBody object:
<root>
<contents>
<role>user</role>
<parts>
<text>Describe what you hear in this audio</text>
</parts>
<parts>
<inlineData>
<mimeType>audio/aac</mimeType>
<data>{BASE64ENCODED}</data>
</inlineData>
</parts>
</contents>
<generationConfig>
<temperature>0.5</temperature>
<maxOutputTokens>200</maxOutputTokens>
<topP>0.8</topP>
<topK>10</topK>
</generationConfig>
</root>
If fields in the requestBody need to be in different formats, you must add additional namespaces as shown in the following sample code:
<root xmlns:m="urn:informatica:ae:xquery:json2xml:meta-data">
<field_array m:isArray="true">
<property_1> ...</property_1>
</field_array>
<field_boolean m:type="xs:boolean">true</field_boolean>
<field_double m:type="xs:double">20.2</field_double>
<field_integer m:type="xs:int">10</field_integer>
</root>
- •The Function calling action generates a response from the model based on the given input with the Function Calling API.
You must insert the access_token field from the Get access token action and the model_ID field to call the model, and create a payload. For example, the model_ID value can be gemini-1.5-flash-001 or gemini-1.5-pro-001.
The following snippet is a sample to build a requestBody object:
<root xmlns:m="urn:informatica:ae:xquery:json2xml:meta-data">
<contents>
<role>user</role>
<parts>
<text>What is the weather in Boston, MA?</text>
</parts>
</contents>
<tools>
<functionDeclarations>
<name>get_current_weather</name>
<description>Get the current weather in a given location</description>
<parameters>
<type>object</type>
<properties>
<location>
<type>string</type>
<description>The city and state, e.g. San Francisco, CA or a zip code e.g. 95616</description>
</location>
</properties>
<required m:isArray="true">location</required>
</parameters>
</functionDeclarations>
</tools>
</root>
If fields in the requestBody need to be in different formats, you must add additional namespaces as shown in the following sample code:
<root xmlns:m="urn:informatica:ae:xquery:json2xml:meta-data">
<field_array m:isArray="true">
<property_1> ...</property_1>
</field_array>
<field_boolean m:type="xs:boolean">true</field_boolean>
<field_double m:type="xs:double">20.2</field_double>
<field_integer m:type="xs:int">10</field_integer>
</root>
- •The Grounding action generates a response from the model based on the given input and connects the model output to verifiable sources of information.
You must insert the access_token field from the Get access token action and the model_ID field to call the model, and create a payload. For example, the model_ID value can be gemini-1.5-flash-001 or gemini-1.5-pro-001.
The following snippet is a sample to build a requestBody object:
<root>
<contents>
<role>user</role>
<parts>
<text>Can you provide the latest information on climate change's impact on polar bears?</text>
</parts>
</contents>
<tools>
<googleSearchRetrieval />
</tools>
</root>
If fields in the requestBody need to be in different formats, you must add additional namespaces as shown in the following sample code:
<root xmlns:m="urn:informatica:ae:xquery:json2xml:meta-data">
<field_array m:isArray="true">
<property_1> ...</property_1>
</field_array>
<field_boolean m:type="xs:boolean">true</field_boolean>
<field_double m:type="xs:double">20.2</field_double>
<field_integer m:type="xs:int">10</field_integer>
</root>
- •The Text embeddings action generates an embedding from the model based on the given input.
You must insert the access_token field from the Get access token action and the model_ID field to call the model, and create a payload. For example, the model_ID value can be textembedding-gecko-multilingual@001 or text-multilingual-embedding-002.
The following snippet is a sample to build a requestBody object:
<root>
<instances>
<task_type>RETRIEVAL_DOCUMENT</task_type>
<title>document title</title>
<content>I would like embeddings for this text!</content>
</instances>
</root>
If fields in the requestBody need to be in different formats, you must add additional namespaces as shown in the following sample code:
<root xmlns:m="urn:informatica:ae:xquery:json2xml:meta-data">
<field_array m:isArray="true">
<property_1> ...</property_1>
</field_array>
<field_boolean m:type="xs:boolean">true</field_boolean>
<field_double m:type="xs:double">20.2</field_double>
<field_integer m:type="xs:int">10</field_integer>
</root>
- •The Multimodal embeddings action generates an embedding from the model based on the given input, which can include a combination of image, text, and video data.
You must insert the access_token field from the Get access token action and the model_ID field to call the model, and create a payload. For example, the model_ID value can be multimodalembedding@001.
The following snippet is a sample to build a requestBody object:
<root>
<instances>
<text>Describe what you see</text>
<video>
<bytesBase64Encoded>{BASE64ENCODED}</bytesBase64Encoded>
<videoSegmentConfig>
<endOffsetSec>1</endOffsetSec>
</videoSegmentConfig>
</video>
<parameters>
<dimension>1536</dimension>
</parameters>
</instances>
</root>
If fields in the requestBody need to be in different formats, you must add additional namespaces as shown in the following sample code:
<root xmlns:m="urn:informatica:ae:xquery:json2xml:meta-data">
<field_array m:isArray="true">
<property_1> ...</property_1>
</field_array>
<field_boolean m:type="xs:boolean">true</field_boolean>
<field_double m:type="xs:double">20.2</field_double>
<field_integer m:type="xs:int">10</field_integer>
</root>