send

fun send(text: String, attachments: List<Uri> = emptyList())

Sends a message. A message with no text and no attachments is not sent.

Parameters

text

What the person wrote.

attachments

The files they picked, on this device.


fun send(message: MessageData)

Sends what the person wrote in the composer.

Parameters

message

The composer's message.


fun send(action: AIUIAction)

Sends what the person did in a reply's generated UI, as their next message: its label is the text, and the request's AIConversationRequest.uiAction the action. Pass it as the action callback of the conversation's AIUIHost.

Parameters

action

What the person did.