问题
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