direct-line-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

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 }

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

How to subscribe to the refresh token event

◇◆丶佛笑我妖孽 提交于 2021-02-10 21:53:44
问题 The problem is that I need to be able to subscribe to the token refresh event and I can't figure out how. I know people advise on subscribing to connectionStatus$ and handling the ConnectionStatus.ExpiredToken case, but the execution never enters that case when refreshing happens, it only enters that case when I try to initialize the bot with an expired token. The token refresh event is getting triggered every 15 minutes by the library itself but there is no observable that will allow me to

Wait for Even type Activity in a waterfallstep dialog (bot framework 4.0)

我只是一个虾纸丫 提交于 2021-02-10 15:28:11
问题 It's possible to wait and receive an Event type activity in a waterfall step dialog. I use directline 3.0 and inside a dialog flow I send an event from the bot to the client. After i would like to send an event from the client to the bot as an answer to previous send. If i use prompt await dc.Prompt("waitEvent",activity) where waitEvent is a textprompt and i answer with a message it works fine but I would like to answer to an event with an event. I was thinking that i could write a custom

UserState showing null in onMembersAdded function

﹥>﹥吖頭↗ 提交于 2021-02-10 14:48:47
问题 I have logic in my onMembersAdded function to load the user state and see if userData.accountNumber attribute exists. If it does not, a run an auth dialog to get the user's account number. If the attribute does exist, the welcome message should be displayed without a prompt. When I test on local, this works fine. But when I test on Azure, I always end up in the !userData.accountNumber block. Through checking the console log, I can see that in the onMembersAdded function is showing {} for the

UserState showing null in onMembersAdded function

爷,独闯天下 提交于 2021-02-10 14:48:23
问题 I have logic in my onMembersAdded function to load the user state and see if userData.accountNumber attribute exists. If it does not, a run an auth dialog to get the user's account number. If the attribute does exist, the welcome message should be displayed without a prompt. When I test on local, this works fine. But when I test on Azure, I always end up in the !userData.accountNumber block. Through checking the console log, I can see that in the onMembersAdded function is showing {} for the

Direct Line App Extension - How and where are messages cached?

浪尽此生 提交于 2021-02-04 21:35:22
问题 I have a few questions about the new Direct Line App Extension for App Services on Azure announced at Build 2020. The "normal" direct line services cached messages at their own regional servers. Now that this extension allows the App Service of a bot to act as the Direct Line endpoint, is the conversation with it's messages cached in the app service? And does this mean, one could for example edit the settings of the conversation caching like cache duration etc.? And I guess the pricing of

How to disable magic number using OAuthPrompt in bot framework V4

筅森魡賤 提交于 2021-01-29 05:40:22
问题 I had implemented authentication to my bot application by referring here. I had successfully implemented and able to sign in but application is authenticating user using magic number. Is not there any way to disable magic number? Note: I had created bot application using Bot Framework V4 回答1: There have been improvements to the channels to support new authentication features, such as new WebChat and DirectLineJS libraries to eliminate the need for the 6-digit magic code verification. You can