IntentEvent
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ลงทะเบียนเหตุการณ์ที่ทริกเกอร์เนื่องจากการจับคู่ Intent
การแสดง YAML |
intent: string
transitionToScene: string
handler:
object (EventHandler ) |
ช่อง |
intent |
string
ต้องระบุ Intent ที่ทริกเกอร์เหตุการณ์
|
transitionToScene |
string
ไม่บังคับ ฉากปลายทางที่การสนทนาควรข้ามไป สถานะของฉากปัจจุบันจะถูกทำลายเมื่อเปลี่ยน
|
handler |
object (EventHandler )
ไม่บังคับ ตัวแฮนเดิลเหตุการณ์ซึ่งทริกเกอร์เมื่อตรงกับ Intent ควรดำเนินการก่อนเปลี่ยนเป็นโหมดปลายทาง มีประโยชน์ในการสร้างพรอมต์เพื่อตอบกลับเหตุการณ์
|
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003eThe YAML representation is used to register events that are triggered when an intent is matched.\u003c/p\u003e\n"],["\u003cp\u003eIt includes fields like \u003ccode\u003eintent\u003c/code\u003e (required) for the triggering intent, \u003ccode\u003etransitionToScene\u003c/code\u003e (optional) for scene transition, and \u003ccode\u003ehandler\u003c/code\u003e (optional) for event handling before scene transition.\u003c/p\u003e\n"],["\u003cp\u003eEvent handlers can be used to execute actions, such as generating prompts, in response to the triggered intent.\u003c/p\u003e\n"]]],[],null,["# IntentEvent\n\n- [YAML representation](#SCHEMA_REPRESENTATION)\n\nRegisters Events which trigger as the result of an intent match.\n\n| YAML representation ||\n|-----------------------------------------------------------------------------------------------------------------------------------|---|\n| ``` intent: string transitionToScene: string handler: object (/assistant/actionssdk/reference/rest/Shared.Types/EventHandler) ``` |\n\n| Fields ||\n|---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `intent` | `string` Required. Intent triggering the event. |\n| `transitionToScene` | `string` Optional. Destination scene which the conversation should jump to. The state of the current scene is destroyed on the transition. |\n| `handler` | `object (`[EventHandler](/assistant/actionssdk/reference/rest/Shared.Types/EventHandler)`)` Optional. Event handler which is triggered when the intent is matched. Should execute before transitioning to the destination scene. Useful to generate prompts in response to events. |"]]