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

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.

主站蜘蛛池模板: 婺源县| 广汉市| 庐江县| 阿克苏市| 乐昌市| 玉田县| 罗山县| 蓝田县| 龙陵县| 锡林浩特市| 新余市| 千阳县| 海城市| 班玛县| 石首市| 保定市| 三河市| 三穗县| 丰镇市| 罗源县| 福泉市| 和田县| 喀喇| 永和县| 通道| 霍城县| 石嘴山市| 兴安盟| 哈巴河县| 荣成市| 阳山县| 凤台县| 闸北区| 定结县| 上虞市| 阜阳市| 府谷县| 若尔盖县| 桂东县| 茶陵县| 张家港市|