i'm new with luis and bot framework. what i learned until now is how to trigger a dialog by an intent recognized by luis. but i don't know how to send a message to luis inside a dialog. i want to use the 'builder.EntityRecognizer.findEntity' method. i'm pretty sure that my builder.prompts.text just gives me the pure text as a result, not the intents and entities of this text recognized by LUIS. but i can't find a solution how i can send a single request to luis, to get back a luis-json object which i think is needed for the 'findEntity' method.
bot.dialog('reklamation',[
function(session){
session.send('Gerne kümmere ich mich um Ihre Reklamation.');
builder.Prompts.text(session, 'Bitte nennen Sie mir Ihr Anliegen.');
},
function(session, results){
session.dialogData.reklamation = results.response;
session.send('Ich habe Ihre Mitteilung aufgenommen.');
builder.Prompts.text(session, 'Bitte geben Sie mir eine E-Mail-Adresse, unter der wir Ihnen den aktuellen Stand Ihrer Reklamation mitteilen können.');
},
function(session, results){
var email = builder.EntityRecognizer.findEntity(results.entities, 'email');
session.dialogData.email = email;
session.send('Ok! Ich habe folgende Informationen gespeichert:');
session.send('Reklamationsgrund: ' + session.dialogData.reklamation);
session.send('E-Mail: ' + session.dialogData.email);
session.endDialog('Wir werden uns schnellstmöglich mit Ihnen in Verbindung setzen. Vielen Dank für Ihre Anfrage!');
}]).triggerAction({
matches: 'reklamation'});
I appreciate any suggestion.