Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hook Luis into a Bot Framework FormDialog

I have a Dialog class which is a FormDialog (say, FormDialog< SandwichOrder>; one which builds an order for a sandwich, as per the bot framework documentation website). The SandwichOrder includes a "Price" property.

I also have a Dialog class which derives from LuisDialog which gets the price (based on, say, the size and/or province).

How can I hook Luis functionality into a Form Dialog?

like image 445
Andy Thomas Avatar asked Apr 05 '16 22:04

Andy Thomas


1 Answers

Currently it is not possible to call a Dialog in a form field step. But you can have your custom implementation of IRecognize for a Field in the form (in this case "Price") and in the IEnumerable<TermMatch> Matches(string input, object defaultValue = null) implementation call into your Luis model and return all the possible TermMatches based on the detected entities by Luis.

like image 195
Shahin Shayandeh Avatar answered Sep 28 '22 02:09

Shahin Shayandeh