Vertex AI Template

Prev Next

Suggested reading: Integrate Code Station

Vertex AI, a machine learning platform from Google Cloud, facilitates the building, training, and deployment of machine learning models at scale. When integrated with Code Station, Vertex AI offers several key advantages, including:

  • Context window,
  • Document analysis,
  • Multimodal capabilities,
  • Language support,
  • Integration with apps,
  • Data analysis,
  • Personalised AI,
  • Conversational AI,
  • API and developer features.

Adding a new ready-made template to Code Station enables access to all Vertex AI services when this module is incorporated into the map within the MindBehind flow.

This guide provides answers to these questions:

Requirements

Before integrating the Vertex AI template in the Code Station module, ensure that all the requirements below are met. Once completed, follow the steps for Vertex AI integration.

  1. Go to Google Cloud IAM and Admin menu and create a user with specific access. You can select the "Vertex AI Viewer" option. You can read Google Cloud's Vertex AI Access Control documentation for further details on the access types.
  2. To create a service account, go to Google Cloud IAM and the Admin menu. You can refer to the Google Cloud's Service Account documentation for further details.
  3. Click the "Manage Keys" option in the Actions menu for the newly created service and click the "Add a New Key" button. 
  4. Select the "JSON" format for your new key type and click the Create button. It will be automatically downloaded to your computer. 

How to use the Vertex AI template

After you meet all the requirements above, follow the steps below to create your Vertex AI template:

  1. Navigate to Companies> Your Company> Code Station. Click the Secret Manager button.
  2. Click the Add Secret button.
  3.  Enter a name for your Vertex AI template and select the Custom option from the dropdown list of Property Type
  4. Add the information in the table below as your property keys and values
    Property KeyProperty Value
    vertexUrlhttps://us-central1-aiplatform.googleapis.com/v1/projects/mb-prod-279015/locations/europe-west3/publishers/google/models/gemini-1.5-pro-preview-0409:streamGenerateContent
    serviceAccountOpen your JSON file that you have downloaded and copy and paste the code in the value field.
    tokenIntegrationUrlhttps://a2g1q3o8pi.execute-api.eu-central-1.amazonaws.com/Prod/get-token
  5. After filling in this information, click the Add Secret button. 
  6. Go back to the Code Station page on the Company Management and click the Add Code Block button.
  7. Click the Select button for the Create from Template option.
  8. Click the Select button for the Vertex template. 
  9.  Enter a name for your template, select the template from the dropdown list and the secret that you have created before. Click the Add Code Block button. Now, you can use your template in your maps.
  10. After you prepare the flow and add the code module, you need to identify two parameters:
  • #file: It will be received from the Input Action when you upload a file.
  • #question: It will also be received from the Input Action when you ask a question related to the #file

    #answer parameter is added automatically to receive an answer from Vertex AI, and it is in the text format.

The diagram below provides a high-level summary of the generative AI workflow.

Limitations

You can check the relevant limitations in the table below when using the Vertex AI template in your flows. 

ContentMaximum SizeSupported FormatsResolution LimitMaximum Length
Images10 MBJPEG, PNG, BMP, TIFFNo resolution limit.
Videos100 MBMP4, MOV, AVINo resolution limit.10 minutes
Audio100 MBMP3, WAV, OGG
10 minutes
Files100 MBPDF, DOCX, TXT, ZIP


  • A maximum of 5 images, videos, audio files, or files can be sent in a single API request.
  • The total size of all files cannot exceed 1 GB.
  • The API does not accept inappropriate or copyrighted content.

Refer to Google's Gemini API documentation for further details.

Vertex AI does not provide data storage options specifically in Turkey. The available data residency locations are in North America, Europe, and Asia, but Turkey is currently not included.