onMessage

abstract fun onMessage(message: Message, conversation: Conversation)

Called when a message is sent in the conversation.

Parameters

message

Message. It's possible the message isn't in the conversation: for example if it's a diagnostic message. If it should be in the conversation, the message will have been added

conversation

conversation. This is messages the users should see and which will be used for context in future messages.