How to hook Luis into a Bot Framework FormDialog

自古美人都是妖i 提交于 2019-12-04 19:57:34

问题


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?


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/36438545/how-to-hook-luis-into-a-bot-framework-formdialog

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!