【发布时间】:2018-06-18 14:27:56
【问题描述】:
我想为 Alexa 发布我的技能。尽管如此,我的会话有问题,并重新提示用户可以继续玩。
这里是反馈:
“3.技能完成任务后,会话保持打开状态,不提示用户。技能完成请求后,如果不提示用户输入,则必须关闭会话。”
function getFactResponse(callback) {
//get random index from array of data
var index = getRandomInt(Object.keys(neverData).length -1);
// If we wanted to initialize the session to have some attributes we could add those here.
const sessionAttributes = {};
//Get card title from data
const cardTitle = neverData[index];
//Get output from data
const speechOutput = neverData[index];
// If the user either does not reply to the welcome message or says something that is not
// understood, they will be prompted again with this text.
const repromptText = 'Just say it again if you want to play' ;
const shouldEndSession = false;
callback(sessionAttributes,
buildSpeechletResponse(cardTitle, speechOutput, repromptText,
shouldEndSession));
}
当我将 shouldEndSession 设置为 true 时,它不起作用,因为 Alexa 正在结束会话并且玩家必须再次开始该技能,但情况并非如此。我希望你能帮助我:)
可以
【问题讨论】:
标签: javascript node.js alexa alexa-skills-kit