Interface: ChatMessage
A single chat message in a conversation.
Properties
answerContract?
optionalanswerContract?:AnswerContract
Canonical fact/governance manifest shared with MCP and first-party UI.
chart?
optionalchart?:Record<string,unknown>
confidence?
optionalconfidence?:number
Headline confidence, 0–100 (the API's integer confidence_score) —
render as ${Math.round(confidence)}%, never multiply by 100.
content
content:
string
conversationId?
optionalconversationId?:string
The conversation this message belongs to. Threaded back into the next
sendMessage so multi-turn context is preserved. Distinct from id
(the message id) — sending the message id as a conversation id makes the
backend reject the 2nd turn with 400 "Conversation not found".
coreEvidence?
optionalcoreEvidence?:CoreEvidence
The answer engine's trust account (undefined when absent). Render it with coreTrustLabel and coreCheckNote.
data?
optionaldata?:Record<string,unknown>
governance?
optionalgovernance?:Governance
Governance attestation for a governed answer (undefined when absent).
id
id:
string
refusal?
optionalrefusal?:Refusal
Set when the platform withheld this answer on governance grounds. Check it
before rendering data — when it is present, sql, data and chart are
all undefined by construction.
role
role:
"user"|"assistant"
sources?
optionalsources?:Record<string,unknown>
sql?
optionalsql?:string
The query behind the answer. Always undefined with an embed token (nxe_…): the API does not send it.
timestamp
timestamp:
string