Handling Multiple Rapid Messages
# 🤝help
p
I'm exploring building chatbots with Botpress. It's pretty common for users to send multiple messages in rapid succession, stringing together a single line of thought. English is not my native language, so it's a bit hard to explain. But essentially, the dialogue would look something like:
Copy code
Hello

How are you doing?

I have questions

Can you help me?
In this example, each message is separated by double new lines, indicating a new message. I'm also gonna attach an example of such messaging style as a screenshot. Botpress would process each message separately and it might struggle to give meaningful response as it lacks context. How can this be mitigated? I was thinking some sort of timeout and for the bot to wait while the user "typing" status is active. I understand it's not gonna be available for all integrations. Any advice would be appreciated. https://cdn.discordapp.com/attachments/1248030969269714944/1248030969466716290/textmsg-lines.png?ex=66622eea&is=6660dd6a&hm=b6db7476292804f0c99c4623db8c1ae9d6151cb0a37f31c7d9ee83f7e2459720&
l
I also want to learn this... from what I've noticed it seems to delay the incoming message events until the outgoing messages go through. If there's a way to circumvent this and get the incoming messages at the time the user sends them, there might at least be a way to do this integrating with external code
c
I'm pretty sure Botpress handles this by its own by queuing incoming messages.
p
I tested this and can confirm it does react to every single message individually. It does make sense. Can I maybe create some node that runs code and saves the state somewhere? Would tables be a good fit for this or are they too slow?
q
i'm trying to solve that as well but with no success.. i see a lot of complains about that here and no answers/solutions. One thing that i thought would work is to put bot to wait 5s and then collect user's messages from summaryAgent.transcript, but it seems that it just always goes 1 by 1 as usual - 1 user 1 bot. It's that queuing that it does that messes everything, is there a way to turn this off?
g
Hey, I'm facing the same issue, anyone found or build a solution?
r
Hey brother did you find any idea to hundel this situation
w
Basically for each “unwanted” message, the default behavior is to go back to the start node That said, I’m currently building a solution that I will share in the next days 😉
you can check this and comment ! let me know if that helps!
@rough-pilot-36637 @gifted-zebra-63358 @quaint-notebook-22402 @purple-activity-42471 @lemon-alarm-58821
r
message has been deleted
10 Views