3
votes

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

2
On which channel are you experiencing this behaviour after the deployment to Azure?Mick
Typing indicator IS working, BUT you are having delays? In what Channels are you experiencing those delaysMarc Asmar
@ Mick and @ Marc Asmar, i am using web page as channel.Sanjeev Gautam

2 Answers

1
votes

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

0
votes

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!