I have created a Chat bot in AWS LEX and want to integrate it with Skype. Is there any way I can achieve that?
I have already implemented it with Facebook, Slack, and Twillo.
I have created a Chat bot in AWS LEX and want to integrate it with Skype. Is there any way I can achieve that?
I have already implemented it with Facebook, Slack, and Twillo.
I'm trying using LexRuntime, Microsoft Bot Framework and AWS SDK for Javascript to implement Amazon Lex over skype for business in Node.js.
You can define as:
var AWS = require('aws-sdk');
AWS.config.region = 'us-east-1';
var lexruntime = new AWS.LexRuntime({ apiVersion: '2016-11-28' });
var bot = new builder.UniversalBot(connector, function (session) {
console.log(session.userData);
var params = {
botAlias: '$LATEST', /* required */
botName: 'YourBotName', /* required */
contentType: 'text/plain; charset=utf-8', /* required */
inputStream: session.message.text,//new Buffer('...') || 'STRING_VALUE' || streamObject, /* required */
userId: 'username', /* required */
accept: 'text/plain; charset=utf-8',
sessionAttributes: session.userData /* This value will be JSON encoded on your behalf with JSON.stringify() */
};
console.log(params);
lexruntime.postContent(params, function (err, data) {
if (err) console.log(err, err.stack); // an error occurred
else {
session.userData = data.sessionAttributes;
console.log(data); // successful response
session.send("%s", data.message);
}
});
});
I tested this on emulator provided by Microsoft and getting the response from my Lex Bot.
You can refer PostContent for params content.
There is currently no native support for AWS Lex to integrate with Skype.
However, you can create a middleware that will use a Skype chat bot and forward requests on to AWS Lex. There are a number of different ways to do this so I won't provide any specifics.
Alternatively, Microsoft is also pitching a chatbot framework that is leveraging Cortana.