change utterances to correct form;change intents to mimic dialog;

This commit is contained in:
Bilal
2018-01-11 14:05:44 +00:00
parent 7d79c03d15
commit 4c8c1c5e0e
5 changed files with 56 additions and 33 deletions

View File

@@ -49,6 +49,9 @@ var refreshTokens = function () {
parsedResponse.access_token,
parsedResponse.expires_in
);
console.log('Token refresh failed');
console.log(body);
reject(body);
});
});
};
@@ -81,6 +84,7 @@ var generateInteractionModel = function (skill) {
allIntents.push ({name: intent.intentName, samples: intent.questions});
});
//Special Email Intents :
allIntents.push({
name: 'EmailIntentLaunch',
@@ -92,36 +96,40 @@ var generateInteractionModel = function (skill) {
'Leave a message'
]
});
allIntents.push({
name: 'EmailIntent',
slots:[
{
name: 'Name',
type: 'AMAZON.Person'
'name': 'Name',
'type': 'AMAZON.US_FIRST_NAME'
},
{
name: 'Email',
type: 'AMAZON.LITERAL'
'name': 'Email',
'type': 'AMAZON.LITERAL'
},
{
name: 'Message',
type: 'AMAZON.LITERAL'
'name': 'Message',
'type': 'AMAZON.LITERAL'
},
{
name: 'Data',
type: 'AMAZON.LITERAL'
'name': 'Data',
'type': 'AMAZON.LITERAL'
}
],
samples: [
'My name is {Name}',
'I am {Name}',
'{Data}',
'My email is {Email}',
'Send replay to {Email}',
'My message is {Message}'
'{exampleww at wwdwdw|Data}',
'My email is {example at efefegedd|Email}',
'Send replay to {example at abcdefg|Email}',
'My message is {The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog.|Message}'
]
});
result.interactionModel = {};
result.interactionModel.languageModel = {