Call LUIS from FormFlow in C#

前端 未结 2 463
忘了有多久
忘了有多久 2021-01-01 08:00

I am using the Microsoft bot framework to create a bot for questioning the user and then understanding the answer. The user is questioned using the FormFlow API in bot frame

2条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-01 08:56

    In this situation, it may be best to call a luis intent outside of formflow. The functionality you are looking for does not exactly exist. You could call a "Name" intent then call you form like this:

    [LuisIntent("Name")]
    public async Task Name(IDialogContext context, LuisResult result)
    {
        //save result in variable
        var name = result.query
        //call your form
        var pizzaForm = new FormDialog(new PizzaOrder(), this.MakePizzaForm, FormOptions.PromptInStart, entities);
        context.Call(pizzaForm, PizzaFormComplete);
        context.Wait(this.MessageReceived);
    }
    

提交回复
热议问题