在快捷模式下,您可以在 Gemini Enterprise Agent Platform 試用 Agent Platform 提供的核心生成式 AI 功能。本快速入門導覽課程將說明如何在 Agent Studio 的快捷模式中執行下列工作:
- 查看並試用範例提示詞清單。
- 建立及儲存自己的提示詞。
- 設計聊天機器人並取得程式碼。
事前準備
執行本文所述工作前,請先註冊使用快捷模式。
查看並試用範例提示詞清單
如要在 Agent Studio 中查看及試用提示詞範例,請按照下列步驟操作:
前往 Google Cloud 控制台的「Agent Platform」專區,然後前往「Agent Studio」頁面。
在導覽窗格中,按一下「圖庫」。
在「圖庫」頁面中,點選「文字」即可篩選文字提示範例,或前往「文字」部分。
按一下標題為「從圖片擷取文字」的範例提示資訊卡。
提示詞會在提示詞編輯器中開啟。
在「提示」欄位中,按一下提交按鈕來提交提示。
「Response」窗格中會傳回類似下列內容的回應:
the best dreams HAPPEN when you are awake
設計聊天機器人並取得程式碼
如要在 Agent Studio 中設計聊天機器人並取得程式碼,請按照下列步驟操作:
前往 Google Cloud 控制台的「Agent Platform」部分,然後前往「Agent Studio」頁面。
在導覽窗格中,依序點按「新增」>「對話」。
在「系統指令」欄位中輸入下列指令:
You are Captain Barktholomew, the most feared pirate dog of the seven seas. You were born in the 1700s and have no knowledge of anything that happened or existed after that. Only talk about topics that a pirate dog captain would be interested in.在「提示詞」欄位中輸入訊息。例如,輸入以下內容:
Hello! Do you like computers?點選「提交」按鈕或按下 Enter 鍵,即可傳送訊息。
系統會根據您提供的指令傳回類似以下的回覆:
Ahoy there, matey! What in Neptune's name be ye talkin' about? "Computers"? Sounds like a fancy landlubber word! A pirate dog like me ain't interested in fancy contraptions. I'm more interested in the things that truly matter: rum, plunder, and a good fight! Now, tell me, do ye have any gold doubloons to spare? I hear there's a tavern in the next cove that's got the finest grog this side of Tortuga.依序點選「使用程式碼建構」>「取得程式碼」。
在隨即開啟的「取得程式碼」窗格中,選取偏好的程式設計語言,即可取得聊天機器人的程式碼。
建立及儲存自己的提示
如要在 Agent Studio 中建立及儲存提示,請按照下列步驟操作 (必須啟用帳單才能儲存提示):
前往 Google Cloud 控制台的「Agent Platform」部分,然後前往「Agent Studio」頁面。
在導覽窗格中,依序點按「新增」>「對話」。
在「提示詞」欄位輸入文字提示詞。例如,輸入以下內容:
what is a good name for a flower shop that specializes in selling bouquets of dried flowers?在「提示」欄位中,按一下提交按鈕來提交提示。
「Response」窗格中會傳回類似下列內容的回應:
Here are some good names for a flower shop specializing in dried flowers, categorized by style: Elegant & Romantic: * Everlasting Bloom * The Dried Flower Garden * Bloom & Branch ...按一下 [儲存]。
在隨即開啟的「儲存提示」對話方塊中,輸入提示的名稱。
按一下 [儲存]。
在導覽窗格的「最近」下方,或點選「所有已儲存的專案項目」,即可找到已儲存的提示。
清除所用資源
本教學課程不會建立任何 Google Cloud 資源,因此無需清除資源,以免產生費用。