官术网_书友最值得收藏!

Alexa Skills Kit

To create our first Alexa Skill, we're going to use Alexa Skills Kit. Search for Alexa Skills Kit or go to www.developer.amazon.com/alexa-skills-kit and you should see a screen with a Create Skill or Start a Skill button:

Creating your first skill

Start by giving your skill a name. This should be something that describes what the skill does. For this, we can call it Hi. Click Next and you'll be able to select a model for your skill. We want to choose Custom so we can create the skill exactly how we want:

Creating a custom skill

Click Create skill and once the setup has finished, you'll end up on the Alexa Skill builder page. To get started, we need to click on Invocation Name in the left-hand menu. This is where we set up the command that starts our skill. I'm going to use sams demo bot for this first skill. When you create bigger skills, it is a good idea to spend some time thinking about what you use as your invocation phrase and practice saying it out loud:

Skill invocation

Now that we can start our skill, we need to create an intent so that our skill does something. Click the Add button, next to the intents in the left-hand menu, to create a new intent. Here, you have the option to Create custom intent or to use an existing intent from Amazon's library. Most of Amazon's intents are to do with page navigation or music control, so we're going with a custom intent.

Give your intent a name that describes what the intent is going to do. In our case, it is to say Hello, so that is what it can be called. Click Create custom intent to start editing the intent.

Now that we're in the intent window for our Hello intent, we need to add some utterances. As we talked about in Chapter 1, Understanding Chatbots, these are phrases the user might say to trigger this intent. For this intent, those utterances might be hi, hello, or hey:

Hello utterances

We have completed our first Alexa intent, so we need to save and build this model. At the top of the intents window is a Save Model button and a Build Model button, so save it and then build it. Building the model sometimes takes a while, so just wait for that to finish.

主站蜘蛛池模板: 华亭县| 海淀区| 鹿泉市| 达尔| 长春市| 临海市| 松滋市| 宜良县| 民乐县| 梁平县| 鄢陵县| 如东县| 出国| 乐安县| 蒙阴县| 延寿县| 抚顺市| 綦江县| 广灵县| 长垣县| 花莲市| 通山县| 湾仔区| 勃利县| 炉霍县| 锡林浩特市| 深泽县| 安庆市| 九龙县| 中宁县| 嘉荫县| 青浦区| 淮滨县| 雅江县| 长兴县| 横山县| 庄河市| 天祝| 扎囊县| 房产| 内丘县|