【问题标题】:Multi turn dialog alexa skill多轮对话alexa技能
【发布时间】:2018-06-06 09:10:25
【问题描述】:

我们开发了一项需要多轮对话的技能。但是,当 Alexa 确认第一个插槽时,它会弹出“请求的技能响应有问题”。

alexa 调用的 lambda 代码如下所示。

 'DialogIntent': function(){
       if (this.event.request.dialogState === "STARTED") {
        console.log("in STARTED");

        var updatedIntent = this.event.request.intent;
        this.emit(":delegate", updatedIntent);
    } else if (this.event.request.dialogState !== "COMPLETED") {
        console.log("in not completed");
        this.emit(":delegate", updatedIntent);
    } else {
        console.log("in completed");
        return this.event.request.intent.slots;
    }
    return null;
}

we are doing everything suggested in https://developer.amazon.com/docs/custom-skills/dialog-interface-reference.html

【问题讨论】:

  • 您是否为槽添加了话语以及提示?
  • 你为什么要返回这个return this.event.request.intent.slots;。当状态 === "COMPLETED" 时,您应该发出正确的响应。

标签: dialog alexa slots


【解决方案1】:

Nikhil Wagh 在 cmets 中回答了这个问题。

return 什么都不做,您需要使用 alexa sdk,为此,您需要遵循文档。文档说,使用 emit 发送您已经构建的答案。 Source

this.response.speak("Success!").listen("Can you reapeat?"); //for example
this.emit(':responseReady');

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-10-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-11-04
    • 2017-03-28
    • 1970-01-01
    相关资源
    最近更新 更多