botframework

Cannot post activity. Unauthorize. Bot emulator error

独自空忆成欢 提交于 2020-01-04 05:52:20
问题 I have added these line of codes to my bot's Startup.cs in order for it to work in Azure's WebChat: var appid = Configuration.GetSection("microsoftappid").Value; var apppassword = Configuration.GetSection("microsoftapppassword").Value; options.CredentialProvider = new SimpleCredentialProvider(appid, apppassword); However, when I have these lines my bot does not work in Bot emulator. How can I integrate it with my bot so that I don't need to comment/uncomment the line of codes when publishing

Cannot post activity. Unauthorize. Bot emulator error

五迷三道 提交于 2020-01-04 05:52:06
问题 I have added these line of codes to my bot's Startup.cs in order for it to work in Azure's WebChat: var appid = Configuration.GetSection("microsoftappid").Value; var apppassword = Configuration.GetSection("microsoftapppassword").Value; options.CredentialProvider = new SimpleCredentialProvider(appid, apppassword); However, when I have these lines my bot does not work in Bot emulator. How can I integrate it with my bot so that I don't need to comment/uncomment the line of codes when publishing

Microsoft.Bot.Builder.CognitiveServices.QnAMaker.QnAMakerDialog How to override not found?

六眼飞鱼酱① 提交于 2020-01-04 05:50:10
问题 I'm working with QnAMakerDialog and cannot figure out how to override the "not found". I am able to override RespondFromQnAMakerResultAsync but that is not called when no answer is found. I tried setting the default message to null or empty string but then QnAMakerDialog automatically response "No match found!" when it doesn't find a match! I don't want a message when no match is found because I'm just forwarding the message to a LuisDialog . How do I stop this message!!! Side note: I

Can Bot Framework handle Facebook Audio Message

不羁岁月 提交于 2020-01-04 05:46:30
问题 How can my bot (Bot Framework Microsoft) handle an audio message from facebook. How it's received in the Post Message in MessagesController? So I can call the SpeechToText API? Does the data go all the way to 回答1: Your Post controller takes an Activity as an argument. The Audio message will show up in the Attachment array as a link to the audio location provided by Facebook. You can pass that to the Bing Speech API. One thing to note that the ContentType provided by Facebook is "video/mp4"

How to jump from one intent to another in LuisActionDialog passing context

删除回忆录丶 提交于 2020-01-04 05:38:46
问题 I'm developing a bot with Microsoft Bot Framework, LUIS and LUISActionBinding. In my LUIS app I have 3 main intents: BuyX , FindA and FindB . The main goal of the bot is to help users to buy X, but they might want to first search for A or B with some filters first, or just go directly to buy X. I set up the Actions for each intent with the required and optional fields, everything works great and I'm able to receive objects returned by the actions my intent handlers. In the FindA handler I

hero card image attachment not loading

谁说我不能喝 提交于 2020-01-04 05:34:13
问题 I am using the code private static Attachment HeroCard() { var hc = new HeroCard { Images=new List<CardImage> { new CardImage(@"C:\Users\.....\imgs\testImage.jpg") } }; return hc.ToAttachment(); } To load an image in a hero card's attachment. This works fine but if I try to use the local folder instead e.x @"~\imgs\testImage.jpg" The image fails to load. I have tried different other formats regarding the path with no success. What am I missing? 回答1: try to use the local folder @"~\imgs

Microsoft signing keys don't have endorsements

我是研究僧i 提交于 2020-01-04 05:27:31
问题 I was implementing authentication feature for Microsoft Bot as described here . When observing the keys by exploring at https://login.botframework.com/v1/.well-known/keys, found some keys don't have endorsements with them. Sample key ID: QMrt9-4Jn43rldid1E-hByyRC_Q As per the document link provided above, we should reject any request which does not matches with the endorsements for the key, the token was signed with. Can you please suggest with how to proceed next, as some of the valid

Microsoft Cognitive Services Emotion API. Error: 'Image size is too small or too big.'

こ雲淡風輕ζ 提交于 2020-01-04 02:04:12
问题 I have noticed a rather strange error with the Emotion API from the Cognitive Services suite. Everything works just fine as long as I send it URL's. When sending it image attachments. I receive this JSON error: { error: { code: 'InvalidImageSize', message: 'Image size is too small or too big.' } } Sending it smaller or larger versions does not help. Send a URL of the same image, and suddenly it works fine again. I stream the attachment to the API service in the exact same way I do for another

How to use ITranscriptLogger and TranscriptLoggerMiddleware to store chat transcript in cosmos DB

时光毁灭记忆、已成空白 提交于 2020-01-04 01:50:20
问题 I want to store the entire chat history in cosmos DB using ITranscriptLogger and TranscriptMiddelWare, but I am struggling to do so. I have read this MS article, but I want to store it in Cosmos DB and not Blob storage. Also I am trying to instantiate the transcript log in Startup.cs not in Bot.cs, and I have tried to implement it according to this answer without any luck. That is, the transcript is not stored and there's no container in my Azure cosmos DB. I appreciate any help and feedback.

Pass custom debug information to Microsoft bot framework emulator

佐手、 提交于 2020-01-03 20:58:45
问题 I am developing a bot based on a .NET Bot Builder SDK. Is it possible for a bot to pass some debug information together with the message, so I can see it in the Details section of the Bot Framework Chanel Emulator when the message is clicked? 回答1: Great Question. Yes, it is entirely possible. You can use the ChannelData property of your activity you are responding with. The data entered into the ChannelData property must be valid JSON For example: var reply = activity.CreateReply("test");