dialog test
This commit is contained in:
@@ -58,6 +58,7 @@ var generateInteractionModel = function (skill) {
|
||||
let allIntents = [];
|
||||
let allPrompts = [];
|
||||
let dialogIntents = [];
|
||||
let allTypes = [];
|
||||
|
||||
let defaultIntents = [
|
||||
{
|
||||
@@ -98,11 +99,19 @@ var generateInteractionModel = function (skill) {
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Color",
|
||||
"type": "AMAZON.Color",
|
||||
"name": "Email",
|
||||
"type": "emailSlot",
|
||||
"samples": [
|
||||
"{Color}",
|
||||
"My favorite color is {Color}"
|
||||
"{Email}",
|
||||
"My email is {Email}"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Message",
|
||||
"type": "emailMessage",
|
||||
"samples": [
|
||||
"{Message}",
|
||||
"My message is {Message}"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -126,11 +135,27 @@ var generateInteractionModel = function (skill) {
|
||||
"variations": [
|
||||
{
|
||||
"type": "PlainText",
|
||||
"value": "Tell me your favorite color"
|
||||
"value": "What is your email"
|
||||
},
|
||||
{
|
||||
"type": "PlainText",
|
||||
"value": "What is your favorite color"
|
||||
"value": "Tell me your email"
|
||||
}
|
||||
]
|
||||
}
|
||||
);
|
||||
|
||||
allPrompts.push(
|
||||
{
|
||||
"id": "Elicit.Intent-EmailIntent.IntentSlot-Message",
|
||||
"variations": [
|
||||
{
|
||||
"type": "PlainText",
|
||||
"value": "What is your message ?"
|
||||
},
|
||||
{
|
||||
"type": "PlainText",
|
||||
"value": "What is the message ?"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -152,12 +177,51 @@ var generateInteractionModel = function (skill) {
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Color",
|
||||
"type": "AMAZON.Color",
|
||||
"name": "Email",
|
||||
"type": "emailSlot",
|
||||
"elicitationRequired": true,
|
||||
"confirmationRequired": false,
|
||||
"prompts": {
|
||||
"elicitation": "Elicit.Intent-EmailIntent.IntentSlot-Color"
|
||||
"elicitation": "Elicit.Intent-EmailIntent.IntentSlot-Email"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Message",
|
||||
"type": "emailMessage",
|
||||
"elicitationRequired": true,
|
||||
"confirmationRequired": false,
|
||||
"prompts": {
|
||||
"elicitation": "Elicit.Intent-EmailIntent.IntentSlot-Message"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
);
|
||||
|
||||
allTypes.push(
|
||||
{
|
||||
"name": "emailMessage",
|
||||
"values": [
|
||||
{
|
||||
"id": null,
|
||||
"name": {
|
||||
"value": "Quick brown fox jumps over lazy dog. Quick brown fox jumps over lazy dog. Quick brown fox jumps over lazy dog.",
|
||||
"synonyms": []
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
);
|
||||
|
||||
allTypes.push(
|
||||
{
|
||||
"name": "emailSlot",
|
||||
"values": [
|
||||
{
|
||||
"id": null,
|
||||
"name": {
|
||||
"value": "blablablabla@blablabla.blabla.blabla",
|
||||
"synonyms": []
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -221,6 +285,7 @@ var generateInteractionModel = function (skill) {
|
||||
intents: allIntents,
|
||||
};
|
||||
|
||||
result.interactionModel.types = allTypes;
|
||||
result.interactionModel.prompts = allPrompts;
|
||||
result.interactionModel.dialog = {};
|
||||
result.interactionModel.dialog.intents = dialogIntents;
|
||||
|
||||
Reference in New Issue
Block a user