botframework

c# Bot Framework client and Server timezone difference

不想你离开。 提交于 2019-12-13 03:29:00
问题 I create a chatbot using MS bot framework where initially i will send a welcome message like "Good morning UserName" but my bot is hosted in azure and i user DateTime.Now to find the time of the day and provide the greeting message accordingly. But if some user from different timezone uses "Good morning " and "Good afternoon" messages are not appropriate. How can i overcome this? if (DateTime.Now.Hour < 12) { await context.PostAsync("Good Morning"); } else if (DateTime.Now.Hour > 12 and

Is it possible to implement a simple counter on a adaptive card? like every time a submit button is click, the value int the text block increases

五迷三道 提交于 2019-12-13 03:25:28
问题 I was checking out the customizing the cards, so i was thinking if i can use a submit button and every time i click the submit button. the integer value in the text box automatically increases without keep sending the new card every time Like a simple counter. Like the counter in this link: https://studio.code.org/projects/applab/WH602L7gOqzNtImoHqBrBL00KU5h78yqnXQg-eG2LBg but in adaptive card in a webchat. 回答1: The only way to achieve this is by updating the card, after every button click..

Unable to capture Adaptive Card events triggered in angular js 1.x directive

ぃ、小莉子 提交于 2019-12-13 03:12:45
问题 I am unable to capture the onExecuteAction emitted by the Adaptive Card. Can you please provide any pointers on the missing piece here.Also I am facing similar issue in binding,trigger and capturing events from the Adaptive Cards like showing/collapsing elements(triggered by Action.Showcard elements). Any pointers/guidence is appreciated.Thanks in advance.Attaching the plnkr code. https://plnkr.co/edit/2YB2zV3FL4JZgJ2yC4FG ` return { restrict: 'AE', replace: true, scope:false, template:

Retrieve data from input form adaptive card

回眸只為那壹抹淺笑 提交于 2019-12-13 02:58:48
问题 I'm using an input form as an adaptive card in my bot framework. Now i want to retrieve the data that the user gave in the form and show it on the screen after the user click the submit button. Can someone give me an example of the code, because i can't seem to get it work? I'm using next adaptive card: http://adaptivecards.io/samples/InputForm.html { "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "type": "AdaptiveCard", "version": "1.0", "body": [ { "type": "ColumnSet",

Microsoft Azure Bot Framework SDK 4: Send proactive message to specific users from bot using Node js

拈花ヽ惹草 提交于 2019-12-13 02:58:18
问题 I am able to send message to specific users with older botbuilder SDK 3.13.1 by saving message.address field in database. var connector = new builder.ChatConnector({ appId: process.env.MicrosoftAppId, appPassword: process.env.MicrosoftAppPassword, openIdMetadata: process.env.BotOpenIdMetadata }); var bot = new builder.UniversalBot(connector); var builder = require('botbuilder'); var msg = new builder.Message().address(msgAddress); msg.text('Hello, this is a notification'); bot.send(msg); How

How to Pass token(data) in react-Nodejs web application (from nodejs file to react tsx file)

独自空忆成欢 提交于 2019-12-13 02:55:24
问题 I am testing a bot framework code using nodeJS and reactjs web application, the code works as expected however since the bearer token is in reactjs it is visible in the debugger tools from the browser, so i am planning to have the rest call to get the token in the server.js file in the nodejs side. Currently the token generation happens on the reactjs side as shown in the code below. This is the link to the application build up declare var require: any var React = require('react'); var

Is it possible to use html tags on Microsoft QnA Maker replies?

試著忘記壹切 提交于 2019-12-13 02:54:52
问题 It is possible to use html tags on Microsoft QnAMaker replies? I already try to create new line with \n\n but it is not working on webchat or skype. Moreover, how can I create bullets or numbering on QnA Maker? 回答1: Currently Microsoft QnAMaker service send the HTML tags added in answer as escaped HTML. A code like the following <b> bold text </b> will be sent as escaped HTML like given below <b> bold text </b> I faced the same issue when we trained QNAMaker answers with HTML formatting and

Get URL Referer and Origin header from Microsoft Bot Framework

谁说胖子不能爱 提交于 2019-12-13 02:52:00
问题 I am using a directline inside my website, I was wondering if there is anyway to tell the URL of the website from the Request header Referrer and Origin, I want to get the value inside a Dialog, I have tried using Activity.ServiceUrl but it is giving directline.botframework.com and the HttpContext.Current.Request.Url.AbsoluteUri is giving the Azure URL. public Task StartAsync(IDialogContext context) { context.Wait(MessageReceivedAsync); return Task.CompletedTask; } private async Task

Retrieve multiple questions matching the search keyword in QnA Maker

谁都会走 提交于 2019-12-13 02:47:22
问题 I have a bot which uses LUIS and QnA Maker. Now, I am able to send queries and get back response in my bot based on the search keyword. But in case my search keyword is used in multiple questions, QnA Maker just retrieves the first matching QnA pair. Consider below QnA pair: What is flexible working? Flexibility to work from home How to avail flexible working? Get in touch with manager If the user types the exact question and hits enter, the response would be the answer which matches the

When Bot is hosted on Azure, I'm unable to retrieve values from Adaptive card in waterfall dialog inside validator method

Deadly 提交于 2019-12-13 02:43:07
问题 I'm using Adaptive card version 1.2 and Bot Builder dialog version is 4.5.1 in my Bot. Currently I'm calling adaptive card inside waterfall dialog using TextPrompt . I have written a validator method to validate values returned from the card. This works fine in Bot Emulator. But when I host it on Azure I'm Getting error. In the validator method, Adaptive card values are captured in promptContext.Recognized.Value . But it returns null when hosted on Azure which results in Object reference not