Alexa YESNO意向

时间:2018-09-13 14:12:26

标签: alexa alexa-skills-kit alexa-skill

我之前也曾问过这个问题,但是没有运气,所以我再次发帖。我正在研究alexon alexa技能,我希望当我叫“ YESNOIntent”时,在不同的Intents下应该有不同的回答。

'FirstIntent': function () {
speechoutput = 'bla bla, would you like to know anything else?'
this.emit(":ask", speechOutput)
},

'YESNOIntent': function (){
speechoutput = 'speech1'
this.emit(":ask", speechOutput)
},

'SecondIntent': function () {
speechoutput = 'bla bla, would you like to know anything else?'
this.emit(":ask", speechOutput)
},

'YESNOIntent': function (){
speechoutput = 'speech2'
this.emit(":ask", speechOutput)
},

'ThirdIntent': function () {
speechoutput = 'bla bla, would you like to know anything else?'
this.emit(":ask", speechOutput)
},

'YESNOIntent': function (){
speechoutput = 'speech3'
this.emit(":ask", speechOutput)
},

......等等

1 个答案:

答案 0 :(得分:2)

是两回事。您无法将这两个合并为一个YesNoIntent。就像我在previous answer中所说的那样,您应该使用AMAZON.YesIntentAMAZON.NoIntent

利用sessionAttributes来跟踪“您相对于对话的位置” ,以便在AMAZON.YesIntent或{{1 }}处理程序被触发。