How to Fix issues related to DirectLineChannel prompt choice options not displayed in chat bot window developed using V4 SDK in C#?

时光总嘲笑我的痴心妄想 提交于 2021-01-29 07:18:18

问题


I am trying to create a chatbot which is having multiple waterfall dialog classes using C# and BOT SDK V4. I have created a HTML page and placed the DirectLine channel Secret Key Iframe data into it and published it to Azure successfully and opened it in the browser. The browser opens with a in-built welcome message something like: Hi bot name type Hi to continue.

If i have Choice options done through prompt options to be displayed as buttons but these are not displayed through direct line channel but works very good in Web Chat Channel? Attached image shows the issue: a "WebChatbotHtml_optionbtndisplayed.jpg"

b. "DirectLinechannelHtml_optionbtnnotdisplayed.jpg"

Now, in the main dialog class i have implemented the Login mechanism using the Oauth Prompt in th html page that was created above i see the login link getting displayed using which i have successfully logged in this will navigate to another waterfall dialog having prompt options with some custom choice buttons, whee if i click on a choice button the next step will be executed and respective action will be triggered. The issue i have is normally the options are displayed for me to access but in the html that i created the all other things like login link and navigation is happening but the choice buttons are not displayed its like they are getting hidden.

or Sometimes the Choice Option buttons are not displayed at all in the Direct Channel Web chat bot

The query is how to fix the issue?

To make my query to be understood in a better way please find below set of things: 1. WaterfalldiaglogClass1: STEP 1: Has login option/link displayed through Oauth Prompt. STEP 2: Gets token validates it and displays login successful message and then navigates to second waterfalldialogClass 2. WaterFallddialogClass2: STEP 1: Custom choices are displayed through Prompt options lets say 1,2,3,4 STEP 2: Capture the choice getting clicked and perform respective action

  1. I created a HTML page where the I frame code i copied with secret code of Direct Line Channel

  2. Published it to azure successfully with no errors or warnings

  3. Opened the html page in a browser the chat bot opens successfully with a welcome default message like: HI i am bot,enter Hi to continue

  4. User sends hi and logins using the login link available displayed in dialog class 1 and login successful message is displayed

  5. Navigated successfully to second dialog successfully as i can see the prompt message given as part of prompt option and custom choices in the code

Current Issue: The option buttons 1,2,3,4 are not getting displayed it is getting hidden somehow

Need help in resolving the issue Please provide detailed step by step guide in resolving it as i am new to BOT and coding .

language: C# Bot Framework: V4

I have tried increasing height width and other % values in the HTML page and republished it but not successful. The same thing works in web chat channel i.e. if i keep secret code inside the HTML page of webchat channel without any issues.

Issue Image attached for reference.

Expected Result: Data or choices should be shown as it is working in Webchat channel Actual Result: Not working the choice options are not visible to choose


回答1:


There are two versions of Embedded Web Chat at the moment: Gemini and Scorpio. Embedded Web Chat is currently in the process of slowly transitioning all clients from Scorpio to Gemini. It appears your embedded Web Chat is still using Scorpio which unfortunately does not support the OAuth prompt. In the near future, you will be able to manually request your client to be switched to Gemini.

In the meantime, you can add either add Web Chat v4 to your site using a CDN or wait for your client to be migrated to Gemini.

For more details regarding Embedded Web Chat, take a look at the documentation.

Hope this is somewhat helpful.



来源:https://stackoverflow.com/questions/56286657/how-to-fix-issues-related-to-directlinechannel-prompt-choice-options-not-display

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!