XCLUB-COOL STUFF AROUND YOU

 找回密码
 Register
查看: 62|回复: 3
打印 上一主题 下一主题

Building an Action for Google Assistant: Getting Started

[复制链接]

1201

主题

2万

帖子

2万

积分

Jade Diamond LV32

ACTIVE STARPrimary beta testersign star1sign star2sign star3sign star4post star1post star2post star3post star4X'Club badge exclusive for India

跳转到指定楼层
#1
发表于 2019-04-09 11:17:21 来自手机 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
Are you a fan of Google Assistant? Do you say things like, “OK Google, pass the salt!” at the dinner table? Have you asked Google Assistant random questions to see what it would say in reply?[br][br] Google Assistant is a voice assistant from Google found on mobile devices, Google Home, and more. I allows users to perform tasks and get information in a hands-free fashion via a Voice User Interface, or VUI. It allows users another way to interact with your brand other than your Android app. Google Assistant is on more than 500 million devices worldwide, and Google expects that number to reach one billion soon.[br][br]Did you know you can write your own actions for Google Assistant? In this tutorial, you’ll learn how to create your own conversational experience with Google Assistant.[br][br]VUI and Conversational Design[br][br]VUI design lets you create a natural and intuitive conversation for the user that can scale across different surfaces such as screen or speaker only. When designing a conversation, it’s important to consider the following:[br][br]Is VUI an appropriate means of accomplishing the task the action creates? Here’s a [a href="https://designguidelines.withgoogle.com/conversation/conversation-design-process/is-conversation-the-right-fit.html#is-conversation-the-right-fit-take-the-quiz"]quiz[/a] to help you determine whether VUI is a good fit.[br][br][ul][li]Who is the audience for this action?[br][/li][/ul][ul][li]What is the personality of your action? For example: An action created for a trendy surfboard shop will have a much different persona than an action created for a high-scale professional clothing company. Look at the difference between these two conversations:[br][/li][/ul][img src="/storage/emulated/0/Download/Screen-Shot-2019-03-18-at-6.58.55-PM-650x388.png"][br][img src="/storage/emulated/0/Download/Screen-Shot-2019-03-18-at-6.59.08-PM.png"][br]Designing an Action’s Conversation[br][br]A good conversation design includes the following components:[br][br]A Happy Path, or the shortest path through the conversation that accomplishes the task.[br][br][ul][li]Conversation repair scenarios that allow the conversation to recover and continue in cases where the user says something unexpected or the user is not properly understood.[br][/li][/ul][ul][li]Opportunities for the user to exit the conversation gracefully.[br][/li][/ul][ul][li]Varied greetings when starting the action to keep the experience new and spontaneous for the user.[br][/li][/ul]Getting Started[br][br]Get the projects by clicking the Download Materials button at the top or bottom of this tutorial. In this tutorial you’ll write an action to play the right from the assistant!.[br][br]You need:[br][br]An active Google account. Sign up for one [a href="https://accounts.google.com/"]here[/a].[br][br][ul][li]An Android phone/tablet logged in with the same Google account that you’ll use in this tutorial.[br][/li][/ul]Note: It is helpful, but not required to have some understanding of NodeNPM, and Promises.[br][br]Creating the Action Project[br][br]You need to start off by creating a project to work with. Go to the Actions Consoleand login with the Google account you’d like to use for development. Click Add/import Project:[br][br][img src="/storage/emulated/0/Download/ActionsConsoleAddAnAction.png"][br]Then, accept the terms of agreement and name the project RWPodcast and click Create Project:[br][br][img src="/storage/emulated/0/Download/Screen-Shot-2019-03-18-at-7.08.02-PM.png"][br][br]Scroll down to the More Options section. Select Conversational:[br][img src="/storage/emulated/0/Download/more_options_conversational_experience-650x223.png"][br][br]In the left-hand navigation pane, click Build ▸ Actions ▸ Add Your First Action[img src="/storage/emulated/0/Download/add_your_first_action_from_actions_console-650x338.png"][br]Select the Custom category on the left-hand pane and click Build:[img src="/storage/emulated/0/Download/createaction.png"][br]This will take you to the Dialogflowconsole webpage. If prompted, select or login with your Google account, and click Allow. You might also need to accept terms of service.[br][br]Checking Permissions Settings[br][br]You need to check some permissions for your set up. Go to the Activity Controlspage. Enable the following permissions:[br][br]Web & App Activity, checking Include Chrome History:[br][br][img src="/storage/emulated/0/Download/WebActivityPermission.png"][br]Device Information:[img src="/storage/emulated/0/Download/DeviceInformation-650x363.png"][br]Voice & Audio Activity:[img src="/storage/emulated/0/Download/VoiceAndAudio-650x363.png"][br]Creating the Dialogflow Agent[br][br]Next, create your agent. The [a href="https://console.dialogflow.com/api-client/#/newAgent"]Dialogflow[/a][a href="https://console.dialogflow.com/api-client/#/newAgent"] page[/a] will prompt you to create an auto-configured Dialogflow agent. Click Create.[br][br][img src="/storage/emulated/0/Download/Screen-Shot-2019-02-09-at-7.34.16-PM.png"][br]Agents and Intents[br][br]Agents are Natural Language Understanding (NLU) modules. Agents translate what the user says into actionable data. When the utterance of the user matches one of the agent’s intents, the agent performs the translation of the user’s request into actionable data and returns the result to the user.[br][br]Intents match user input to the appropriate responses. In the training phrases of the intent, you:[br][br]Define examples of user utterances that can trigger the intent.[br][br][ul][li]Specify what to extract from the utterance.[br][/li][/ul][ul][li]Specify how to respond.[br][/li][/ul]Generally, an intent represents a single ‘turn’ in the conversation.[br][br]Intents consist of four different components:[br][br]Name: An identifier for the intent that reference by the fulfillment.[br][br][ul][li]Training Phrases: A defined collection of example phrases that invoke a particular intent. Dialogflow will automatically match similar phrases with the ones provided.[br][/li][/ul][ul][li]Actions and Parameters: Define which parts of the user utterances to extract. These often include information such as dates, times, quantities and places.[br][/li][/ul][ul][li]Response: The utterance displayed or spoken back to the user.[br][/li][/ul]Note: Dialogflow supports a feature related to intents called contexts. Contexts are used to have more control over intent matching and manage the state of the conversation over multiple intents. To learn more, check the [a href="https://dialogflow.com/docs/contexts"]documentation[/a].[br][br]A typical agent has several intents that address different user intentions. When a Dialogflow agent hears an utterance from the user, it attempts to match that utterance to one of the training phrases defined in the intents. Then, the agent returns the response from that intent.[br][br]There are special types of intents. By default, a new agent includes two of these, fallback intent and the the welcome intent.[br][br]The agent invokes a fallback intent when the user says something that the agent can’t recognize.[br][br]The agent invokes a welcome intentwhen the user starts a conversation with the agent. The welcome intent informs the user what the action does or how to start a conversation.[br][br]Click on the Intents tab on the left pane. Then select Default Welcome Intent to see the default welcome intent:[br][br][img src="/storage/emulated/0/Download/DefaultWelcomeIntent-650x166.png"][br]Agents and Intents[br][br]Agents are Natural Language Understanding (NLU) modules. Agents translate what the user says into actionable data. When the utterance of the user matches one of the agent’s intents, the agent performs the translation of the user’s request into actionable data and returns the result to the user.[br][br]Intents match user input to the appropriate responses. In the training phrases of the intent, you:[br][br]Define examples of user utterances that can trigger the intent.[br][br][ul][li]Specify what to extract from the utterance.[br][/li][/ul][ul][li]Specify how to respond.[br][/li][/ul]Generally, an intent represents a single ‘turn’ in the conversation.[br][br]Intents consist of four different components:[br][br]Name: An identifier for the intent that reference by the fulfillment.[br][br][ul][li]Training Phrases: A defined collection of example phrases that invoke a particular intent. Dialogflow will automatically match similar phrases with the ones provided.[br][/li][/ul][ul][li]Actions and Parameters: Define which parts of the user utterances to extract. These often include information such as dates, times, quantities and places.[br][/li][/ul][ul][li]Response: The utterance displayed or spoken back to the user.[br][/li][/ul]Note: Dialogflow supports a feature related to intents called contexts. Contexts are used to have more control over intent matching and manage the state of the conversation over multiple intents. To learn more, check the [a href="https://dialogflow.com/docs/contexts"]documentation[/a].[br][br]A typical agent has several intents that address different user intentions. When a Dialogflow agent hears an utterance from the user, it attempts to match that utterance to one of the training phrases defined in the intents. Then, the agent returns the response from that intent.[br][br]There are special types of intents. By default, a new agent includes two of these, fallback intent and the the welcome intent.[br][br]The agent invokes a fallback intent when the user says something that the agent can’t recognize.[br][br]The agent invokes a welcome intentwhen the user starts a conversation with the agent. The welcome intent informs the user what the action does or how to start a conversation.[br][br]Click on the Intents tab on the left pane. Then select Default Welcome Intent to see the default welcome intent:[br][br]

