botframework

How to reconnect to conversation using DirectLine App Service Extension?

早过忘川 提交于 2021-02-11 15:05:42
问题 I am using the DirectLine 3.0.3-preview NuGet package to create a .NET client using DirectLine App Service Extension. I am able to establish a connection and start a new conversation via WebSockets using directLineClient.StreamingConversations.ConnectAsync(conversationId, receiveMessageCallback) I am saving the conversationId generated from that session. However when I try to use that conversationId to create a new connection, I am not able to reconnect: // Initialize a DirectLineClient using

How to reconnect to conversation using DirectLine App Service Extension?

泄露秘密 提交于 2021-02-11 15:05:28
问题 I am using the DirectLine 3.0.3-preview NuGet package to create a .NET client using DirectLine App Service Extension. I am able to establish a connection and start a new conversation via WebSockets using directLineClient.StreamingConversations.ConnectAsync(conversationId, receiveMessageCallback) I am saving the conversationId generated from that session. However when I try to use that conversationId to create a new connection, I am not able to reconnect: // Initialize a DirectLineClient using

How do I make Input text a required field in adaptive card version 1.2 for webchat

Deadly 提交于 2021-02-11 14:56:33
问题 I am using BotFramework WebChat 4.9.1 and adaptive card 1.2 and I need few fields to be mandatory. Following is the card I have tried but it does not work. Ideally on submit it should highlight with red text that First name is required if the text box is empty. { "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "type": "AdaptiveCard", "version": "1.2", "body": [ { "type": "ColumnSet", "columns": [ { "type": "Column", "width": 2, "items": [ { "type": "TextBlock", "text": "Email

Waterfall prompt using activity.text instead of actually prompting user

流过昼夜 提交于 2021-02-11 14:44:12
问题 I have a dialog where a prompt in the first step is getting skipped. I determined that what is happening is that somehow step.context.activity.text is automatically being interpreted as the prompt response. For example, if I trigger the dialog with "Expedite my order", step.context.activity.text in the first step is "Expedite my order", the prompt is skipped, and step.result in the next step is "Expedite my order". I tried creating a "buffer step" as step 1 that just did return await step

Waterfall prompt using activity.text instead of actually prompting user

我们两清 提交于 2021-02-11 14:42:25
问题 I have a dialog where a prompt in the first step is getting skipped. I determined that what is happening is that somehow step.context.activity.text is automatically being interpreted as the prompt response. For example, if I trigger the dialog with "Expedite my order", step.context.activity.text in the first step is "Expedite my order", the prompt is skipped, and step.result in the next step is "Expedite my order". I tried creating a "buffer step" as step 1 that just did return await step

Access UserProfile from NotifyBot

早过忘川 提交于 2021-02-11 14:22:38
问题 I'm trying to kind of merge the functionality of EchoBot and ProactiveBot . A bot that parses user commands, which can also be triggered through a URL to send some users a message based on the contents of their UserProfile . I managed to get both parts to work, but I'm having trouble accessing the UserProfile s from the NotifyController , or solving the problem another way. I tried a few things, read many of the tutorials and also this excellent explanation, but I'm still stuck. So my

Botframework Create Directline get token from server

时间秒杀一切 提交于 2021-02-11 13:28:53
问题 I saved the token from createdirectline first time it was initialized to the server. But whenever I get the token from the server and used it, it will not use that token instead it will create a new one. React.useEffect(() => { const temp = async () => { if (Object.entries(directline).length === 0) { if(await props.chatBotData!.tokenFromDb){ setDirectline(createDirectLine({ token: props.chatBotData.tokenFromDb.toString() })); }else { setDirectline(createDirectLine({ token: DIRECTLINE_SECRET }

Teams botframework send proactive message REST api

走远了吗. 提交于 2021-02-11 12:33:01
问题 I Try to create new converation and send proactive message with teams bot (botfreamwork). I used this document to do that. I POST to : SERVICE_URL/v3/conversations/ BODY: { "bot": { "id": BOT_ID }, "members": [ { "id": USER_ID } ], "channelData": { "tenant": { "id": TENANT_ID } } } BOT_ID - I put the app id of the bot (with a prefix of "28:") USERֹ_ID - I copied the USER_ID from a message I received from the user (not in a proactive message) TENANT_ID - I took the tenant id from the link of

Is there a way to use storage for the Microsoft bot framework conversation dialog instead of the directline service storage for conversation history

霸气de小男生 提交于 2021-02-11 12:14:07
问题 The paradigm I am understanding for storage of the bot framework is related to state and not necessarily the entire usage of the bot dialog. This wouldn't be just a transcript but also it would serve as a message history when the user when the user connects to the bot. The issue would also serve during reconnection to the service. As of now, where are the messages being stored during reconnection? Or are they not stored and once connection is lost from the user session are all of those

Get proactive message from JSON

元气小坏坏 提交于 2021-02-11 10:44:10
问题 Is it possible to send a proactive message from an HTTP POST of json in C# if you have the ConversationReference? The JSON POST body will look something like this with the ConversationReference attached. [{ "message" : "Test message"},{"activityId":"4bead591-de0b-11e9-b5cf-dd1a7b37f8bc","user":{"id":"011e42cf-60ab-47e1-89af-6b698c383d54","name":"User","aadObjectId":null,"role":null},"bot":{"id":"8b9e0710-9ef5-11e9-9393-8929068282f7","name":"Bot","aadObjectId":null,"role":"bot"},"conversation"