Skip to main content

asgard.message.complete

asgard.message.complete marks the end of a message, carrying the complete text and the template format (options, buttons, images and so on).

Characteristics​

  • When it fires: as the AI finishes generating the message
  • What it does: provides the complete text and the template, ending the current message
  • How often: once per message

The fields that matter​

FieldDescription
messageComplete.message.textThe complete text, already including every earlier fragment, so it can replace whatever has accumulated on screen
messageComplete.message.idxUsually null, unlike in delta events
messageComplete.message.templateThe template, carrying interactive elements such as options, buttons and images. See the Message Template reference

Full example​

{
"eventType": "asgard.message.complete",
"requestId": "6939c5a6c590d90c401e3850a1ff44f3",
"namespace": "qa-7e301310-a594-4a7b-aa2a-xxxxxxxxxxxx",
"botProviderName": "bpapi-d97c512f-f8dc-46f6-82f0-xxxxxxxxxxxx",
"customChannelId": "ch-6xxxxxxxxxxxx",
"fact": {
"runInit": null,
"runDone": null,
"runError": null,
"messageStart": null,
"messageDelta": null,
"messageComplete": {
"message": {
"messageId": "1834828082242916352",
"replyToCustomMessageId": "",
"text": "目前台北xxx", // ← the complete text
"payload": {},
"isDebug": false,
"idx": null, // ← usually null
"template": { // ← the template
"type": "TEXT",
"text": "目前台北xxx"
}
}
}
}
}

Notes​

  • The text is complete: it holds everything accumulated, so it can replace what is on screen outright
  • The template: carries the final template. See the Message Template reference
  • State: this marks the current message finished, ready for the next response