botframework

How to detect end of dialog in Botframework v4?

故事扮演 提交于 2020-06-01 07:49:30
问题 I'm trying to kick off a feedback dialog following the completion of any other dialog in the system. I found this answer which says to use onEndDialog , but that isn't a valid function in ActivityHandler, only onDialog . My "main dialog" is in bot.js extending ActivityHandler, which is why I am not extending ComponentDialog. Given how this is set up, is there any way to determine when a dialog has ended? I tried to check the dialog stack in onDialog , but it reads as no dialog for the welcome

Calling my .NET Core Teams Bot from Angular

空扰寡人 提交于 2020-06-01 07:47:47
问题 I have created a Teams bot in .NET Core from following the sample found here: https://github.com/microsoft/BotBuilder-Samples/tree/master/samples/csharp_dotnetcore/57.teams-conversation-bot This is working and is running locally with ngrok. I have a controller with a route of api/messages: [Route("api/messages")] [ApiController] public class BotController : ControllerBase { private readonly IBotFrameworkHttpAdapter Adapter; private readonly IBot Bot; public BotController

How to format adaptive cards like the old version of webchat

非 Y 不嫁゛ 提交于 2020-05-31 03:30:09
问题 The new version of the standard webchat channel ("gemini") stripped out all of the formatting. I was able to replicate most of the old interface via tweaks in the botframework-webchat implementation, but I cannot get the adaptive card formatting to match. With the general formatting I was able to get it close, and the adaptiveCardHostConfig tweaks shown here on Github got a bit closer, but I still can't figure out how to replicate it. Specifically, the chat bubble (which is gray in my

Proactive Waterfall Dialog don't continue in Microsoft Bot

大兔子大兔子 提交于 2020-05-30 08:43:07
问题 There. I am trying to implement Proactive Waterfall dialog to start dialog from external service. I have implemented CompoenentDialog called SimpleDialogWithCardAndActions , configured it in IBot and now I can start this dialog manually and continue dialog after clicking buttons. It works fine as expected. Then I have created Controller's action method which is starts proactive dialog private async Task BotCallback(ITurnContext turnContext, CancellationToken cancellationToken) { var

Proactive Waterfall Dialog don't continue in Microsoft Bot

我与影子孤独终老i 提交于 2020-05-30 08:42:07
问题 There. I am trying to implement Proactive Waterfall dialog to start dialog from external service. I have implemented CompoenentDialog called SimpleDialogWithCardAndActions , configured it in IBot and now I can start this dialog manually and continue dialog after clicking buttons. It works fine as expected. Then I have created Controller's action method which is starts proactive dialog private async Task BotCallback(ITurnContext turnContext, CancellationToken cancellationToken) { var

try to resize the stream image with sharp Node.js

泪湿孤枕 提交于 2020-05-29 07:20:30
问题 I am trying to resize the width and height of input Stream-image from the user to the server with sharp function but nothing happens with the image. It keeps on his original size, How should I use the sharp function so that I can get the image smaller or bigger? Please help me This is how my code looks like: 'use strict'; const builder = require('botbuilder'); const restify = require('restify'); const utils = require('./utils.js'); const request = require('request'); const sharp = require(

Disable button once clicked MS bot framework

一世执手 提交于 2020-05-29 07:06:00
问题 I am creating chatbot application using MS bot framework. In that, I want to disable both buttons once Yes or No is clicked. 回答1: Sorry but the webchat (and other channels) does not support what you want to do, even if it would be useful for many cases. There is a sort of workaround if you really need to have buttons that cannot be used: use SuggestedActions (see doc here), it will look like the following: Once clicked the buttons disappear. 回答2: If you are using facebook messenger you can

Bot Framework V4 - TypeError: Cannot perform 'get' on a proxy that has been revoked

一曲冷凌霜 提交于 2020-05-29 05:53:18
问题 I am trying to make a rest query against a database that stores knowledge articles for users and returns an array of results based on what the user has searched for. Whenever I try to search I get: "TypeError: Cannot perform 'get' on a proxy that has been revoked" I have tried adding it to async as shown but I still keep getting the same error. Any idea what I am doing wrong? const Response = async (turnContext) => { if (turnContext.activity.value.choice === 'feedbackProvider') { try { const

Bot Framework V4 - TypeError: Cannot perform 'get' on a proxy that has been revoked

孤人 提交于 2020-05-29 05:53:01
问题 I am trying to make a rest query against a database that stores knowledge articles for users and returns an array of results based on what the user has searched for. Whenever I try to search I get: "TypeError: Cannot perform 'get' on a proxy that has been revoked" I have tried adding it to async as shown but I still keep getting the same error. Any idea what I am doing wrong? const Response = async (turnContext) => { if (turnContext.activity.value.choice === 'feedbackProvider') { try { const

How get user email from MS Teams with a Bot using SDK4?

本秂侑毒 提交于 2020-05-17 06:34:38
问题 We have used C# and Bot Framework SDK4 for developing bot application and we have deployed the same on MS-Teams channel so for Authorization purposes, we required emailid of the MSTeams logged in user, so initially, we have faced some problems for getting emailid from the Activity object. but after doing some analysis we are getting email id from the BotFrameworkAdapter class in ms-bot v4 using C# 回答1: Private async Task GetUserProfile(TurnContext context,CancellationToken cancellationToken)