تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تتيح لك "المهام القائمة على المحادثة" إمكانية توسيع نطاق "مساعد Google" باستخدام واجهات محادثاتك التي تتيح للمستخدمين الوصول إلى منتجاتك وخدماتك. تستفيد الإجراءات من محرّك فهم اللغة الطبيعية الفعّال (NLU) في "مساعد Google" لمعالجة وفهم إدخالات اللغة الطبيعية وتنفيذ المهام استنادًا إلى هذه البيانات.
نظرة عامة
الإجراء الحواري هو كائن بسيط يحدد نقطة دخول (يشار إليها بالاستدعاء) إلى المحادثة:
يحدّد الاستدعاء الطريقة التي يخبر بها المستخدمون "مساعد Google" بأنّهم يريدون بدء
محادثة باستخدام أحد الإجراءات الخاصة بك. يتم تحديد استدعاء الإجراء من خلال
هدف واحد تتم مطابقته عندما يطلب المستخدمون تنفيذ الإجراء.
تحدد المحادثة كيفية تفاعل المستخدمين مع إجراء ما بعد استدعائه. أنت تنشئ محادثات باستخدام النية والأنواع
والمشاهد والطلبات.
بالإضافة إلى ذلك، يمكن لـ "الإجراءات" تفويض العمل الإضافي إلى تنفيذ، وهي
خدمات ويب تتواصل مع "المهام" عبر الردود التلقائية على الويب. يتيح لك ذلك التحقق من صحة البيانات والاتصال بخدمات الويب الأخرى وتنفيذ منطق العمل، وأكثر من ذلك.
يمكنك تجميع إجراء واحد أو أكثر معًا، استنادًا إلى حالات الاستخدام المهمة للمستخدمين، في حاوية منطقية تسمى مشروع "المهام".
يحتوي مشروع "المهام" على نموذج الاستدعاء بأكمله (مجموعة من الاستدعاءات)، والذي يتيح للمستخدمين البدء من أماكن منطقية في نموذج المحادثة (جميع الأشياء المحتملة التي يمكن للمستخدمين قولها وجميع الطرق الممكنة للرد على المستخدمين).
الشكل 1. هي مجموعة من الإجراءات التي يمكن استخدامها
كنقاط دخول إلى نموذج المحادثة. إنّ الأغراض المؤهَّلة للاستدعاء
تُعتبر عالمية.
الاستدعاء
يرتبط الاستدعاء بالاسم المعروض الذي يمثّل علامة تجارية
أو اسمًا أو شخصية تتيح للمستخدمين أن يطلبوا من "مساعد Google" تنفيذ الإجراءات الخاصة بك.
ويمكن للمستخدمين استخدام هذا الاسم المعروض فقط (يُسمى الاستدعاء الرئيسي) أو
في مجموعة من عبارات رابط لصفحة في التطبيق لاستدعاء الإجراءات.
على سبيل المثال، يمكن للمستخدمين قول العبارات التالية لاستدعاء ثلاثة إجراءات منفصلة في مشروع باسم معروض "حقائق حول Google":
"Ok Google، أريد التحدّث إلى Facts about Google"
"Ok Google، أريد التحدّث إلى Facts حول Google للحصول على معلومات عن الشركة"
"Ok Google، أريد التحدّث إلى قسم "حقائق عن Google" للحصول على حقائق عن السجلّ"
الاستدعاء الأول في المثال هو الاستدعاء الرئيسي. ويرتبط هذا الاستدعاء لغرض خاص من النظام يُسمى actions.intent.MAIN. الاستدعاءات الثانية والثالثة هي استدعاءات روابط لصفحات في التطبيق تتيح لك تحديد عبارات إضافية تسمح للمستخدمين بطلب وظائف معيّنة. تتوافق هذه الاستدعاءات مع نوايا المستخدم
التي صنّفتها على أنّها عالمية. يوفر كل استدعاء في هذا المثال نقطة دخول
إلى محادثة ويتجاوب مع إجراء واحد.
الشكل 2. مثال على الاستدعاء الرئيسي
يصف الشكل 2 مسار الاستدعاء الرئيسي النموذجي:
عندما يطلب المستخدمون تنفيذ إجراء، يطلبون عادةً من "مساعد Google" تنفيذه
باسمك المعروض.
يطابق "مساعد Google" طلب المستخدم بالغرض
المقابل الذي يتطابق مع الطلب. في هذه الحالة، تكون actions.intent.MAIN.
يتم إعلام الإجراء بمطابقة الهدف ويستجيب بالطلب المقابل لبدء محادثة مع المستخدم.
المحادثة
تحدِّد المحادثة كيفية تفاعل المستخدمين مع إجراء بعد استدعائه. ويمكنك إنشاء هذه التفاعلات من خلال تحديد البيانات الصالحة التي يدخلها المستخدم من أجل محادثتك، ومنطق معالجة تلك التفاعلات والمطالبات المقابلة للرد على المستخدم من خلالها. يوضّح لك الشكل والشرح التاليان
كيفية عمل الانتقال الطبيعي في المحادثة مع المكونات
منخفضة المستوى في المحادثة: النية والأنواع والمَشاهدوالطلبات.
الشكل 3. مثال على محادثة
يصف الشكل 3 منعطفًا نموذجيًا في المحادثة:
عندما يقول المستخدمون عبارة، تعمل ميزة NLU في "مساعد Google" على مطابقة المدخلات مع هدف مناسب. تتم مطابقة الغرض إذا كان النموذج اللغوي لهذا الغرض يمكن أن يتطابق إلى حد كبير أو تام مع البيانات التي أدخلها المستخدم. يمكنك تحديد النموذج اللغوي من خلال تحديد عبارات التدريب، أو أمثلة على العبارات التي قد يرغب المستخدمون
في قولها. يستخدم "مساعد Google" عبارات التدريب هذه ويوسّع نطاقها لإنشاء النموذج اللغوي للقصد.
عندما تتطابق لغة NLU في "مساعد Google" مع هدف محدّد، يمكنها استخراج المَعلمات التي تحتاجها من الإدخال. وتشتمل هذه المعلمات على أنواع مرتبطة بها،
مثل التاريخ أو الرقم. يمكنك إضافة تعليق توضيحي لأجزاء معينة من عبارات تدريب الغرض
لتحديد المعلمات التي تريد استخراجها.
يعالج المشهد بعد ذلك الغرض المطابق. يمكنك اعتبار المشاهد بمثابة أداة تنفيذ منطقية لتنفيذ إجراء ما، وتقوم برفع المهام الصعبة وتنفيذ المنطق الضروري لدفع المحادثة إلى الأمام. تعمل المشاهد بشكل متكرّر، ما يوفّر دورة حياة عملية تنفيذ مرنة تتيح لك تنفيذ إجراءات مثل التحقّق من صحة مَعلمات الغرض، وإجراء ملء الخانات، وإرسال الطلبات إلى المستخدِم، وغير ذلك.
عند انتهاء مشهد يتم تنفيذه، عادة ما يرسل مطالبة إلى المستخدمين
لمتابعة المحادثة أو يمكن إنهاء المحادثة إذا كان ذلك مناسبًا.
توصيل الطلبات
أثناء الاستدعاء أو المحادثة، يمكن أن يؤدّي الإجراء الخاص بك إلى تشغيل ردّ تلقائي على الويب لإعلام خدمة تنفيذ بعض المهام بتنفيذ بعض المهام.
الشكل 4. مثال على محادثة
يوضّح الشكل 4 كيفية استخدام عملية التنفيذ لإنشاء طلبات، وهي طريقة شائعة
لاستخدام عملية التنفيذ:
في نقاط محددة من تنفيذ الإجراء، يمكن أن يؤدي إلى تشغيل ردّ تلقائي على الويب يرسل طلبًا إلى معالج الرد التلقائي على الويب المسجّل (خدمة تنفيذ الإجراء) مع حمولة JSON.
يعالج التنفيذ الطلبات، مثل استدعاء واجهة برمجة تطبيقات REST لإجراء بعض عمليات البحث عن البيانات أو التحقّق من صحة بعض البيانات من حمولة JSON. من الطرق الشائعة جدًا لاستخدام التنفيذ هو إنشاء مطالبة ديناميكية في وقت التشغيل
حتى تكون محادثاتك أكثر تخصيصًا للمستخدم الحالي.
يعرض التنفيذ ردًا على الإجراء الخاص بك يحتوي على حمولة
JSON. يمكنها استخدام البيانات من الحمولة لمتابعة تنفيذها والاستجابة للمستخدم.
تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eConversational Actions extend Google Assistant, letting you create conversational interfaces for your services using natural language understanding.\u003c/p\u003e\n"],["\u003cp\u003eActions are invoked by users through specific phrases, triggering a conversation flow defined by intents, types, scenes, and prompts.\u003c/p\u003e\n"],["\u003cp\u003eFulfillment webhooks can be used to enhance Actions by validating data, calling external services, and generating dynamic prompts during conversations.\u003c/p\u003e\n"],["\u003cp\u003eActions are grouped within an Actions project which manages the invocation model and overall conversation flow.\u003c/p\u003e\n"]]],["Conversational Actions enable interactions with Google Assistant via natural language. Users initiate these interactions through **invocations**, using a display name or deep links. **Conversations** follow, where Assistant's NLU matches user input to **intents**, extracting **parameters**. **Scenes** then process these intents, executing logic and sending **prompts**. **Fulfillment** services handle tasks like data validation or dynamic prompt generation through webhooks, allowing actions to interact with web services and tailor responses. An **Actions project** bundles actions together.\n"],null,["# Conversational Actions let you extend Google Assistant with your own\nconversational interfaces that give users access to your products and\nservices. Actions leverage Assistant's powerful natural language\nunderstanding (NLU) engine to process and understand natural language input\nand carry out tasks based on that input.\n\nOverview\n--------\n\nA Conversational Action is a simple object that defines an\nentry point (referred to as invocation) into a conversation:\n\n- An **invocation** defines how users tell Assistant they want to start a conversation with one of your Actions. An Action's invocation is defined by a single [intent](/assistant/conversational/intents) that gets matched when users request the Action.\n- A **conversation** defines how users interact with an Action after it's invoked. You build conversations with [intents](/assistant/conversational/intents), [types](/assistant/conversational/types), [scenes](/assistant/conversational/scenes), and [prompts](/assistant/conversational/prompts).\n- In addition, your Actions can delegate extra work to **fulfillment**, which are web services that communicate with your Actions via webhooks. This lets you do data validation, call other web services, carry out business logic, and more.\n\nYou bundle one or many Actions together, based on the use cases that are\nimportant for your users, into a logical container called an Actions project.\nYour Actions project contains your entire invocation model (the collection of\nall your invocations), which lets users start at logical places in your\nconversation model (all the possible things users can say and all the possible\nways you respond back to users).\n**Figure 1** . A collection of Actions that serve as entry points into a conversation model. Intents that are eligible for invocation are considered to be *global*.\n\nInvocation\n----------\n\nInvocation is associated with a **display name** that represents a brand,\nname, or persona that lets users ask Assistant to invoke your Actions.\nUsers can use this display name on its own (called the main invocation) or in\ncombination with optional, **deep link** phrases to invoke your Actions.\n\nFor example, users can say the following phrases to invoke three separate\nActions in an project with a display name of \"Facts about Google\":\n\n- *\"Ok Google, talk to Facts about Google\"*\n- *\"Ok Google, talk to Facts about Google to get company facts\"*\n- *\"Ok Google, talk to Facts about Google to get history facts\"*\n\nThe first invocation in the example is the **main invocation** . This\ninvocation is associated with a special system intent named\n`actions.intent.MAIN`. The second and third invocations are deep link\ninvocations that let you specify additional phrases that let users ask for\nspecific functionality. These invocations correspond to user intents that you\ndesignated as global. Each invocation in this example provides an entry point\ninto a conversation and corresponds to a single Action.\n**Figure 2**. Example of main invocation\n\nFigure 2 describes a typical main invocation flow:\n\n1. When users request an Action, they typically ask Assistant for it by your display name.\n2. Assistant matches the user's request with the corresponding intent that matches the request. In this case, it would be `actions.intent.MAIN`.\n3. The Action is notified of the intent match and responds with the corresponding prompt to start a conversation with the user.\n\nConversation\n------------\n\nConversation defines how users interact with an Action after it's invoked. You\nbuild these interactions by defining the valid user input for your\nconversation, the logic to process that input, and the corresponding prompts\nto respond back to the user with. The following figure and explanation shows\nyou how a typical conversation turn works with a conversation's low level\ncomponents: [intents](/assistant/conversational/intents), [types](/assistant/conversational/types), [scenes](/assistant/conversational/scenes), and\n[prompts](/assistant/conversational/prompts).\n**Figure 3**. Example of a conversation\n\nFigure 3 describes a typical conversation turn:\n\n1. When users say something, the Assistant NLU matches the input to an appropriate intent. An intent is matched if the *language model* for that intent can closely or exactly match the user input. You define the language model by specifying *training phrases*, or examples of things users might want to say. Assistant takes these training phrases and expands upon them to create the intent's language model.\n2. When the Assistant NLU matches an intent, it can extract *parameters* that you need from the input. These parameters have *types* associated with them, such as a date or number. You annotate specific parts of an intent's training phrases to specify what parameters you want to extract.\n3. A *scene* then processes the matched intent. You can think of scenes as the logic executors of an Action, doing the heavy lifting and carrying out logic necessary to drive a conversation forward. Scenes run in a loop, providing a flexible execution lifecycle that lets you do things like validate intent parameters, do slot filling, send prompts back to the user, and more.\n4. When a scene is done executing, it typically sends a prompt back to users to continue the conversation or can end the conversation if appropriate.\n\nFulfillment\n-----------\n\nDuring invocation or a conversation, your Action can trigger a webhook that\nnotifies a fulfillment service to carry out some tasks.\n**Figure 4**. Example of a conversation\n\nFigure 4 describes how you can use fulfillment to generate prompts, a common\nway to use fulfillment:\n\n1. At specific points of your Action's execution, it can trigger a webhook that sends a request to a registered webhook handler (your fulfillment service) with a JSON payload.\n2. Your fulfillment processes the request, such as calling a REST API to do some data lookup or validating some data from the JSON payload. A very common way to use fulfillment is to generate a dynamic prompt at runtime so your conversations are more tailored to the current user.\n3. Your fulfillment returns a response back to your Action containing a JSON payload. It can use the data from the payload to continue it's execution and respond back to the user."]]