typing indicator in chatbot

扶醉桌前 提交于 2020-01-25 08:32:28

问题


Typing indicator for bot framework in nodejs

Hi,

i am working with microsoft bot framework v4, node js, i need to implement typing in chat bot. the bot should respond like(...) as response before sending the original response. i have seen the code here Send a typing indicator in bot-framework v4 using DirectLine and webchat (Node.js)

code is working fine in local but when i deploy it to azure, typing(...) is not coming, i can see a delay for 3 secs in response in azure .

my code

await step.context.sendActivities([
                                { type: 'typing' },
                                { type: 'delay', value: 3000 },

                            ]);`

Thanks Sanjeev Gautam


回答1:


Unfortunately this appears to be a bug with Test in Web Chat. The typing indicator, as expected, should visibly display. An issue was created in the BotFramework-WebChat repo here reporting the bug.

I would recommend commenting on the issue so the Web Chat developers can fully appreciate any impact.

Hope of help!




回答2:


Thanks for your help and suggestions. I have changed webSocket: true, in botConnection of chatter.html and solved my purpose. Before it was webSocket: false.

 var botConnection = new BotChat.DirectLine({
        secret: model.secret,
        token: model.token,
        domain: model.directLineUrl,
        webSocket: true,
        conversationId: getPersistedConversationId(),
        watermark: 0
    }); 

Thanks Sanjeev Gautam



来源:https://stackoverflow.com/questions/58518661/typing-indicator-in-chatbot

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