GlobalIntentEvent
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
ग्लोबल इंटेंट हैंडलर के बारे में बताता है. ग्लोबल इंटेंट इवेंट का दायरा, पूरे Actions प्रोजेक्ट तक सीमित है. साथ ही, किसी सीन में इंटेंट हैंडलर से इन्हें ओवरराइड किया जा सकता है. Actions प्रोजेक्ट में इंटेंट के नाम यूनीक होने चाहिए.
सेशन के दौरान, ग्लोबल इंटेंट को कभी भी मैच किया जा सकता है. इससे उपयोगकर्ता, "सहायता पाएं" जैसे सामान्य फ़्लो को ऐक्सेस कर सकते हैं या "होम पेज पर वापस जाएँ." किसी कार्रवाई को शुरू करने पर, इनका इस्तेमाल खास फ़्लो में डीप लिंक करने के लिए भी किया जा सकता है.
ध्यान दें कि इंटेंट का नाम, फ़ाइल के नाम में दिया गया है.
YAML प्रतिनिधि |
transitionToScene: string
handler:
object (EventHandler ) |
फ़ील्ड |
transitionToScene |
string
ज़रूरी नहीं. वह डेस्टिनेशन सीन जहां बातचीत को सीधे तौर पर जाना चाहिए. ट्रांज़िशन के दौरान, मौजूदा सीन की स्थिति मिटा दी जाती है.
|
handler |
object (EventHandler )
ज़रूरी नहीं. इंटेंट मैच होने पर ट्रिगर होने वाला इवेंट हैंडलर. डेस्टिनेशन सीन पर जाने से पहले लागू होना चाहिए. इससे इवेंट के जवाब में प्रॉम्प्ट जनरेट किए जा सकते हैं.
|
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 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. |"]]