啟用 Conversational Analytics API

本頁面說明如何為 Google Cloud 專案啟用 Conversational Analytics API (透過 geminidataanalytics.googleapis.com 存取)。在 Google Cloud 控制台中,對話式數據分析 API 是 Data Analytics API with Gemini 的第一項功能。

事前準備

如要使用 Conversational Analytics API,您必須先擁有可存取所需資料的 Google Cloud 專案。如要設定專案,請完成下列步驟:

  1. 找出要搭配 Conversational Analytics API 使用的資料。您可以使用 BigQuery 資料表、Looker 探索和 Looker Studio 報表等資料來源。
  2. 在 Google Cloud 控制台的專案選取器頁面中,建立專案 Google Cloud ,以便存取要搭配 Conversational Analytics API 使用的資料。

    前往專案選取器

啟用必要的 API

如要使用 Conversational Analytics API,請在 Google Cloud 專案中啟用一組必要 API。如果您打算從 Colab Enterprise 環境使用 Conversational Analytics API,也必須啟用其他 API

必要 API

主控台

在 Google Cloud 主控台中,為要搭配 Conversational Analytics API 使用的 Google Cloud 專案啟用下列 API。

啟用 Gemini Data Analytics API

啟用 Gemini for Google Cloud API

啟用 BigQuery API

gcloud

使用 Google Cloud CLI 執行下列 gcloud services enable 指令,分別啟用 Gemini Data Analytics API、Gemini for Google Cloud API 和 BigQuery API:

gcloud services enable geminidataanalytics.googleapis.com --project=project_id
gcloud services enable cloudaicompanion.googleapis.com --project=project_id
gcloud services enable bigquery.googleapis.com --project=project_id

在先前的 gcloud CLI 指令範例中,將 project_id 替換為您的 Google Cloud 專案 ID。

Colab Enterprise API

如果您打算從 Colab Enterprise 環境使用 Conversational Analytics API,請一併啟用下列 API:

啟用 Dataform API

啟用 Compute Engine API

啟用 Vertex AI API

授予必要角色

如要使用 Conversational Analytics API,請在 Google Cloud 控制台中,將下列 Identity and Access Management (IAM) 角色授予需要與 API 互動的主體 (例如使用者或服務帳戶):

前往「Roles」(角色)

此外,管理代理程式等動作的權限是由 Gemini Data Analytics 角色控管,詳情請參閱「授予 Conversational Analytics API IAM 角色和權限」。

VPC Service Controls 的其他設定

如果為機構或您使用的 Google Cloud 專案啟用 VPC Service Controls,請將下列 Conversational Analytics API 使用的 API 新增至允許清單: