This must be a common issue but I can't find any sources discussing it. There are a lot on the opposite (sending multiple responses to single request).
There's a common human-to-human chat style where personA quickly sends a second message to add to or correct their first message. That is frequently attempted to be used with a chatbot too, for example:
Bot: Where should we deliver the pizza?
User: 123 main street sprnigfelid
User: springfield
Bot: (response to input #1 )
Bot: (response to input #2 )
Now the problem is if the bot is smart enough to recognize misspellings or open enough to accept them from the first input. The convo would play out like this:
User: 123 main street sprnigfeld
User: springfield
Bot: OK, 123 Main St., Springfield. What state is that in?
Bot: Got it, I will deliver to 123 Main St., Springfield, Springfield. Is that location correct?
There are so many other situations and ways the bot can mistake these multiple rapid inputs and the double responses leave user's wondering what went wrong and confused about where in the conversation they stand.
So has anyone attempted handling of this?
I'm seeking general guidance for an approach, but in case someone has a specific answer, I'm using a PHP Proxy between the User and a Lex bot. I use this Proxy to validate and parse incoming messages before passing them to Lex. I also store session information. One thing I've tried was storing an input_count #, to try to detect if a new input came in before sending the first response.
However, it seems that PHP might be queuing the second input until the first is finished, so there is never a change to my input_count #. So even when the user sends many quick inputs, my bot responds to each one.