恭喜你訂閱 Google Developer Program Premium 方案!
如要開始使用 Gemini Code Assist,請先將授權連結至 Google Cloud 專案,藉此啟用授權。請視偏好的環境,依下列說明操作。
方法 1:從 IDE 啟用
這是最直接的入門方式。
在偏好的 IDE (例如 VS Code、Android Studio) 中安裝 Gemini Code Assist 外掛程式。如果沒有,可以從 codeassist.google 下載最新版本。
在 IDE 中使用 Gemini Code Assist 介面登入。
請務必使用與 Google Developer Program Premium 方案相關聯的 Google 帳戶。
外掛程式顯示提示時,請選取或建立 Google Cloud 專案。
啟用 API。在所選專案的資訊主頁中,前往 API 資料庫並啟用 Gemini for Google Cloud API。
選取專案後,Gemini Code Assist 就會在 IDE 中啟用,隨時可供使用。
注意:管理這項服務時需要 Google Cloud 專案,但不必啟用計費功能。Google 開發人員計畫進階方案訂閱費用涵蓋這筆費用。
方法 2:透過網頁或 CLI 啟用
如果您主要使用採用 Gemini Code Assist 的網頁工具 (例如 Firebase Studio) 或指令列 (例如 Gemini CLI),請使用這個方法。
選取或建立 Google Cloud 專案。前往 Google Cloud 控制台,選擇現有專案或建立新專案。
啟用 API。在所選專案的資訊主頁中,前往 API 資料庫並啟用 Gemini for Google Cloud API。
登入工具。開啟服務 (例如 Firebase Studio) 或終端機,並登入擁有進階版訂閱方案的 Google 帳戶。
Gemini Code Assist 現在會在所有已連結的 Google Cloud 服務中啟用。