對話動作已於 2023 年 6 月 13 日淘汰。詳情請參閱「
對話動作已淘汰」。
GlobalIntentEvent
定義全域意圖處理常式。全域意圖事件的範圍限定為整個 Actions 專案,且可能會由場景中的意圖處理常式覆寫。動作專案中的意圖名稱不得重複。
可在工作階段期間隨時比對全域意圖,讓使用者存取「取得說明」等常用流程或「返回首頁」。使用者叫用動作時,也可用來深層連結到特定流程。
請注意,意圖名稱是在檔案名稱中指定。
YAML 表示法 |
transitionToScene: string
handler:
object (EventHandler ) |
欄位 |
transitionToScene |
string
選用設定。要將對話跳到的目的地場景。目前場景的狀態會在轉場時刪除。
|
handler |
object (EventHandler )
選用設定。比對意圖時觸發的事件處理常式。轉換至目的地場景之前應執行。適合用來產生回應事件的提示。
|
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-08-22 (世界標準時間)。
[null,null,["上次更新時間:2024-08-22 (世界標準時間)。"],[[["Global intent handlers are defined in YAML and manage intents for the entire Actions project, potentially overridden by scene-specific handlers."],["These intents enable users to access universal flows like help or home and facilitate deep linking into specific parts of the Action."],["A global intent handler can optionally transition to a specified scene, discarding the current scene's state, and trigger an event handler for prompt generation."]]],[]]