Package org.springframework.ai.model
Class Media
java.lang.Object
org.springframework.ai.model.Media
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetData()
Get the media data objectorg.springframework.util.MimeType
-
Constructor Details
-
Media
-
Media
public Media(org.springframework.util.MimeType mimeType, org.springframework.core.io.Resource resource)
-
-
Method Details
-
getMimeType
public org.springframework.util.MimeType getMimeType() -
getData
Get the media data object- Returns:
- a java.net.URL.toString() or a byte[]
-