Package org.springframework.ai.image
Class ImageMessage
java.lang.Object
org.springframework.ai.image.ImageMessage
- All Implemented Interfaces:
org.springframework.ai.content.Content,org.springframework.ai.content.MediaContent
-
Constructor Summary
ConstructorsConstructorDescriptionImageMessage(String text) ImageMessage(String text, @Nullable Float weight) ImageMessage(String text, @Nullable Float weight, Collection<org.springframework.ai.content.Media> media, Map<String, Object> metadata) Create a newImageMessage. -
Method Summary
-
Constructor Details
-
ImageMessage
-
ImageMessage
-
ImageMessage
public ImageMessage(String text, @Nullable Float weight, Collection<org.springframework.ai.content.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
- Specified by:
getTextin interfaceorg.springframework.ai.content.Content
-
getWeight
-
getMedia
- Specified by:
getMediain interfaceorg.springframework.ai.content.MediaContent
-
getMetadata
- Specified by:
getMetadatain interfaceorg.springframework.ai.content.Content
-
toString
-
equals
-
hashCode
public int hashCode()
-