התכונה 'פעולות שיחה' הוצאה משימוש ב-13 ביוני 2023.
כאן תוכלו לקרוא מידע נוסף על ההוצאה משימוש של 'פעולות שיחה'.
GlobalIntentEvent
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מגדיר handler גלובלי של Intent. אירועים גלובליים של כוונות רכישה כוללים את כל הפרויקט של הפעולות, ויכול להיות שגורמים שמטפלים בIntent בסצנה יוכלו לשנות אותם. שמות של Intent חייבים להיות ייחודיים בפרויקט פעולות.
ניתן להתאים בין כוונות גלובליות בכל שלב במהלך סשן, וכך לאפשר למשתמשים לגשת לתהליכים נפוצים כמו 'קבלת עזרה' או "חזרה למסך הבית". אפשר להשתמש בהם גם כדי ליצור קישור עומק של משתמשים לתהליכים ספציפיים כשהם מפעילים פעולה.
הערה, שם ה-Intent מצוין בשם הקובץ.
ייצוג YAML |
transitionToScene: string
handler:
object (EventHandler ) |
שדות |
transitionToScene |
string
זה שינוי אופציונלי. הסצנה של היעד שאליו השיחה צריכה לקפוץ. המצב של הסצנה הנוכחית מושמד במהלך המעבר.
|
handler |
object (EventHandler )
זה שינוי אופציונלי. הגורם המטפל באירועים שמופעל כאשר יש התאמה ל-Intent. צריך להתבצע לפני המעבר לסצנת היעד. האפשרות הזו שימושית ליצירת הנחיות בתגובה לאירועים.
|
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-26 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-26 (שעון UTC)."],[[["\u003cp\u003eGlobal intent handlers are defined in YAML and manage intents for the entire Actions project, potentially overridden by scene-specific handlers.\u003c/p\u003e\n"],["\u003cp\u003eThese intents enable users to access universal flows like help or home and facilitate deep linking into specific parts of the Action.\u003c/p\u003e\n"],["\u003cp\u003eA global intent handler can optionally transition to a specified scene, discarding the current scene's state, and trigger an event handler for prompt generation.\u003c/p\u003e\n"]]],[],null,["# GlobalIntentEvent\n\n- [YAML representation](#SCHEMA_REPRESENTATION)\n\nDefines a global intent handler. Global intent events are scoped to the entire Actions project and may be overridden by intent handlers in a scene. Intent names must be unique within an Actions project.\n\nGlobal intents can be matched anytime during a session, allowing users to access common flows like \"get help\" or \"go back home.\" They can also be used to deep link users into specific flows when they invoke an Action.\n\nNote, the intent name is specified in the name of the file.\n\n| YAML representation ||\n|--------------------------------------------------------------------------------------------------------------------|---|\n| ``` transitionToScene: string handler: object (/assistant/actionssdk/reference/rest/Shared.Types/EventHandler) ``` |\n\n| Fields ||\n|---------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\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. |"]]