A message used within a session, can be either an AI generated message or a user generated message.

orgId
string
required

The id of the organisation that the session belongs to (usually the teamId of the corresponding app object).

teamId
string
required

The id object of the team the session belongs to (usually the teamId of the corresponding app object the session stems from).

sessionId
string
required

The id of the session object the message exists within

message
object
required

Can be of any type, the message content

ts
integer
required

UNIX timestamp, equivelant to Date.now() of message creation

authorId
string
required

If the message is sent by an agent, this is set to null, if sent by a user then it is set to the accountId

isFeedback
boolean
required

Set by the agent, when set to 'trye' the agent is expecting human input

displayType
enum<string>
required

The display type of the message, only used in front end

Available options:
bubble,
inline
authorName
string
required

The name of the message author, if sent by an agent then set to the agent's name otherwise set to account name

_id
string

Mongodb Object id, unique identifier, length of 24 characters fitting the following regex; [a-f0-9]{24}

chunkId
string

Unique identifier for the chunk associated with this message, leave blank.

tokens
integer

Tokens used in this message

chunks
object[]
codeBlocks
object[]
completed
boolean

Wether the message is completed or still generating