Hello guys, welcome to the 26th I should have create custom Alexa skill using AWS lambda function tutorials for beginners. In this session we will learn how to use elicits non directive. Like delegate directive, the elicit start directive is used to create multi turn conversation. If the user has not uttered a specific slot value, then this directive can be used to manually specify your prompt to elicit for particular slot indelicate directive, we have set default value but in elicit slot we will prompt the US Air Force law finally let us create a new intent for this. I will use kill consult for that year we will obtain some details from the user and store it in Dynamo DB later. To check all slot values which are uttered we will use the illicit slot directly.
That is create a new interest With name add user preference. Here the user may say my name is person name. I want to visit country name with count francs, or with all of those details. My name is person name and I want to visit country name with my conference. Let us create slots for all those three. Click on Edit dialog link of personally.
Person name will be the type of Amazon dot person. Here we want to enable slot filling. Here we need to add some tags that will be prompt when the user does not utter value. That is right. Tell me your name. And here we need to add sample utterances that user may say your user may say only person name only.
I am person name. My name is person named Nick on Add user preference. Now, let us add a dialog for controlling slot slot time will be amazon dot country any animal slot filling let us use which country you want to visit in the prompt text. Here the user may say only country name or say I want to visit country. Added counsellor dialogue We will use Amazon dot number as slot type. Enable slot filling.
Add with how many friends as a problem average end user may say only count or with count order. Same model and open JSON editor. Here is in time that we have created it into slots as well as sample utterances. Scroll down. Here the new dialogue property has been added for add user preference in 10. For all of the slots, we have elicitation required true in the elicitation prompt contains unique value for from ground to bottom.
Here is a new one new property added mean problems variation property contains all utterances that we have added in prompt box of slot filling that is build model. Let us switch to Visual Studio code and update lambda function. Let us create a handler for add user preference and then on adding user press in gank obtain intent from this So I think all three slots from intent and check for if person names not does not contain a value. Then we need to use pick Mac hard and fast text that you want to use as your ad illicit slot direct to method and pass name for the slot for which you want to perform LSA your name passing the name of person named slot create f that is us copy this if statement and paste this. Now we will check for country names value if not entered then prompt debate Which country do you want to visit update slot name in this matter.
Again copy this if statement and modify this for count slot And prompt for with how many friends update slot name in this matter. If we have all those three slot values, then we will generate text that will return all of the slot values. First of all, we need to obtain all slot values. Create speech with message. Your name is person name. You want to visit country name with count other and generate a response for that.
Add this into Request Handler into file and deploy only lambda function. We have updated interaction models from the console. So we do not need to update it here. Alexa, open the third demo. Welcome to third demo skill. I want to visit Spain.
Tell me your name. Victoria. With how many friends with Dodd Frank? Your name is Victoria. You want to visit Spain with two other Yeah, we have a dead only country name. And Alexa asked for personal as well as count.
No, I'm crying again. This time I will utter all of the slots. Alexa, open the third demo Welcome to third demo skill. My name is Victoria and I want to visit France with my five friends. Your name is Victoria, you want to visit France with two other let us see what we have done in this session. In this it slot is used to obtain missing slots from the user.
We need to use add elicit slot directive method of response builder. Here we need to pass a slot name on which we want to perform a reset. Thanks for watching this video. If you have any doubts, please feel free to contact me Have a nice day.