This demo shows you how to generate multimodal content by passing multimodal input, such as text and an image to a Gemini model, by using the Vertex AI SDK for ABAP.
Before you begin
Before you run this demo, make sure that you or your administrators have completed the following prerequisites:
- Enabled the Vertex AI API in your Google Cloud project.
- Set up authentication to access the Vertex AI API.
- Configured the model generation parameters.
Generate multimodal content
To generate multimodal content, perform the following steps:
In SAP GUI, execute the transaction code
/GOOG/SDK_IMG
.Alternatively, execute the transaction code
SPRO
, and then click SAP Reference IMG.Go to ABAP SDK for Google Cloud > Demos.
Open Vertex AI SDK: Demo: Invoke Text and Multimodal Gemini Models.
Select Generate multimodal content.
In the Client key field, enter the client key for authentication.
In the Model key field, enter the model key, which is configured in the model generation parameters.
Specify values for the following fields as appropriate:
- MIME Type: Specify the IANA standard MIME type of the source data.
The default value is
application/pdf
. - GCS URI of file: To add an image or other media to your request, specify the URI of the file stored in a Cloud Storage bucket.
- Upload media: To add an image or other media to your request, upload the file from your local system.
You can either specify the URI of a file stored in a Cloud Storage bucket or upload a file from your local system.
- MIME Type: Specify the IANA standard MIME type of the source data.
The default value is
In the Enter system instructions field, provide system instructions.
In the Enter prompt field, provide your input prompt.
Run the program. The Response from LLM area shows the generated multimodal content.