Aws Lex Free Text Slot

Aws Lex Free Text Slot

Aws Lex Free Text Slots

lex-response.js
'use strict';
exports.handler=(event,context,callback)=>{
// Currently all possible fields
// {
// 'sessionAttributes': {
// 'key1': 'value1',
// 'key2': 'value2'
// ...
// },
// 'dialogAction': {
// 'type': 'ElicitIntent, ElicitSlot, ConfirmIntent, Delegate, or Close',
// 'fulfillmentState': 'Fulfilled or Failed',
// 'message': {
// 'contentType': 'PlainText or SSML',
// 'content': 'message to convey to the user'
// },
// 'intentName': 'intent-name',
// 'slots': {
// 'slot-name': 'value',
// 'slot-name': 'value',
// 'slot-name': 'value'
// },
// 'slotToElicit' : 'slot-name',
// 'responseCard': {
// 'version': integer-value,
// 'contentType': 'application/vnd.amazonaws.card.generic',
// 'genericAttachments': [
// {
// 'title':'card-title',
// 'subTitle':'card-sub-title',
// 'imageUrl':'URL of the image to be shown',
// 'attachmentLinkUrl':'URL of the attachment to be associated with the card',
// 'buttons':[
// {
// 'text':'button-text',
// 'value':'value sent to server on button click'
// }
// ]
// }
// ]
// }
// }
// }
// This is all that is required for a valid ElicitSlot response
vardummy={
'sessionAttributes': {},
'dialogAction': {
'type': 'ElicitSlot',
'intentName': 'ScheduleRequest',
'slots': {
'MusicGroup': 'null'
},
'slotToElicit': 'MusicGroup'
}
}
// Respond to Lex by passing a proper JSON response to callback
callback(null,dummy)
};
Aws lex free text slots

commented Apr 21, 2017

Aws Lex Api

Here ScheduleRequest is the intent this function is being called in, and MusicGroup is a slot of the type AMAZON.MusicalGroup

Aws Lex Free Text Slot

Aws Lex Tutorial

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Aws Lex Languages

Docker or a virtual machine software. Because we’ll be using Amazon products such as Lex and Lambda, an AWS account must be available. Both products are pay as you go, so a free tier will likely be more than enough. Since we’ll be using Amazon. Python AWS Lex Object (pylexo) to ease the pain in navigating AWS Lex lambda events and in constructing lambda response - wavycloud/pylexo. If you don’t have one, you can set one up here and click “Create a Free Account”. Once you have your account set up, we can set up the chatbot. On the AWS Management Console, search for “Lex” or click on the Services drop down menu on the top left of the page and you’ll find it under the “Machine Learning” category.