botframework

How to store bot state in Redis cache

主宰稳场 提交于 2019-12-24 03:05:30
问题 Though there are some articles describing how to store bot state in redis cache, is that the recommended approach ? https://ankitbko.github.io/2016/10/Microsoft-Bot-Framework-Use-Redis-to-store-conversation-state/ I tried using Dependency injection and used Redis cache. Though the application does not throw any error, I don't see any key and value stored in Redis cache using my Redis desktop manager? 回答1: You will probably have an easier time with either CosmosDB or Table Storage, the two

Issues authenticating OAuth with Azure bot Service

南笙酒味 提交于 2019-12-24 01:15:56
问题 I recently wrote a c# bot using botframework (v4) that connects to users' account through oAuth (aadv2). I followed this article for the azure setup. For most users, it's working perfectly fine but a small part of them can't get the magic code. Instead they got a 404 after login in AD portal) Here's the result of a curl against the auth url : curl https://token.botframework.com/api/oauth/signin?signin=921d46120f2743bfe0e82b4c859898cda9bec041f8 -v -L < Location: https://token.botframework.com/

Start conversation with a PromptDialog in MS BotFramework

南笙酒味 提交于 2019-12-24 01:06:06
问题 Is there a proper way for bot to start a conversation with PromptDialog.Choice in the Direct Line channel? I am trying an ugly hack with catching the fist ConversationUpdate activity and creating a fake message from user to initialize the dialog like this: IMessageActivity greetingMessage = Activity.CreateMessageActivity(); greetingMessage.From = message.Recipient;//from bot greetingMessage.Recipient = userAccount;//to user greetingMessage.Conversation = message.Conversation; greetingMessage

Bot is remote but callback URL is localhost

不羁岁月 提交于 2019-12-24 00:54:28
问题 I want to debug my azure bot with botframework emulator. Whenever I try to connect, the emulator tells me the bot is remote but the callback URL is localhost. How can I change this? It also complains about my ngrok settings, but I am fairly sure that everything's allright about them, because I downloaded ngrok and pasted the correct path to the .exe in the settings. How can I fix this problem? Note that I finally get an internal server error. My Settings in the bot Framework page (as

Resource Not Found While fetching contacts from MS Graph API

半腔热情 提交于 2019-12-24 00:24:27
问题 I tried below github sample for Azure AD Authentication and successfully getting access token with proper call back URL. https://github.com/Microsoft/BotBuilder-Samples/tree/master/samples/csharp_dotnetcore/18.bot-authentication Modified and Configured Web.config Keys as per my application created in https://apps.dev.microsoft.com <add key="ActiveDirectory.Mode" value="v1" /> <add key="ActiveDirectory.ResourceId" value="https://graph.microsoft.com" /> <add key="ActiveDirectory.EndpointUrl"

Problems mapping in LUIS entities into form flow

浪尽此生 提交于 2019-12-23 22:24:21
问题 I have problems when i try mapped the entities from LUIS. First, through a method, I complete the entities from LUIS, but, the bot ask me again about the entities that are already stuffed. var state = new BookMeetingRoomForm(); var entities = new List<EntityRecommendation>(result.Entities); if (entities.Count > 0) { FillEntityNewBookFromLuis(result, out state); entities = null; } var formDialog = new FormDialog<BookMeetingRoomForm>( state, BookMeetingRoomForm.BuildForm, FormOptions

Properly format a message for slack in bot framework

我的未来我决定 提交于 2019-12-23 19:23:19
问题 I'd like to send a message with buttons to the slack channel. I'm using the bot framework (c#). I want to use the "blocks" (attachments are deprecated according to the slack api docs). So I composed a sample message in the slack "Bot Kit Builder": The json for it looks like this: [ { "type": "section", "text": { "type": "mrkdwn", "text": "Which pill do you want to take?" } }, { "type": "actions", "elements": [ { "type": "button", "text": { "type": "plain_text", "text": "Red", "emoji": true },

Bing Location Control for Microsoft Bot Framework: Typing address in Facebook messenger does not work

巧了我就是萌 提交于 2019-12-23 18:44:52
问题 I am building bot with Microsoft Framework bot Sdk for C#. I have connected bot to Facebook Channel. I have implemented built in location dialog picker as FB Messenger's location picker GUI dialog as following: var apiKey = WebConfigurationManager.AppSettings["BingMapsApiKey"]; var prompt = "Where should I ship your order? Type or say an address."; var locationDialog = new LocationDialog(apiKey, message.ChannelId, prompt, LocationOptions.UseNativeControl | LocationOptions.ReverseGeocode);

PromptDialog.Choice does not show choices

邮差的信 提交于 2019-12-23 18:42:21
问题 I'm looking for how we can show choices to user with IDialog<object> and PromtDialog.Choice method. But the thing is below code sample doesn't show the choices. Very difficult to find code sample. Looking for a help. Thank you. List<string> BotOptions = new List<string>(); BotOptions.Add("Find a Program"); BotOptions.Add("Find an Event"); PromptDialog.Choice(context, ChoiceSelectAsync,BotOptions, "I didn't understand you. I'm cable to help you with", "Didn't get that", 1, PromptStyle.None);

Botframework v4: How to simplify this waterfall dialog?

匆匆过客 提交于 2019-12-23 17:43:14
问题 I have this code but but i think its over-complicated and can be simplified. Also is there a way to go back to a spefici waterfall step if ever the user type "back" without restarting the whole dialog? I am new to this and it's hard to find a guide or online course on botframework v4 since it is new. Any help would be appreciated thanks! public GetNameAndAgeDialog(string dialogId, IEnumerable<WaterfallStep> steps = null) : base(dialogId, steps) { var name = ""; var age = ""; AddStep(async