با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
برای توسعه با Dialogflow، ابتدا باید یک پروژه Actions و یک عامل Dialogflow ایجاد کنید. داشتن یک پروژه به شما امکان می دهد برای مدیریت و توزیع Action خود به کنسول توسعه دهنده دسترسی داشته باشید. عامل Dialogflow شامل تمام اهدافی است که Action شما را تعریف می کند.
یک نام برای پروژه خود وارد کنید و روی ایجاد پروژه کلیک کنید.
به قسمت More options رفته و روی کارت مکالمه کلیک کنید.
روی Develop در منوی بالا کلیک کنید، سپس روی Actions در منوی سمت چپ کلیک کنید.
روی Add Your First Action کلیک کنید.
در کارت هدف سفارشی ، روی ساخت کلیک کنید.
کنسول Dialogflow با اطلاعاتی که به طور خودکار در یک عامل پر می شود ظاهر می شود. برای ذخیره عامل روی Create کلیک کنید.
کنسول Dialogflow
اکنون باید کنسول Dialogflow و پنل منو را در سمت چپ ببینید. اگر روی یک صفحه کوچک هستید و منو پنهان است، روی menu در گوشه سمت چپ بالا کلیک کنید.
پنجره مرکزی لیستی از مقاصد عامل را نشان می دهد. به طور پیش فرض، عوامل Dialogflow با دو هدف شروع می شوند. پیشفرض خوشآمدگویی به کاربران شما خوشامد میگوید. نماینده شما زمانی که متوجه نمیشود کاربران چه میگویند ، با پیشفرض Fallback Intent مطابقت دارد.
شبیه ساز Dialogflow در سمت راست صفحه قرار دارد. شبیه ساز به شما امکان می دهد نماینده خود را با صحبت کردن یا تایپ پیام ها امتحان کنید. در شبیه ساز Dialogflow، روی Try it now کلیک کنید، هر چیزی را تایپ کنید و اینتر را فشار دهید.
شکل 1 . تصویری از کنسول Dialogflow که یک نماینده را نشان می دهد.
اولین قصد خود را ایجاد کنید
Dialogflow از intent ها برای دسته بندی مقاصد کاربر استفاده می کند. Intent عبارات آموزشی دارد، که نمونه هایی از آنچه کاربر ممکن است به نماینده شما بگوید است. به عنوان مثال، کاربری که میخواهد نام نماینده شما را بداند ممکن است بپرسد، "اسم شما چیست؟"، "آیا نام دارید؟"، یا به سادگی بگوید "نام". این عبارات هدف نهایی یکسانی دارند: به دست آوردن نام نماینده شما.
برای ایجاد عاملی که این مورد را مدیریت کند، مراحل زیر را دنبال کنید:
روی add در کنار Intent در منوی پیمایش کلیک کنید.
Name در قسمت متن Intent name وارد کنید.
در بخش عبارات آموزشی ، روی افزودن عبارات آموزشی کلیک کنید.
عبارات زیر را وارد کنید (بعد از هر عبارت enter را فشار دهید):
What is your name?
Do you have a name?
name
در بخش پاسخها ، روی افزودن پاسخ کلیک کنید.
پاسخ زیر را در پنجره Text Response وارد کنید:
My name is Dialogflow!
روی ذخیره کلیک کنید.
آن را امتحان کنید
برای آزمایش هدف نام جدید خود، در شبیهساز Dialogflow، «نام شما چیست؟» را تایپ کنید. و enter را فشار دهید.
نماینده شما میتواند به سؤال شما به درستی پاسخ دهد حتی زمانی که سؤالاتی میپرسید که دقیقاً مشابه عبارات آموزشی نیستند (مثلاً "اسم شما چیست؟" در مقابل "اسم شما چیست؟").
Dialogflow از عبارات آموزشی برای آموزش یک مدل یادگیری ماشینی استفاده می کند که به عامل کمک می کند تا گفته های کاربر را با مقاصد صحیح مطابقت دهد.
تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eTo begin developing with Dialogflow, you need to set up an Actions project and a Dialogflow agent using the Actions console.\u003c/p\u003e\n"],["\u003cp\u003eDialogflow utilizes intents, containing training phrases and responses, to understand and respond to user requests.\u003c/p\u003e\n"],["\u003cp\u003eYou can test your Dialogflow agent using the built-in simulator by typing or speaking messages.\u003c/p\u003e\n"],["\u003cp\u003eDialogflow employs machine learning to match user input to the appropriate intents, even if the phrasing differs slightly from training phrases.\u003c/p\u003e\n"]]],[],null,["# Create a project and Dialogflow agent (Dialogflow)\n\nTo develop with Dialogflow, you first need to create an Actions project and a\nDialogflow agent. Having a project allows you to access the developer console to\nmanage and distribute your Action. The Dialogflow agent contains all the intents\nthat define your Action.\n| **Note:** When creating a new project, Actions on Google enables [Firebase](//firebase.google.com/), Google's developer platform that provides a number of services for app developers. Relative terms of service information can be found in the [Actions on Google Terms Explanation](/assistant/console/policies/terms-explanation).\n\nCreate an Actions project and Dialogflow agent\n----------------------------------------------\n\n1. Go to the [Actions console](//console.actions.google.com/).\n2. Click **New project**.\n3. Enter a name for your project and click **Create Project** .\n4. Scroll down to the **More options** section and click on the **Conversational** card.\n5. Click **Develop** in the top menu, then click **Actions** in the left menu.\n6. Click **Add Your First Action**.\n7. On the **Custom intent** card, click **Build**.\n8. The Dialogflow console appears with the information automatically populated in an agent. Click **Create** to save the agent.\n\nThe Dialogflow console\n----------------------\n\nYou should now see the Dialogflow console and the menu panel on the left. If\nyou're on a small screen and the menu is hidden, click\n*menu* in the upper left corner.\n\nThe center window shows the list of intents for the agent. By default,\nDialogflow agents start with two intents. The *Default Welcome Intent* greets\nyour users. Your agent matches the *Default Fallback Intent* when it doesn't\nunderstand what the users say.\n\nThe Dialogflow simulator is on the right side of the page. The simulator lets\nyou try out your agent by speaking or typing messages. In the Dialogflow\nsimulator, click **Try it now**, type anything, and press enter.\n\n**Figure 1**. A screenshot of the Dialogflow console showing an agent.\n\nCreate your first intent\n------------------------\n\nDialogflow uses intents to categorize a user's intentions. Intents have\n*Training Phrases*, which are examples of what a user might say to your agent.\nFor instance, a user who wants to know your agent's name might ask, \"What is\nyour name?\", \"Do you have a name?\", or simply say \"name\". These phrases have the\nsame end goal: to get the name of your agent.\n\nTo create an agent that handles this case, follow these steps:\n\n1. Click *add* next to **Intents** in the navigation menu.\n2. Enter `Name` in the **Intent name** text field.\n3. In the **Training Phrases** section, click **Add Training Phrases**.\n4. Enter the following phrases (press enter after each phrase):\n - `What is your name?`\n - `Do you have a name?`\n - `name`\n5. In the **Responses** section, click **Add Response**.\n6. Enter the following response in the **Text Response** window:\n - `My name is Dialogflow!`\n7. Click **Save**.\n\nTry it out\n----------\n\nTo test your new *Name* intent, in the Dialogflow simulator, type \"What's\nyour name?\" and press enter.\n\nYour agent can respond to your question correctly even when you ask questions\nthat aren't exactly the same as the training phrases (for example, \"What's your\nname?\" versus \"What is your name?\").\n\nDialogflow uses training phrases to train a machine learning model, which helps\nthe agent match user utterances to the correct intents."]]