LlmPart

sealed interface LlmPart

One piece of multimodal input to OnDeviceLlm.generate. ByteArray (not a platform bitmap type) keeps this commonMain-safe — each platform actual decodes the bytes itself.

Audio is deliberately not modeled yet (no backend needs it) — add a case here when one does.

Inheritors

Types

Link copied to clipboard
data class Image(val bytes: ByteArray, val mime: String = "image/png") : LlmPart
Link copied to clipboard
data class Text(val text: String) : LlmPart