luis

Botframework No Interruptions from other Intent Dialogs until done with current Intent Dialog

给你一囗甜甜゛ 提交于 2019-11-30 17:13:01
问题 I've intent A and B using LUIS.ai. In intent A I'm using builder.Prompts.text to ask user couple questions. However, sometimes depending on the answer it would switched to intent B. I'm guessing it happens to match with my intent B even though I think it shouldn't. Is there a way to prevent this from happening? If I'm going through intent A's dialogs, I don't want any interruptions from other intents until I'm done. Here is an example of my code. bot.dialog('A', [ function (session, args,

How to get Activity Info from an IDialogContext

徘徊边缘 提交于 2019-11-30 13:22:01
I'm using a LuisDialog and all I get the the callback returns is an IDialogContext and the LuisResult. Is there a way I can get info from the original Activity, like channel, from name, et al? Since the v3.2.0 release you can access the original incoming message from the intent handlers. Check here to understand how your intent handler should looks like. public async Task MyHandler(IDialogContext context, IAwaitable<IMessageActivity> activity, LuisResult result) Alternatively, you can use context.MakeMessage but I would recommend updating your intent handlers. 来源: https://stackoverflow.com

Call LUIS from FormFlow in C#

浪尽此生 提交于 2019-11-30 10:32:55
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 framework and answers are retrieved. Here is the code for the formflow: public enum Genders { none, Male, Female, Other}; [Serializable] public class RegisterPatientForm { [Prompt("What is the patient`s name?")] public string person_name; [Prompt("What is the patients gender? {||}")] public Genders gender; [Prompt("What is the patients phone number?")] [Pattern(@"(<Undefined control sequence>\d)?\s*\d{3}(-|\s*)\d{4}")] public

Dispatch CLI not passing Entities from Luis App

删除回忆录丶 提交于 2019-11-29 17:33:01
When generating a Dispatch model using the CLI, it doesn't pass the Entities from the Luis app in reference. This drastically affects the accuracy of the dispatch app. For example, for the utterance "My [iPhone] isn't working", iPhone is attached to an entity list name CellPhoneType. There are three items in the list iPhone, Samsung, Smartphone. In the bot emulator, using the Dispatch, if I write "my iPhone isn't working", the dispatch model passes it to Luis, as it should. However, if I write "my smartphone isn't working", the dispatch tool sends it over to QnA Maker. I checked the model, and

How to handle Luis intent with parameters with prompt

巧了我就是萌 提交于 2019-11-29 17:04:45
I have an intent in LUIS with several required parameters. I also set prompt for these parameters so that when they are not detected, LUIS asks for them. However in the BOT, I always get them as null when they are not specified. The bot is not asking for the lacking parameters (even if the Prompts are set in Luis). Why? Is there a way to get the prompts automatically? Or is that still not supported in MS Bot Framework? I'm using C# Based on your comment it seems you are using an older version of the Nuget package. Make sure to update to the latest BotBuilder version. Current version is v3.5 .

Microsoft Bot Framework: Exception: The data is changed

淺唱寂寞╮ 提交于 2019-11-29 16:14:19
I have a bot with the following conversation scenario: Send text to LUIS LUIS intent calls context.Call(...) to launch a Dialog This dialog terminates, save some info in the userData: private static async Task storeBotData(IDialogContext context, BotData userData) { Activity activity = (Activity)context.Activity; StateClient sc = activity.GetStateClient(); await sc.BotState.SetUserDataAsync(activity.ChannelId, activity.From.Id, userData); } And after it call another dialog, again with context.Call(...) . Then the last dialog runs and terminates. My problem is that when updating the user data

Call LUIS from FormFlow in C#

北城余情 提交于 2019-11-29 15:47:11
问题 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 framework and answers are retrieved. Here is the code for the formflow: public enum Genders { none, Male, Female, Other}; [Serializable] public class RegisterPatientForm { [Prompt("What is the patient`s name?")] public string person_name; [Prompt("What is the patients gender? {||}")] public Genders gender; [Prompt("What is the

How to avoid “Sorry, my bot code is having an issue” in Microsoft Bot Framework

梦想的初衷 提交于 2019-11-28 23:10:33
I have a bot that runs on Azure + Bot Framework + LUIS (via LuisDialog). If the user happens to send two messages in a quick succession (before the bot has a chance to answer), they see this error message on their Facebook Messenger or web embed: Sorry, my bot code is having an issue. When debugging through bot channel emulator, I see that the error is this: "text": "Error: Response status code does not indicate success: 429 (Too Many Requests). at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter

LUIS conflict with Messenger's Location quick reply

一曲冷凌霜 提交于 2019-11-28 10:44:06
问题 How can I fix this LUIS producing an error when receiving a location from a user. Right now I am putting the messenger quick reply in a attachment-prompt. Is the result from the user location an attachment? What is it? Because otherwise my attachment-prompt will do re-prompt loop. Messenger location quick reply: Result: This is the exception: System.ArgumentNullException: Value cannot be null. Parameter name: utterance at Microsoft.Bot.Builder.AI.Luis.LuisRecognizer.d*23.MoveNext() --- End of

LUIS : An item with the same key has already been added

余生长醉 提交于 2019-11-28 05:49:16
问题 I am building bot with LUIS. Before 2 hours everything was ok. My last publish on azure is from yesterday. When i train and update my published application and then write a test query i am getting : An item with the same key has already been added. Some help ? 回答1: It seems that starting today, the endpoints will be changing. Try updating your LUIS endpoint hostname from api.projectoxford.ai to westus.api.cognitive.microsoft.com . See the image below for the notice and more instructions. More