botframework

Bot Framework Emulator - Taking longer than usual to connect

时光总嘲笑我的痴心妄想 提交于 2021-01-28 22:57:33
问题 I have this issue since yesterday. In the Welcome -Tab I click on Open Bot . Then I type http://localhost:3978/api/messages into Bot URL or .bot file location . Then I click on Connect . My problem is that I cannot send any messages. Also there is the warning Taking longer than usual to connect. This is the screen I'm looking at: The thing is that it worked 2 days ago. Yesterday I got the issue and I just hoped that it would work the next day (so today). But the issue still remains. How can I

How can I send a base64 encoded image?

爷,独闯天下 提交于 2021-01-28 19:31:15
问题 I would like to respond to a conversation by providing a barcode (.PNG) that has been base64 encoded. Is that possible? Or is the only method of delivery thru a Url. 回答1: Try: replyMessage.Attachments.Add(new Attachment() { ContentUrl = $"data:image/jpeg;base64,{Convert.ToBase64String(bdata)}" }); Or as JSON: { "attachments": [ { "contentUrl": $"data:image/jpeg;base64,{Convert.ToBase64String(bdata)}" } ] } Where bdata is a byte array 来源: https://stackoverflow.com/questions/37574157/how-can-i

How can I send a base64 encoded image?

老子叫甜甜 提交于 2021-01-28 18:50:33
问题 I would like to respond to a conversation by providing a barcode (.PNG) that has been base64 encoded. Is that possible? Or is the only method of delivery thru a Url. 回答1: Try: replyMessage.Attachments.Add(new Attachment() { ContentUrl = $"data:image/jpeg;base64,{Convert.ToBase64String(bdata)}" }); Or as JSON: { "attachments": [ { "contentUrl": $"data:image/jpeg;base64,{Convert.ToBase64String(bdata)}" } ] } Where bdata is a byte array 来源: https://stackoverflow.com/questions/37574157/how-can-i

How can I send a base64 encoded image?

天大地大妈咪最大 提交于 2021-01-28 18:28:50
问题 I would like to respond to a conversation by providing a barcode (.PNG) that has been base64 encoded. Is that possible? Or is the only method of delivery thru a Url. 回答1: Try: replyMessage.Attachments.Add(new Attachment() { ContentUrl = $"data:image/jpeg;base64,{Convert.ToBase64String(bdata)}" }); Or as JSON: { "attachments": [ { "contentUrl": $"data:image/jpeg;base64,{Convert.ToBase64String(bdata)}" } ] } Where bdata is a byte array 来源: https://stackoverflow.com/questions/37574157/how-can-i

Azure AD integration with Bot Framework / teams

给你一囗甜甜゛ 提交于 2021-01-28 14:25:41
问题 Last week I've been looking at Bot framework Samples, honestly BotFx isn't my area of expertise. I was playing with these samples from the sample library: 18.bot-authentication 24.bot-authentication-msgraph 46.teams-auth The required steps for making work each of them are almost the same, for #18 and make it work in the emulator this include: Register the BotApp in Azure AD Generate a Secret Add the Redirect URI (as documented it should be: https://token.botframework.com/.auth/web/redirect)

How do I send chat transcript? SendConversationHistoryAsync() not working

ぃ、小莉子 提交于 2021-01-28 13:52:07
问题 There is a sample for Conversation History: https://github.com/Microsoft/BotBuilder-Samples/tree/master/samples/csharp_dotnetcore/22.conversation-history Actually sending the transcript doesn't work in my attempts to run it. Specifically this line: await connectorClient.Conversations.SendConversationHistoryAsync(activity.Conversation.Id, transcript, cancellationToken: cancellationToken); I get the following exception: ConversationHistory> fail: Microsoft.BotBuilderSamples

How do I send chat transcript? SendConversationHistoryAsync() not working

99封情书 提交于 2021-01-28 13:41:04
问题 There is a sample for Conversation History: https://github.com/Microsoft/BotBuilder-Samples/tree/master/samples/csharp_dotnetcore/22.conversation-history Actually sending the transcript doesn't work in my attempts to run it. Specifically this line: await connectorClient.Conversations.SendConversationHistoryAsync(activity.Conversation.Id, transcript, cancellationToken: cancellationToken); I get the following exception: ConversationHistory> fail: Microsoft.BotBuilderSamples

How do I send chat transcript? SendConversationHistoryAsync() not working

半城伤御伤魂 提交于 2021-01-28 13:38:56
问题 There is a sample for Conversation History: https://github.com/Microsoft/BotBuilder-Samples/tree/master/samples/csharp_dotnetcore/22.conversation-history Actually sending the transcript doesn't work in my attempts to run it. Specifically this line: await connectorClient.Conversations.SendConversationHistoryAsync(activity.Conversation.Id, transcript, cancellationToken: cancellationToken); I get the following exception: ConversationHistory> fail: Microsoft.BotBuilderSamples

Getting TurnState data from DialogContext

大兔子大兔子 提交于 2021-01-28 12:25:24
问题 I am using BotBuilder SDK v4. Here is the explanation below (ignoring some extra code). On my bot's OnTurnAsync I am calling one of my dialog like so. public async Task OnTurnAsync(ITurnContext turnContext, CancellationToken cancellationToken = default(CancellationToken)) { var state = await _accessors.TurnStateAccessor.GetAsync(turnContext, () => new TurnState()).ConfigureAwait(false); var dialogContext = await _dialogs.CreateContextAsync(turnContext).ConfigureAwait(false); await

C# Botframework Loop inside of AdaptiveCard

馋奶兔 提交于 2021-01-28 10:43:57
问题 I have created one dialog to evaluate our company consultant in our chatbot (C# botframework), but I can't use for or foreach inside of AdaptiveCard. I need to create one TextBlock() and one ChoiceSet() block for each item from List Pergunta, but I can't do it with foreach. Any suggestion or better idea to create this loop ? Here is my complete dialog code in C#. using System; using System.Threading.Tasks; using Microsoft.Bot.Builder.Dialogs; using Microsoft.Bot.Connector; using System