با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
کنشهای مکالمه با امکان ایجاد تجربیات یا مکالمات سفارشی برای کاربران دستیار Google، عملکرد Google Assistant را گسترش میدهد. در یک مکالمه، کنش مکالمه شما درخواستهای دستیار را بررسی میکند و پاسخها را با اجزای صوتی و تصویری برمیگرداند. کنشهای مکالمه همچنین میتوانند با وبقلابها با سرویسهای وب خارجی ارتباط برقرار کنند تا منطق مکالمه یا کسبوکار را قبل از بازگرداندن پاسخ اضافه کنند.
شکل 1. نمونه ای از یک اقدام مکالمه
چرا ساختن
رابط های معمولی کامپیوتر برای عملکرد صحیح نیاز به ورودی ساختاریافته و قابل پیش بینی دارند که استفاده از این رابط ها را غیر طبیعی و گاه دشوار می کند. اگر کاربران نتوانند به راحتی این ورودی ساختاریافته را دریابند، در یافتن اینکه چه کاری باید انجام دهند، مشکل خواهند داشت.
به عنوان مثال، یک درخواست آسان کاربر مانند "پیش بینی امروز چگونه است؟" را در نظر بگیرید. سایر کاربران نیز ممکن است بپرسند، "در حال حاضر آب و هوا چگونه است؟" یا "دمای هوا در سانفرانسیسکو فردا چگونه است؟" حتی با این سوال ساده، می توانید ببینید که تجارب مکالمه به سختی اجرا می شوند، زیرا تفسیر و پردازش زبان طبیعی به تجزیه کننده زبان بسیار قوی نیاز دارد که قادر به درک تفاوت های ظریف زبان باشد. کد شما باید تمام این انواع مختلف درخواست (و احتمالاً بسیاری دیگر) را برای انجام همان منطق مدیریت کند: جستجوی برخی اطلاعات پیشبینی برای زمان و مکان. به همین دلیل، یک رابط کامپیوتری سنتی به درخواستهای ورودی استاندارد و شناخته شده نیاز دارد که به تجربه کاربر آسیب میرساند، زیرا مدیریت ورودی بسیار ساختاریافته آسانتر است.
با این حال، هنگامی که کنشهای مکالمه را میسازید، دستیار درک زبان طبیعی (NLU) را برای شما مدیریت میکند، بنابراین میتوانید به راحتی رابطهای مکالمهای با پایان باز بسازید. این ابزارهای رابط به شما امکان میدهند تفاوتهای ظریف و متنوع زبان انسانی را درک کنید و آن را به معنای استاندارد و ساختار یافتهای ترجمه کنید که برنامهها و سرویسهای شما میتوانند آن را درک کنند. بیایید نگاهی بیندازیم که چگونه یک Action ممکن است با نمونههای قبلی برای درخواستهای پیشبینی آب و هوا رفتار کند.
شکل 1 . تطبیق هدف NLU
برای جستجوی پیشبینی آبوهوا، ممکن است به چند اطلاعات نیاز داشته باشید، مانند زمانی که کاربران پیشبینی را میخواهند و مکان آنها. با این حال، همانطور که قبلا ذکر کردیم، کاربران مختلف ممکن است به روش های متفاوتی پیش بینی را درخواست کنند. «دستیار» میتواند این تفاوتها را درک کند و آنها را به یک کاربر استاندارد برای دریافت پیشبینی ترجمه کند. سپس می تواند درخواست کاربر را برای داده های مربوطه ای که برای انجام درخواست نیاز دارید، تجزیه کند. در این حالت، این زمان و مکان مورد نظر کاربر برای پیش بینی آب و هوا است. در نهایت، می توانید از این داده ها برای جستجوی آب و هوا با یک REST API عمومی استفاده کنید و وضعیت آب و هوا را در قالب یک درخواست به کاربر برگردانید.
زمان ساخت
کنشهای مکالمه برای موارد استفاده ساده که به کاربران امکان میدهد کارها را سریع انجام دهند و همچنین برای موارد استفاده همه جانبه که به صورت صوتی جلو میروند، بهترین کار را دارند. اقدامات مکالمه خوب اغلب در این دسته بندی های کلی قرار می گیرند:
چیزهایی که مردم به راحتی می توانند پاسخ دهند. اقداماتی که میتوان با ورودی آشنا مانند زمان یا تاریخ انجام داد، مانند رزرو پرواز.
اقدامات سریع، اما مفید. اینها معمولاً برای زمان بسیار کمی که صرف میکنند، فوراً به کاربران سود میرسانند، مانند یافتن زمان بازی بعدی تیم ورزشی مورد علاقهشان.
اقداماتی که ذاتاً برای صدا مناسبتر هستند. اینها معمولاً کارهایی هستند که میخواهید به صورت هندزفری انجام دهید، مانند دریافت مربی در حین یوگا یا ورزش سبک یا بازیهایی که برای تعاملات صوتی طراحی شده است.
چگونه باید ساخت
Actions on Google به شما امکان میدهد تا با Actions SDK، Actions Builder یا هر دو به جای یکدیگر، Conversational Actions بسازید. این ویژگی به شما امکان می دهد بهترین گردش کار توسعه را برای نیازهای خود انتخاب کنید، در حالی که به شما انعطاف پذیری می دهد تا در صورت نیاز به عقب و جلو بروید.
Action SDK یک طرحواره استاندارد شده مبتنی بر فایل برای ساخت Actions شما، کتابخانه هایی برای تعامل با Assistant و یک CLI برای استقرار و مدیریت پروژه Actions شما ارائه می دهد. Actions Builder بر روی همان فناوری Actions SDK ساخته شده است و به شما امکان می دهد با استفاده از یک IDE آسان و قدرتمند بسازید.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eConversational Actions on Google Assistant let you create custom voice experiences for users by handling requests and returning audio/visual responses.\u003c/p\u003e\n"],["\u003cp\u003eAssistant's natural language understanding (NLU) handles language nuances, making it easier to build conversational interfaces compared to traditional structured input methods.\u003c/p\u003e\n"],["\u003cp\u003eConversational Actions are best for simple, quick tasks, or immersive, voice-forward experiences.\u003c/p\u003e\n"],["\u003cp\u003eYou can build Actions with the Actions SDK, Actions Builder, or both, offering flexibility in your development workflow.\u003c/p\u003e\n"]]],["Conversational Actions create custom Google Assistant experiences, handling user requests and returning responses with audio and visual components. Assistant manages natural language understanding, translating varied user inputs into structured intents. Actions excel in tasks requiring simple, familiar input, providing quick user benefits, or leveraging voice-first interactions. Developers can build using the Actions SDK, Actions Builder, or a mix of both, offering flexibility in development workflows. The process includes defining user intents, parsing data, and utilizing webhooks to generate customized responses.\n"],null,["# Conversational Actions extend the functionality of Google Assistant by allowing you to\ncreate custom experiences, or conversations, for users of Google\nAssistant. In a conversation, your Conversational Action handles requests from\nAssistant and returns responses with audio and visual components. Conversational Actions\ncan also communicate with external web services with webhooks for added\nconversational or business logic before returning a response.\n**Figure 1.** An example of a Conversational Action\n\nWhy build\n---------\n\nTypical computer interfaces require structured and predictable input to\nfunction properly, which makes the use of these interfaces unnatural and\nsometimes difficult. If users can't easily figure out this structured input,\nthey'll have a hard time figuring out what to do.\n\nFor example, consider an easy user request like, *\"What's the forecast like\ntoday?\"* Other users might also ask, *\"What's the weather like right now?\"*\nor *\"What's the temperature like in San Francisco tomorrow?\"* Even with this\nsimple question, you can see that conversational experiences are hard to\nimplement, because interpreting and processing natural language requires a\nvery robust language parser that's capable of understanding the nuances of\nlanguage. Your code would have to handle all these different types of requests\n(and potentially many more) to carry out the same logic: looking up some\nforecast information for a time and location. For this reason, a traditional\ncomputer interface requires well-known, standard input requests to the detriment\nof the user experience, because it's easier to handle highly structured input.\n\nHowever, when you build Conversational Actions, Assistant handles the\nnatural language understanding (NLU) for you, so you can build open-ended,\nconversational interfaces easily. These interface tools let you understand the\nvast and varied nuances of human language and translate that to standard and\nstructured meaning that your apps and services can understand. Let's take a look\nat how an Action might handle the previous examples for weather forecast\nrequests.\n**Figure 1**. NLU intent matching\n\nTo look up a weather forecast, you might need a few pieces of information,\nlike the time users want the forecast for and their location. However, as we\npreviously mentioned, different users might request a forecast in different\nway. The Assistant can understand these differences and translate them to a\nstandard user intent to get the forecast. It can then parse the user's request\nfor the pertinent data you need to fulfill the request. In this case, that's\nthe user's desired time and location for the weather forecast. Finally, you\ncan use this data to look up the weather with a public REST API and return the\nweather to the user in the form of a prompt.\n\nWhen to build\n-------------\n\nConversational Actions work best for simple use cases that let users get things done\nquickly as well as for immersive use cases that are voice-forward.\nGood Conversational Actions often fall into these general categories:\n\n- **Things people can easily answer.** Actions that can be accomplished with familiar input like times or dates, like booking a flight.\n- **Quick, but useful Actions.** These usually give users immediate benefit for very little time spent, like finding out when their favorite sports team plays next.\n- **Actions that are inherently better suited for voice.** These are typically things you want to do hands-free, like receiving coaching during yoga or light exercise or a game that's been designed for voice-first interactions.\n\nHow to build\n------------\n\nActions on Google lets you build Conversational Actions with either the Actions\nSDK, Actions Builder, or both interchangeably. This feature lets you choose the\nbest development workflow for your needs, while giving you the flexibility of\nswitching back and forth when needed.\n\nThe Actions SDK provides a standardized, file-based schema to build your Actions,\nlibraries to interact with Assistant, and a CLI to deploy and manage your\nActions project. Actions Builder is built on top of the same technology\nas the Actions SDK and lets you build with an easy-to-use and powerful IDE.\n\nSee the [Build overview](/assistant/conversational/build) for more information.\n\nNext steps\n----------\n\nCheck out the following resources to start building now:\n\n- [**Quick start guide**](/assistant/conversational/quickstart) - Get a quick introduction on how to set up your environment and start developing with Actions SDK and Builder.\n- [**Codelabs**](/assistant/conversational/codelabs) - Codelabs offer detailed and in-depth walkthroughs on how to build Actions for the Google Assistant.\n- [**Samples**](/assistant/conversational/samples) - Get all of our samples on Github to start experimenting now."]]