delay text output
See original GitHub issueIs your feature request related to a problem? Please describe.
When trying to fake the interaction with a real human, the user expects that the other end needs some time to write the response. The send response settings should allow a non-zero delay in the answer.
Describe the solution you’d like
Either allow new Activity { Type = ActivityTypes.Typing }
and new Activity { Type = "delay", Value= xxx }
as separate dialog elements, or add a parameter in the send an activity UI to include this
Additional context
The framework allows the use of a typing indicator https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-howto-send-messages?view=azure-bot-service-4.0&tabs=csharp
Issue Analytics
- State:
- Created 3 years ago
- Comments:21 (11 by maintainers)
Top Results From Across the Web
making text appear delayed - java
The first error message is telling you that you can't put a public static void main there - you probably already have one...
Read more >Python sleep(): How to Add Time Delays to Your Code
In this code, you create a worker called output() that takes in the number of seconds to sleep and the text to print...
Read more >Linux Command > output.txt with delay
Try using the wait command. Like this: top -bn 1 > output.txt & wait. It's supposed to wait until that process is complete...
Read more >How to add time delay in Python?
1.Set the value of delay in seconds. 2.Get the current time using time.monotonic() and assign it to start_time. 3.Enter ...
Read more >How to Add Delay in Java For Few Seconds
The easiest way to delay a java program is by using Thread. sleep() method. The sleep() method is present in the Thread class....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I switched to writing the bot in code entirely in the meantime.
What I am doing in my “code bot” is the following:
In conjunction with:
ADAPTER.use(ShowTypingMiddleware(delay=0.5, period=2.0))
So after each message has been sent, the bot waits
len(text.split(" ")) / 5
seconds. The reasoning behind that is: This time frame is approximately the time an average reader needs to read the message just sent (https://capitalizemytitle.com/reading-time/1000-words/). In my tests that worked pretty well, because you do not want to wait for the bot to type, you just don’t want to be flooded with messages. So this is pretty much what @EricDahlvang described.With all my new experience with implementing the bot in code, I would have loved to see these features in the composer:
I hope that clears up what I was looking for.
Thank you for your support!
@reinoldus I will re-open and transfer to https://github.com/microsoft/botbuilder-dotnet for continued discussion.