img.png (130.37 KB, 下载次数: 0)

img.png

img.png (383.68 KB, 下载次数: 0)

img.png

img.png (147 KB, 下载次数: 0)

img.png

img.png (68.79 KB, 下载次数: 0)

img.png

img.png (68.79 KB, 下载次数: 0)

img.png

img.png (125.74 KB, 下载次数: 0)

img.png

img.png (173.12 KB, 下载次数: 0)

img.png

img.png (101.11 KB, 下载次数: 0)

img.png

img.png (128.2 KB, 下载次数: 0)

img.png

img.png (143.57 KB, 下载次数: 0)

img.png

img.png (87.16 KB, 下载次数: 0)

img.png

img.png (52.69 KB, 下载次数: 0)

img.png
回复

使用道具 举报

3469

主题

5万

帖子

5万

积分

Sapphire Diamond LV41

Daily Check-in2019sign star1sign star2sign star3sign star4post star1post star2post star3post star4post star5X'Club badge exclusive for IndiaXclub Kol

#2
发表于 2019-04-09 12:19:18 来自手机 | 只看该作者
Thanks to sharing the XClub
回复

使用道具 举报

5736

主题

2万

帖子

3万

积分

Jade Diamond LV36

ACTIVE STAR2019post star1post star2sign star1sign star2sign star3post star3post star4post star5sign star4X'Club badge exclusive for India

#3
发表于 2019-04-09 13:44:57 来自手机 | 只看该作者
thanks to the information
回复

使用道具 举报

1851

主题

1万

帖子

1万

积分

Content Partner

Rank: 8Rank: 8

Tech Fans2020COPYWRITERsign star1sign star2sign star3post star1post star2post star3sign star4X'Club badge exclusive for Indiapost star4

#4
发表于 2019-04-09 14:05:04 来自手机 | 只看该作者
good one
回复

使用道具 举报

高级模式
B Color Link Quote Code Smilies |上传

本版积分规则

Infinix Official Website|Infinix official mall|infinix Note 4|XCLUB-COOL STUFF AROUND YOU

GMT+8, 2025-07-07 06:02 , Processed in 0.040517 second(s), 22 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表