Package akka.javasdk.agent
Record Class MessageContent.ImageUrlMessageContent
- Record Components:
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'
- All Implemented Interfaces:
MessageContent,MessageContent.LoadableMessageContent
- Enclosing interface:
MessageContent
public static record MessageContent.ImageUrlMessageContent(URI uri, MessageContent.ImageMessageContent.DetailLevel detailLevel, Optional<String> mimeType)
extends Record
implements MessageContent.LoadableMessageContent
Image content within a user message, referenced by URI.
-
Nested Class Summary
Nested classes/interfaces inherited from interface akka.javasdk.agent.MessageContent
MessageContent.ImageMessageContent, MessageContent.ImageUrlMessageContent, MessageContent.LoadableMessageContent, MessageContent.PdfMessageContent, MessageContent.PdfUrlMessageContent, MessageContent.TextMessageContent -
Constructor Summary
ConstructorsConstructorDescriptionImageUrlMessageContent(URI uri, MessageContent.ImageMessageContent.DetailLevel detailLevel) Image content within a user message, referenced by URI.ImageUrlMessageContent(URI uri, MessageContent.ImageMessageContent.DetailLevel detailLevel, Optional<String> mimeType) Creates an instance of aImageUrlMessageContentrecord class.ImageUrlMessageContent(URL url, MessageContent.ImageMessageContent.DetailLevel detailLevel) Deprecated, for removal: This API element is subject to removal in a future version.ImageUrlMessageContent(URL url, MessageContent.ImageMessageContent.DetailLevel detailLevel, Optional<String> mimeType) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptioncreate(ObjectStorage bucket, String key) Creates image content referencing an object in a bucket via theobject://URI scheme.Returns the value of thedetailLevelrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.mimeType()Returns the value of themimeTyperecord component.final StringtoString()Returns a string representation of this record class.uri()Returns the value of theurirecord component.url()Deprecated, for removal: This API element is subject to removal in a future version.Useuri()instead.
-
Constructor Details
-
ImageUrlMessageContent
Image content within a user message, referenced by URI.- Parameters:
uri- The URI pointing to the imagedetailLevel- The level of detail for image processing
-
ImageUrlMessageContent
@Deprecated(forRemoval=true) public ImageUrlMessageContent(URL url, MessageContent.ImageMessageContent.DetailLevel detailLevel, Optional<String> mimeType) Deprecated, for removal: This API element is subject to removal in a future version. -
ImageUrlMessageContent
@Deprecated(forRemoval=true) public ImageUrlMessageContent(URL url, MessageContent.ImageMessageContent.DetailLevel detailLevel) Deprecated, for removal: This API element is subject to removal in a future version. -
ImageUrlMessageContent
public ImageUrlMessageContent(URI uri, MessageContent.ImageMessageContent.DetailLevel detailLevel, Optional<String> mimeType) Creates an instance of aImageUrlMessageContentrecord class.- Parameters:
uri- the value for theurirecord componentdetailLevel- the value for thedetailLevelrecord componentmimeType- the value for themimeTyperecord component
-
-
Method Details
-
create
Creates image content referencing an object in a bucket via theobject://URI scheme.- Parameters:
bucket- the object-storage bucketkey- the object key within the bucket
-
url
Deprecated, for removal: This API element is subject to removal in a future version.Useuri()instead.Returns the URI as aURLfor backwards compatibility.- Throws:
RuntimeException- if the URI cannot be converted to a URL (e.g. forobject://URIs)
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
uri
Returns the value of theurirecord component.- Returns:
- the value of the
urirecord component
-
detailLevel
Returns the value of thedetailLevelrecord component.- Returns:
- the value of the
detailLevelrecord component
-
mimeType
Returns the value of themimeTyperecord component.- Returns:
- the value of the
mimeTyperecord component
-
ImageUrlMessageContent(URI, ImageMessageContent.DetailLevel)instead.