Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

How does typing activity work in botframework?


Asked by Carl Singh on Nov 30, 2021 FAQ



The activity is sent the exact way you describe, but it is only shown until the next response has been sent. In the example screenshot, the delay is caused by the HTTP request, and during this time the typing activity is shown.
Additionally,
For example, if the bot sent typing activity and then idled for > 5 seconds, you will see the typing indicator show up for 5 seconds and then gone. If the bot sent typing activity followed by another activity, you will see the typing indicator show up for a split second and then gone.
Similarly, The Bot Framework Activity schema defines the activities that can be exchanged between a user or channel and a bot. Activities can represent human text or speech, app-to-app notifications, reactions to other messages, and so on. In a conversation, people often speak one-at-a-time, taking turns speaking.
In respect to this,
Within the Bot Framework SDK, a turn consists of the user's incoming activity to the bot and any activity the bot sends back to the user as an immediate response. You can think of a turn as the processing associated with the bot receiving a given activity.
Besides,
Bots are created using the Bot Framework. If the bots receive a message activity, then the turn handler receives a notification of that incoming activity. The turn handler then sends the incoming activity to the onMessage activity handler. In Teams, this functionality remains the same.