简体   繁体   English

Bot Framework LuisDialog混合对话框

[英]Bot Framework LuisDialog mixing Dialogs

I am trying to build a luis ai bot using Microsoft bot framework. 我正在尝试使用Microsoft bot框架构建luis ai bot。 is it possible to get user in put with in an intent? 是否可以使用户有意图?

ex: 例如:

    internal static IDialog<Order> MakeRootDialog()
    {
        return Chain.From(() => FormDialog.FromForm(Order.BuildForm));
    }

    [LuisIntent("SWO")]
    public async Task StartWo(IDialogContext context, LuisResult result)
    {
        if (no == 0)
        {
            Message message = new Message();
            await Conversation.SendAsync(message, MakeRootDialog );
        }
        else
        {
            string message = "starting work ";
            await context.PostAsync(message);
            context.Wait(MessageReceived);
        }
    }

Hi if you required the user's whole question/query to the intent, then you will get in from the LuisResult class. 嗨,如果您需要用户的整个问题/查询来实现意图,那么您将从LuisResult类中获得LuisResult

ex: [LuisIntent("SWO")] public async Task StartWo(IDialogContext context, LuisResult result) { string userText = result.Query; } 例如: [LuisIntent("SWO")] public async Task StartWo(IDialogContext context, LuisResult result) { string userText = result.Query; } [LuisIntent("SWO")] public async Task StartWo(IDialogContext context, LuisResult result) { string userText = result.Query; }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM