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.
Turning it on or off
You can set it in two places:
- Per request, with
replyParameters.multipleMessagesPerReply. - In your project, with the Allow Multiple Messages Per Reply option on your project settings page.
A value sent with the request always wins over the project option, false included. When the request leaves the field out, the project option applies. See Request vs Project Settings.
Off means one message, every time: when the setting is off, each reply arrives as a single message. If the Persona wrote it on several lines, the lines are joined with spaces.
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.