From Bright Pattern Documentation
Jump to: navigation, search
• 5.19

Vertex AI

How do I Generate a Vertex AI Service Account Key?

Google Vertex AI is one of the third-party AI providers that can be leveraged by the AI Agent scenario block to automate conversations in both chat and voice scenarios.

In order to configure a Google Vertex AI Provider integration account, you need to get a service account key from your Google Cloud Platform (GCP) account. The service account key is a JSON-formatted file which allows Bright Pattern to use Google Vertex AI language models.

Before you start, ensure that you already:

  • Have a Google GCP account.
  • Created a project in your GCP account.
  • Added a billing method to the project in your GCP account.

Generate a Service Account Key

  1. Open your Google Cloud Platform account.

  2. Ensure that the desired project is selected and navigate to IAM & Admin.

    GCP admin home page.png


  3. To create a service account, navigate to the Service Accounts page from the left menu, then click Create Service Account.

    GCP IAM and Admin service accounts.png


  4. This GCP service account will allow your AI provider integration account in Bright Pattern to access GCP resources. It is suggested that you give the account a clear name and description to ensure its function can be identified later. Click Create and Continue to move to the next step.

    GCP service account details.png


  5. Assign the "Vertex AI User" Role to the service account to give it access to Vertex AI resources. Optionally, you may make other users administrators of this service account by clicking Continue and specifying the users to add as administrators. Otherwise, click Done.

    GCP service account access to projects.png


  6. From the Service Accounts page, open the Actions menu of the new service account and click Manage Keys.

    GCP service account actions add keys.png


  7. On the Keys page, open the Add Key menu and choose Create new key

    GCP service account create new key.png


  8. Choose "JSON" as the Key type, and click Create.

    GCP service account create private key.png


  9. The JSON-formatted file containing the key, which provides access to your GCP resources, should be automatically downloaded. Consider following the best practices for managing service account keys in order to maintain the security of your account.

  10. You can use this key file to configure an AI provider integration account with Vertex AI. It will have the following format:

    {
      "type": "service_account",
      "project_id": "bp-integration",
      "private_key_id": "66bead8bee7014d4413beb9463445235ff45dbf7",
      "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQIB...xpo4qJL\n-----END PRIVATE KEY-----\n",
      "client_email": "bright-pattern-ai-provider-int@bp-integration.iam.gserviceaccount.com",
      "client_id": "844691114948902902686",
      "auth_uri": "https://accounts.google.com/o/oauth2/auth",
      "token_uri": "https://oauth2.googleapis.com/token",
      "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
      "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/bright-pattern-ai-provider-int%40bp-integration.iam.gserviceaccount.com",
      "universe_domain": "googleapis.com"
    }
    
    < Previous | Next >