Guides
Understanding Multi-Message Replies on DumGum
When replyParameters.multipleMessagesPerReply is enabled (either per request or at the project configuration level), AI replies can be split into multiple shorter messages instead of a single long one.
For example, instead of sending:
Hey Anthony! How are you this morning? I'm exhausted, didn't sleep well, it's way too hot lately 🥵
The system might send:
Hey Anthony! How are you this morning?
I'm exhausted, didn't sleep well, it's way too hot lately 🥵
This feature is designed to improve readability and make conversations feel more natural and dynamic.
How it works
- When activated, replies may be split. It's not systematic. Several generation strategies and a level of randomness are involved.
- Messages are always sent in order.
- By default, messages are sent instantly, one after another.
- A new message is sent only after the previous one has been successfully delivered.
Managing message pacing
If you want a more natural pacing (instead of instant bursts), you should manage the timing between messages. There are two options:
- Use our built-in delay system via
replyParameters.replyTypingDelay(recommended). You can choose betweenNORMALorFASTdelays. - Handle the delay yourself on your side.
When using our delay system:
- Each message is preceded by an
answer.processingevent (so you can show a typing indicator). - Then a pause is applied.
- Then the message is sent.
Message order is always preserved.
Note that every message sent has its own answer.created event.
What about usage and billing?
Only the first message in a split reply counts toward your usage. The additional messages that follow are free.
So if the AI sends a reply as 3 messages instead of 1, you're only charged for 1: the other 2 don't cost anything extra.
How to spot free messages in the API
Each answer.created event includes fields that let you distinguish the main message from free follow-ups:
sequenceNumber:0for the main (billable) message,1,2,3… for follow-ups.parentAnswerId:nullfor the main message. For follow-ups, contains the ID of the previous message in the sequence.cost: reflects actual billing. Follow-up messages always have a cost of"0.0000".
A simple rule: if sequenceNumber > 0, the message is free.