所以我在构建我的alexa技能时遇到问题,我需要将一个Intent链接到我的Launchrequest,它可以与此配合使用
return handlerInput.responseBuilder
.addDelegateDirective({
name: 'UserLogin',
confirmationStatus: 'NONE',
slots: {}
})
.speak("You need to login!")
.withShouldEndSession(false)
.getResponse();
但是在我的链式意图中,我需要填充两个插槽,但是alexa只要求两次意图,然后什么也没有,它不要求第二项意图?
这是我在lambda中的意图,>
<< [const LoginUserIntent= { canHandle(handlerInput) { const request = handlerInput.requestEnvelope.request; return request.type === 'IntentRequest' && request.intent.name === 'UserLogin' && request.dialogState !== 'COMPLETED'; }, handle(handlerInput) { return handlerInput.responseBuilder .getResponse() }, }
知道如何使这项工作有效吗?
我遇到了完全相同的问题,我链接到意图提示输入了1个插槽,然后在提供了插槽值后重复了提示,并且我有3个其他所需的插槽,它不要求任何插槽而只是停止。