microsoft / botframework-sdk

Bot Framework provides the most comprehensive experience for building conversation applications.
MIT License
7.48k stars 2.44k forks source link

Get intention that was consulted in LUIS #4411

Closed odirleiborgert closed 6 years ago

odirleiborgert commented 6 years ago

Bot Info

Issue Description

Every time I have an appointment for LUIS I want to pick up the intention and do some kind of treatment. My question is where I do it. The treatment I want to do is to send this to my private API.

fanidamj-zz commented 6 years ago

If I understand your question correctly, you can use Middleware for treating intents. If not can you please brief the question again. Hope this helps!!

odirleiborgert commented 6 years ago

HI @fanidamj , thanks for the feedback

I would like that after the intent is returned from LUIS I could get this value and send it to my API, however I did not find this property using the middleware.

What I want to get value this IntentDialog.matches()

odirleiborgert commented 6 years ago

Resolved with:

bot.dialog('sms', (session, args, next) => {
       if (args && args.intent) {
             console.log(args.intent);
       }
});