Class ImagePart
java.lang.Object
com.codename1.ai.MessagePart
com.codename1.ai.ImagePart
An image attachment for a multi-modal
ChatMessage. Construct from
raw bytes (the provider encodes them as base64 inline data) or from
a publicly-reachable URL -- both modes are accepted by OpenAI,
Anthropic, and Gemini.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ImagePart
Inline image bytes.mimeTypemust be set (e.g."image/png","image/jpeg"); the providers reject inline images without it. -
ImagePart
Remote image by URL. Only HTTPS is portable across providers.
-
-
Method Details
-
getData
public byte[] getData() -
getMimeType
-
getUrl
-
isUrl
public boolean isUrl()
-