Class Media

java.lang.Object
org.springframework.ai.model.Media

public class Media extends Object
The Media class represents the data and metadata of a media attachment in a message. It consists of a MIME type and the raw data. This class is used as a parameter in the constructor of the UserMessage class.
Since:
0.8.1
Author:
Christian Tzolov
  • Constructor Details

    • Media

      public Media(org.springframework.util.MimeType mimeType, URL url)
    • Media

      public Media(org.springframework.util.MimeType mimeType, org.springframework.core.io.Resource resource)
  • Method Details

    • getMimeType

      public org.springframework.util.MimeType getMimeType()
    • getData

      public Object getData()
      Get the media data object
      Returns:
      a java.net.URL.toString() or a byte[]