8

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?

Matt Evans
  • 7,113
  • 7
  • 32
  • 64
Andy Thomas
  • 1,367
  • 2
  • 14
  • 30

2 Answers2

3

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.

  • do you know if this functionality is being built in at all? It does seem a bit clunky to create our own custom fields simply for the purpose of jumping out to check a LuisIntent as well. – JPThorne Apr 26 '16 at 09:51
  • It is definitely in the backlog. I suggest add this as an idea to the [bot builder feedback](https://feedback.botframework.com/forums/354222-bot-builder-sdk) site, so other people can vote for it. – Shahin Shayandeh May 12 '16 at 17:51
  • Would love to submit it as an idea (think I may have already done so) But I since noticed that https://feedback.botframework.com/ is 'retired'. Any idea where it moved to? – JPThorne Sep 05 '16 at 06:22
1

This post: Custom fields with FormBuilder in the Microsoft Bot Framework appears to suggest an answer, and a way to implement your own custom field which implements IRecognizer. I haven't gotten it to work yet though.

Community
  • 1
  • 1
JPThorne
  • 610
  • 11
  • 17