Class ImageMessage

java.lang.Object
org.springframework.ai.image.ImageMessage
All Implemented Interfaces:
org.springframework.ai.content.Content, org.springframework.ai.content.MediaContent

public class ImageMessage extends Object implements org.springframework.ai.content.MediaContent
  • Constructor Details

    • ImageMessage

      public ImageMessage(String text)
    • ImageMessage

      public ImageMessage(String text, @Nullable Float weight)
    • ImageMessage

      public ImageMessage(String text, @Nullable Float weight, Collection<org.springframework.ai.content.Media> media, Map<String,Object> metadata)
      Create a new ImageMessage.
      Parameters:
      text - the text of the message
      weight - the weight of the message, or null if not set
      media - the media associated with the message
      metadata - the metadata associated with the message
      Since:
      2.0.1
  • Method Details

    • getText

      public String getText()
      Specified by:
      getText in interface org.springframework.ai.content.Content
    • getWeight

      public @Nullable Float getWeight()
    • getMedia

      public List<org.springframework.ai.content.Media> getMedia()
      Specified by:
      getMedia in interface org.springframework.ai.content.MediaContent
    • getMetadata

      public Map<String,Object> getMetadata()
      Specified by:
      getMetadata in interface org.springframework.ai.content.Content
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object