botframework

Multiple Conversations For Direct Line Client

做~自己de王妃 提交于 2020-06-29 06:30:52
问题 I'm trying to use the Microsoft.Bot.Connector.DirectLine .NET client to connect to my Direct Line Channel. My client application will have many conversations open at once (like 1000+). What I'm trying to do is efficiently create a single Direct Line client object which can receive messages for all my conversations and NOT have a single client per conversation. This below code is from: https://docs.microsoft.com/en-us/azure/bot-service/bot-service-channel-directline-extension-net-client?view

Can we connect Microsoft Azure Bot to Azure SQL Database and read data from the DB and use it as a reply for the Bot?

落爺英雄遲暮 提交于 2020-06-28 05:43:49
问题 I am working on a ChatBot project, which requires to query from a table in SQL database hosted in Azure and use the result as a reply for the bot. I am using a basic bot template from Azure Web App Bot. Independently without connecting to the database, the Bot is working fine. And there is no issues with the database, I was able to query from the same DB using EF DB first approach in a MVC webapp. But in the project, if I use the same approach, I am getting an error: connect ECONNREFUSED And

How to construct a QnA Maker Instance Class in C# - CoreBot?

断了今生、忘了曾经 提交于 2020-06-27 16:19:36
问题 I got a System.AggregateException after running my Core Bot C# sample. In the Startup.cs I added the class as followes: services.AddSingleton<ChitChatRecognizer>(); The Recognizer Class looks like: using System.Net.Http; using System.Threading; using System.Threading.Tasks; using Microsoft.Bot.Builder; using Microsoft.Bot.Builder.AI.QnA; using Microsoft.Bot.Schema; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; namespace CoreBot { public class ChitChatRecognizer

Sending proactive messages to a channel in Teams

好久不见. 提交于 2020-06-24 14:45:30
问题 So, I searched far and wide, read everything I could find on the topic and I am still failing at this. I have managed to send proactive message to user, reply to a topic in team, etc. but I am unable to send a proactive message (create new post) in a team channel. Is there an available example (I was unable to find any)? MS Docs for NodeJS seem to show an example of messaging each user in the team, but not the channel itself. I explored the source code, and channelData is hardcoded to null

Sending proactive messages to a channel in Teams

余生颓废 提交于 2020-06-24 14:43:30
问题 So, I searched far and wide, read everything I could find on the topic and I am still failing at this. I have managed to send proactive message to user, reply to a topic in team, etc. but I am unable to send a proactive message (create new post) in a team channel. Is there an available example (I was unable to find any)? MS Docs for NodeJS seem to show an example of messaging each user in the team, but not the channel itself. I explored the source code, and channelData is hardcoded to null

Bot framework (v4) - How to get state from custom prompt validation

我的未来我决定 提交于 2020-06-18 02:16:13
问题 I'm implementing a custom prompt validation where I need to access my state to compare with the user's input. I did a lot of search and microsoft documentation and some samples too but I couldn't figure out how to do that. The problem is that to be able to get the state you need to pass StatePropertyAccessor as a parameter as you would normally do with dialogs but when you extend a Prompt you can't do the same. How can I get my state on this code ? Please, see the comment on onRecognize().

Bot framework (v4) - How to get state from custom prompt validation

拜拜、爱过 提交于 2020-06-18 02:14:57
问题 I'm implementing a custom prompt validation where I need to access my state to compare with the user's input. I did a lot of search and microsoft documentation and some samples too but I couldn't figure out how to do that. The problem is that to be able to get the state you need to pass StatePropertyAccessor as a parameter as you would normally do with dialogs but when you extend a Prompt you can't do the same. How can I get my state on this code ? Please, see the comment on onRecognize().

Save question when no answer is available for that question (new question) in QnA Maker Knowledge Base

主宰稳场 提交于 2020-06-17 15:06:31
问题 I am trying to save the new questions asked by the user to my QnA maker bot into an Azure database so that I can add the answers to those questions to my knowledge base. Currently, I am asking the users to write their question in a feedback form when they don't get a response from my bot. This is taking make time also the user is annoyed by writing. I want my bot to collect these questions and store it a database. So, please guide how to achieve this, any links or suggestions appreciated. 回答1

MS Enterprise Bot (v4) - how to exactly do a user mention programatically

回眸只為那壹抹淺笑 提交于 2020-06-17 14:55:12
问题 I'm really tired of microsoft incomplete documentation. I have been bangin my head for a few days just to create a user mention. Scanned the internet for bits of code and tried to combine, but i still havent made it work. var reply = turnContext.Activity.CreateReply($"Test mention <at>@{name}</at>"); var entity = new Entity(); entity.SetAs(new Mention() { Text = $"<at>@{name}</at>", Mentioned = new ChannelAccount() { Name = $"{name}", Id = id } }); if (turnContext.Activity.Entities == null ||

How to “merge” or “transform” JSON documents in Azure Cosmos DB

白昼怎懂夜的黑 提交于 2020-06-17 12:40:52
问题 I'm setting up a Chatbot with the Microsoft Bot Framework and Azure. I want to save my "UserState" in a database in order to easily analyze the user data. I managed to save my userState in form of JSON documents in Azure Cosmos DB. The problem is that each interaction with the bot creates a new "document" in a "collection" in Cosmos DB. How can I easily merge the data (data structure is consistent) and in the best case have the data in some kind of table? The tool I want to use for analyzing