Package org.springframework.ai.image
Class ImageMessage
java.lang.Object
org.springframework.ai.image.ImageMessage
- All Implemented Interfaces:
Content,MediaContent
-
Constructor Summary
ConstructorsConstructorDescriptionImageMessage(String text) ImageMessage(String text, @Nullable Float weight) ImageMessage(String text, @Nullable Float weight, Collection<Media> media, Map<String, Object> metadata) Create a newImageMessage. -
Method Summary
-
Constructor Details
-
ImageMessage
-
ImageMessage
-
ImageMessage
public ImageMessage(String text, @Nullable Float weight, Collection<Media> media, Map<String, Object> metadata) Create a newImageMessage.- Parameters:
text- the text of the messageweight- the weight of the message, ornullif not setmedia- the media associated with the messagemetadata- the metadata associated with the message- Since:
- 2.0.1
-
-
Method Details
-
getText
Description copied from interface:ContentGet the content of the message. -
getWeight
-
getMedia
Description copied from interface:MediaContentGet the media associated with the content.- Specified by:
getMediain interfaceMediaContent
-
getMetadata
Description copied from interface:ContentGet the metadata associated with the content.- Specified by:
getMetadatain interfaceContent- Returns:
- the metadata associated with the content
-
toString
-
equals
-
hashCode
public int hashCode()
-