Package akka.javasdk.agent
Record Class MessageContent.ImageMessageContent
- Enclosing interface:
MessageContent
Factory methods for creating image message content.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumControls the level of detail used when processing images. -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aImageMessageContentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Creates image content from a URI string with automatic detail level.Creates image content from a URI with automatic detail level.fromUri(URI uri, MessageContent.ImageMessageContent.DetailLevel detailLevel) Creates image content from a URI with a specific detail level.fromUri(URI uri, MessageContent.ImageMessageContent.DetailLevel detailLevel, String mimeType) Creates image content from a URI with a specific detail level and explicit mime type.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.UsefromUri(URI)instead.fromUrl(URL url, MessageContent.ImageMessageContent.DetailLevel detailLevel) Deprecated, for removal: This API element is subject to removal in a future version.UsefromUri(URI, DetailLevel)instead.fromUrl(URL url, MessageContent.ImageMessageContent.DetailLevel detailLevel, String mimeType) Deprecated, for removal: This API element is subject to removal in a future version.UsefromUri(URI, DetailLevel, String)instead.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ImageMessageContent
public ImageMessageContent()Creates an instance of aImageMessageContentrecord class.
-
-
Method Details
-
fromUri
Creates image content from a URI string with automatic detail level.- Parameters:
uri- The URI string pointing to the image. Supportshttp(s)://as well as custom schemes resolved by aContentLoaderandobject://bucket/keybacked by object storage.- Returns:
- A new ImageUrlMessageContent instance with AUTO detail level
-
fromUri
Creates image content from a URI with automatic detail level.- Parameters:
uri- The URI pointing to the image- Returns:
- A new ImageUrlMessageContent instance with AUTO detail level
-
fromUri
public static MessageContent.ImageUrlMessageContent fromUri(URI uri, MessageContent.ImageMessageContent.DetailLevel detailLevel) Creates image content from a URI with a specific detail level.- Parameters:
uri- The URI pointing to the imagedetailLevel- The level of detail for image processing- Returns:
- A new ImageUrlMessageContent instance
-
fromUri
public static MessageContent.ImageUrlMessageContent fromUri(URI uri, MessageContent.ImageMessageContent.DetailLevel detailLevel, String mimeType) Creates image content from a URI with a specific detail level and explicit mime type.- Parameters:
uri- The URI pointing to the imagedetailLevel- The level of detail for image processingmimeType- The mimeType of the image, e.g. 'image/jpeg', 'image/png'- Returns:
- A new ImageUrlMessageContent instance
-
fromUrl
@Deprecated(forRemoval=true) public static MessageContent.ImageUrlMessageContent fromUrl(String url) Deprecated, for removal: This API element is subject to removal in a future version.UsefromUri(String)instead. -
fromUrl
Deprecated, for removal: This API element is subject to removal in a future version.UsefromUri(URI)instead. -
fromUrl
@Deprecated(forRemoval=true) public static MessageContent.ImageUrlMessageContent fromUrl(URL url, MessageContent.ImageMessageContent.DetailLevel detailLevel) Deprecated, for removal: This API element is subject to removal in a future version.UsefromUri(URI, DetailLevel)instead. -
fromUrl
@Deprecated(forRemoval=true) public static MessageContent.ImageUrlMessageContent fromUrl(URL url, MessageContent.ImageMessageContent.DetailLevel detailLevel, String mimeType) Deprecated, for removal: This API element is subject to removal in a future version.UsefromUri(URI, DetailLevel, String)instead. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal.
-
fromUri(String)instead.