Unhandled возникает, когда нет никакого намеренного обработчика для определенного намеренного запроса. Пожалуйста, проверьте запрос, сгенерированный JSON.
ичок в создании навыков Алекса. Я пытался создать навык для моего семестрового проекта в колледже и пытаюсь закончить его. Я наконец-то установил связь между лямбда и моделью взаимодействия и сейчас проверяю навык в инструменте. Я нахожу 2 проблемы.
1) Имя вызова возвращает мне необработанный ответ, и
2) Ни одно из намерений за пределами намерения запуска не отправляет ответ обратно. Лямбда-код выглядит следующим образом:
"use strict";
var Alexa = require("alexa-sdk");
var handlers = {
"Invocation": function LaunchIntent() {
this.response.speak("Hello, Welcome to Family Table. where would you like to make a reservation today?");
this.emit(':ask', ':responseReady');
context.succeed(handlers());
},
"LaunchIntent": function LaunchIntent() {
this.response.speak("Hello, Welcome to Family Table. where would you like to make a reservation today?");
this.emit(':responseReady');
context.succeed(handlers());
},
"FoodIntent": function FoodIntent() {
this.response.speak("What kind of food would you like today?");
this.emit(':responseReady');
context.succeed(handlers());
},
"cityintent": function cityintent() {
this.response.speak("Where would you like to eat?");
this.emit(':responseReady');
context.succeed(handlers());
},
"restaurantintent": function restaurantintent() {
this.response.speak("Would you like to eat at {RestaurantName}?");
this.emit(':responseReady');
context.succeed(handlers());
},
"cofirmintent": function cofirmintent() {
this.response.speak("You want to eat at {RestaurantName} correct?");
this.emit(':responseReady');
context.succeed(handlers());
},
"Amazon.FallbackIntent": function AmazonFallbackIntent() {
this.response.speak("Sorry I can't do that right now.");
this.emit(':responseReady');
context.succeed(handlers());
},
"Amazon.CancelIntent": function AmazonCancelIntent() {
this.response.speak("Cancelling");
this.emit(':responseReady');
context.succeed(handlers());
},
"Amazon.HelpIntent": function AmazonHelpIntent() {
this.response.speak("I don't know how to help you with that.");
this.emit(':responseReady');
context.succeed(handlers());
},
"Amazon.StopIntent": function AmazonStopIntent() {
this.response.speak("Alright, please come back soon.");
this.emit(':responseReady');
context.succeed(handlers());
},
"Amazon.YesIntent": function AmazonYesIntent() {
this.response.speak("Thank you for using Family Table. Your reservation has been made. Enjoy your meal.");
this.emit(':responseReady');
context.succeed(handlers());
},
'Unhandled': function () {
this.emit(':ask', 'I don\'t get it!', 'I don\'t get it!');
context.succeed(handlers());
},
};
exports.handler = function (event, context, callback) {
var alexa = Alexa.handler(event, context);
alexa.registerHandlers(handlers);
alexa.execute();
};
Чего мне не хватает? Спасибо за вашу помощь.