對話動作已於 2023 年 6 月 13 日淘汰。詳情請參閱「
對話動作已淘汰」。
總覽 (Dialogflow)
Actions on Google 可讓您透過動作擴充 Google 助理的功能。動作可讓使用者透過對話介面 (利用快速指令開啟某些燈具或較長對話,例如進行益智遊戲) 完成工作。
Dialogflow 是一種對話式平台,您可以包裝 Actions SDK 的功能,並提供簡單易用的 IDE、自然語言理解 (NLU) 和機器學習等功能。
如要擴充 Google 助理,請按照下列步驟建立動作。
設計對話
在開發之前,您應該設計您的動作或動作的使用者介面。對話會說明使用者如何叫用您的動作、使用者可以對動作採取的有效動作,以及您的動作如何回應。
瞭解詳情
建立 Actions on Google 開發人員專案和 Dialogflow 代理程式
前往動作控制台建立開發人員專案。該專案可讓您定義動作的相關中繼資料,以及透過核准程序追蹤和追蹤您的動作。建立專案後,即可建立 Dialogflow 代理程式來定義您的所有動作。
瞭解詳情
定義動作
您在 Dialogflow 代理程式中定義動作時,可以透過意圖為進入功能定義進入點。舉例來說,假設您想要建構可以購買某些商品的動作、查看訂單狀態,以及顯示一些每日交易。如要定義觸發的意圖,請說出:
- 「Ok Google,與我最喜歡的鞋店聯絡,以便買鞋」
- 「Ok Google,與我喜愛的鞋店店聯絡,確認我的訂單」
- 「Ok Google,與我最喜歡的鞋店聯絡,查看我今天的優惠行程」
瞭解詳情
建構及部署執行要求
叫用動作時,系統會呼叫執行要求,以與使用者一起完成動作。
如要建立對話,請在 Dialogflow 中定義意圖來建立對話的文法,或使用者實際操作的動作。使用者說出特定內容來觸發意圖時,系統會呼叫執行要求,並將回應傳回給使用者。
這種往返要求和回應會重複出現,直到執行要求所需的資訊足以完成工作為止。
瞭解詳情
提交動作以供核准,並提供給使用者

瞭解詳情
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2023-05-16 (世界標準時間)。
[null,null,["上次更新時間:2023-05-16 (世界標準時間)。"],[[["Actions on Google lets you build Actions to extend Google Assistant functionality, enabling users to interact through voice commands for tasks or conversations."],["Dialogflow simplifies Action development by providing tools like an IDE, NLU, and machine learning, wrapping the Actions SDK functionality."],["Building an Action involves designing the conversation flow, creating a developer project and Dialogflow agent, defining Actions with intents, and building and deploying fulfillment logic."],["Before submitting your Action for approval, it's essential to thoroughly design the user interaction and define how users invoke and interact with your Action."],["Actions are invoked through specific phrases or commands, triggering intents within your Dialogflow agent, which then execute fulfillment logic to handle the user request."]]],["Actions on Google enhance Google Assistant's capabilities through conversational interfaces. Developers use Dialogflow to build these Actions. The process involves designing the conversation flow and creating a developer project and Dialogflow agent. Define Actions using intents within the Dialogflow agent, which are triggered by user phrases. When triggered, intents call on fulfillment to complete the requested task, creating an interactive conversation until the task is done. Finally, the action is submitted for approval.\n"]]