Fixes according to model changes
This commit is contained in:
108
saburlySkill.js
108
saburlySkill.js
@@ -28,7 +28,8 @@ const responseMessages = {
|
|||||||
PROJECTS: 'Some of our projects are: Agritech IoT Solution, real-estate search website, online shop for baby products, students registry for Ministry of Education, etc.',
|
PROJECTS: 'Some of our projects are: Agritech IoT Solution, real-estate search website, online shop for baby products, students registry for Ministry of Education, etc.',
|
||||||
WELCOME_REPROMPT: 'For instructions on what you can say, please say: help.',
|
WELCOME_REPROMPT: 'For instructions on what you can say, please say: help.',
|
||||||
HELP: 'To ask us about our services, say: what do you do? If you want to know about technologies say: what do you know? If you\'re interested in projects we worked on, say: tell me about your projects. If you want to know about how we approach work, say: tell me about your process.',
|
HELP: 'To ask us about our services, say: what do you do? If you want to know about technologies say: what do you know? If you\'re interested in projects we worked on, say: tell me about your projects. If you want to know about how we approach work, say: tell me about your process.',
|
||||||
STOP: 'Goodbye, and stay Saburly.'
|
STOP: 'Goodbye, and stay Saburly.',
|
||||||
|
UNKNOWN_PIECE_OF_INFO: 'You can ask us about projects, technologies, services and process'
|
||||||
};
|
};
|
||||||
|
|
||||||
alexaApp.launch(function(request, response) {
|
alexaApp.launch(function(request, response) {
|
||||||
@@ -59,37 +60,102 @@ alexaApp.intent("AMAZON.CancelIntent", {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
alexaApp.intent("GetProcessIntent", {
|
// alexaApp.intent("GetProcessIntent", {
|
||||||
"utterances": []
|
// "utterances": [
|
||||||
|
// "tell me about your process",
|
||||||
|
// "what is your process",
|
||||||
|
// "explain your process",
|
||||||
|
// "process",
|
||||||
|
// "talk about your process"
|
||||||
|
// ]
|
||||||
|
// },
|
||||||
|
// function(request, response) {
|
||||||
|
// response.say(responseMessages.PROCESS).shouldEndSession(false);
|
||||||
|
// }
|
||||||
|
// );
|
||||||
|
|
||||||
|
alexaApp.intent("GetInfoIntent", {
|
||||||
|
"utterances": []
|
||||||
},
|
},
|
||||||
function(request, response) {
|
function(request, response) {
|
||||||
response.say(responseMessages.PROCESS).shouldEndSession(false);
|
switch(request.slot("InfoSlot")) {
|
||||||
|
case "process":
|
||||||
|
response.say(responseMessages.PROCESS).shouldEndSession(false);
|
||||||
|
break;
|
||||||
|
case "services":
|
||||||
|
response.say(responseMessages.SERVICES).shouldEndSession(false);
|
||||||
|
break;
|
||||||
|
case "technologies":
|
||||||
|
response.say(responseMessages.TECHNOLOGIES).shouldEndSession(false);
|
||||||
|
break;
|
||||||
|
case "projects":
|
||||||
|
response.say(responseMessages.PROJECTS).shouldEndSession(false);
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
response.say(responseMessages.UNKNOWN_PIECE_OF_INFO).shouldEndSession(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
alexaApp.intent("GetTechnologiesIntent", {
|
alexaApp.intent("WhatIntent", {
|
||||||
"utterances": []
|
"utterances": []
|
||||||
},
|
},
|
||||||
function(request, response) {
|
function(request, response) {
|
||||||
response.say(responseMessages.TECHNOLOGIES).shouldEndSession(false);
|
switch(request.slot("ActionSlot")) {
|
||||||
|
case "do":
|
||||||
|
response.say(responseMessages.SERVICES).shouldEndSession(false);
|
||||||
|
break;
|
||||||
|
case "know":
|
||||||
|
response.say(responseMessages.TECHNOLOGIES).shouldEndSession(false);
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
response.say(responseMessages.UNKNOWN_PIECE_OF_INFO).shouldEndSession(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
// alexaApp.intent("GetTechnologiesIntent", {
|
||||||
|
// "utterances": [
|
||||||
|
// "what technologies do you know",
|
||||||
|
// "what technologies do you use",
|
||||||
|
// "what technologies do you work with",
|
||||||
|
// "technologies",
|
||||||
|
// "talk about your technologies"
|
||||||
|
// ]
|
||||||
|
// },
|
||||||
|
// function(request, response) {
|
||||||
|
// response.say(responseMessages.TECHNOLOGIES).shouldEndSession(false);
|
||||||
|
// }
|
||||||
|
// );
|
||||||
|
|
||||||
alexaApp.intent("GetServicesIntent", {
|
// alexaApp.intent("GetServicesIntent", {
|
||||||
"utterances": []
|
// "utterances": [
|
||||||
},
|
// "what do you do",
|
||||||
function(request, response) {
|
// "what services do you offer",
|
||||||
response.say(responseMessages.SERVICES).shouldEndSession(false);
|
// "what are your services",
|
||||||
}
|
// "tell me something about your services",
|
||||||
);
|
// "i want to know about your services",
|
||||||
|
// "services",
|
||||||
|
// "talk about your services"
|
||||||
|
// ]
|
||||||
|
// },
|
||||||
|
// function(request, response) {
|
||||||
|
// response.say(responseMessages.SERVICES).shouldEndSession(false);
|
||||||
|
// }
|
||||||
|
// );
|
||||||
|
|
||||||
alexaApp.intent("GetProjectsIntent", {
|
// alexaApp.intent("GetProjectsIntent", {
|
||||||
"utterances": []
|
// "utterances": [
|
||||||
},
|
// "tell me about projects",
|
||||||
function(request, response) {
|
// "say something about your project",
|
||||||
response.say(responseMessages.PROJECTS).shouldEndSession(false);
|
// "what are your projects",
|
||||||
}
|
// "projects",
|
||||||
);
|
// "talk about your projects"
|
||||||
|
// ]
|
||||||
|
// },
|
||||||
|
// function(request, response) {
|
||||||
|
// response.say(responseMessages.PROJECTS).shouldEndSession(false);
|
||||||
|
// }
|
||||||
|
// );
|
||||||
|
|
||||||
app.listen(PORT);
|
app.listen(PORT);
|
||||||
console.log("Listening on port " + PORT + ", try http://localhost:" + PORT + "/step1");
|
console.log("Listening on port " + PORT + ", try http://localhost:" + PORT + "/step1");
|
||||||
|
|||||||
Reference in New Issue
Block a user