Demo: Generate multimodal embeddings

This demo shows you how to generate multimodal embeddings by passing multimodal input, such as text and an image to an embedding 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:

Generate multimodal embeddings

To generate multimodal embeddings, perform the following steps:

  1. In SAP GUI, execute the transaction code /GOOG/SDK_IMG.

    Alternatively, execute the transaction code SPRO, and then click SAP Reference IMG.

  2. Go to ABAP SDK for Google Cloud > Demos.

  3. Open Demo: Invoke multimodal Embedding models

  4. Select Generate multimodal embeddings.

  5. In the Client key field, enter the client key for authentication.

  6. In the Model key field, enter the model key, which is configured in the model generation parameters.

  7. In the Dimensions field, enter the number of dimensions for the output embeddings, such as 1408. For multimodal embeddings, the available dimensions are: 128, 256, 512, and 1408.

  8. Specify values for the following fields as appropriate:

    • GCS URI of image: To add an image to your request, specify the URI of the image stored in a Cloud Storage bucket.
    • Upload image: To add an image to your request, upload the image from your local system.
    • GCS URI of video: To add a video to your request, specify the URI of the video stored in a Cloud Storage bucket.

    You can either specify the URI of a file from Cloud Storage or upload a file from your local system.

  9. In the Enter text field, provide your input text.

  10. Run the program. The Response from LLM area shows the generated embeddings.