Something strange is happening in my skill.
I isolated the error into a different skill.
The skill id: amzn1.ask.skill.6918614f-1f20-4ea3-bad4-b2284a296938
In the skill, I have one intent- HelloWorldIntent.
The intent has 2 slots- lala and bibi.
The default prompts for each one of them(the prompts that been called when Alexa doesn't find a proper value for the slot in the user reply) are:
lala- sorry, I didn't get that. what is the value of lala?
bibi- bibibibbb
***the auto delegation interface is on
I have an addElicitSlot action in LaunchRequestHandler for lala slot,
and in HelloWorldIntentHandler for bibi slot.
However, when I tried to give a value to lala,
I get the default prompt of bibi.
The interaction model-
{
"interactionModel": {
"languageModel": {
"invocationName": "check it",
"modelConfiguration": {
"fallbackIntentSensitivity": {
"level": "LOW"
}
},
"intents": [
{
"name": "AMAZON.CancelIntent",
"samples": []
},
{
"name": "AMAZON.HelpIntent",
"samples": []
},
{
"name": "AMAZON.StopIntent",
"samples": []
},
{
"name": "HelloWorldIntent",
"slots": [
{
"name": "lala",
"type": "AMAZON.SearchQuery"
},
{
"name": "bibi",
"type": "AMAZON.SearchQuery"
}
],
"samples": [
"hello {lala}",
"ya {bibi}"
]
},
{
"name": "AMAZON.NavigateHomeIntent",
"samples": []
},
{
"name": "AMAZON.FallbackIntent",
"samples": []
}
],
"types": []
},
"dialog": {
"intents": [
{
"name": "HelloWorldIntent",
"confirmationRequired": false,
"prompts": {},
"slots": [
{
"name": "lala",
"type": "AMAZON.SearchQuery",
"confirmationRequired": false,
"elicitationRequired": true,
"prompts": {
"elicitation": "Elicit.Slot.716071660021.1504772685502"
}
},
{
"name": "bibi",
"type": "AMAZON.SearchQuery",
"confirmationRequired": false,
"elicitationRequired": true,
"prompts": {
"elicitation": "Elicit.Slot.1152666376659.1399331737295"
}
}
]
}
],
"delegationStrategy": "ALWAYS"
},
"prompts": [
{
"id": "Elicit.Slot.716071660021.1504772685502",
"variations": [
{
"type": "PlainText",
"value": "sorry, i didnt get that. what is the value of lala?"
}
]
},
{
"id": "Elicit.Slot.1152666376659.1399331737295",
"variations": [
{
"type": "PlainText",
"value": "bibibibbb"
}
]
}
]
}
The code-
const LaunchRequestHandler = {
canHandle(handlerInput) {
return Alexa.getRequestType(handlerInput.requestEnvelope) === 'LaunchRequest';
},
handle(handlerInput) {
const speakOutput = handlerInput.t('WELCOME_MSG');
return handlerInput.responseBuilder
.speak(speakOutput)
.reprompt(speakOutput)
.addElicitSlotDirective('lala', {
name: 'ChallengeIntent',
confirmationStatus: 'NONE',
slots: {}
})
.getResponse();
}
};
const HelloWorldIntentHandler = {
canHandle(handlerInput) {
return Alexa.getRequestType(handlerInput.requestEnvelope) === 'IntentRequest'
&& Alexa.getIntentName(handlerInput.requestEnvelope) === 'HelloWorldIntent';
},
handle(handlerInput) {
const lala=Alexa.getSlotValue(handlerInput.requestEnvelope, 'lala')
const speakOutput =`yay the value is ${lala}`;
return handlerInput.responseBuilder
.speak(speakOutput)
.addElicitSlotDirective('bibi', {
name: 'ChallengeIntent',
confirmationStatus: 'NONE',
slots: {}
})
//.reprompt('add a reprompt if you want to keep the session open for the user to respond')
.getResponse();
}
};
I'm very frustrated, please help me:(
I need to submit my work until the end of August.
Tnx:)