AIMessageAttachment

constructor(kind: AIMessageAttachment.Kind, uri: Uri? = null, bitmap: ImageBitmap? = null, name: String? = null, size: Long? = null, mimeType: String? = null, extraData: Map<String, Any?> = emptyMap())

Parameters

kind

What kind of attachment it is.

uri

Where it is: on the web, or on this device, such as a content:// URI the person picked.

bitmap

The image itself when the app holds it, such as a photo the person just took. It shows rather than the one at uri. Pass a small one, the size it shows at: it stays in memory while the conversation shows it.

name

Its name, such as the file's.

size

Its size, in bytes.

mimeType

Its media type, such as application/pdf. Without it, the type comes from the extension of its name or URI.

extraData

Data of its own, such as what an attachment of a kind of your own needs.