Record Class MiniMaxApi.ChatCompletionMessage.MediaContent
java.lang.Object
java.lang.Record
org.springframework.ai.minimax.api.MiniMaxApi.ChatCompletionMessage.MediaContent
- Record Components:
- type- Content type, each can be of type text or image_url.
- text- The text content of the message.
- imageUrl- The image content of the message. You can pass multiple images by adding multiple image_url content parts.
- Enclosing class:
- MiniMaxApi.ChatCompletionMessage
public static record MiniMaxApi.ChatCompletionMessage.MediaContent(String type, String text, MiniMaxApi.ChatCompletionMessage.MediaContent.ImageUrl imageUrl)
extends Record
An array of content parts with a defined type.
 Each MediaContent can be of either "text" or "image_url" type. Not both.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic final recordThe image content of the message.
- 
Constructor SummaryConstructorsConstructorDescriptionMediaContent(String text) Shortcut constructor for a text content.MediaContent(String type, String text, MiniMaxApi.ChatCompletionMessage.MediaContent.ImageUrl imageUrl) Creates an instance of aMediaContentrecord class.Shortcut constructor for an image content.
- 
Method SummaryModifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.imageUrl()Returns the value of theimageUrlrecord component.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
- 
Constructor Details- 
MediaContentShortcut constructor for a text content.- Parameters:
- text- The text content of the message.
 
- 
MediaContentShortcut constructor for an image content.- Parameters:
- imageUrl- The image content of the message.
 
- 
MediaContentpublic MediaContent(String type, String text, MiniMaxApi.ChatCompletionMessage.MediaContent.ImageUrl imageUrl) Creates an instance of aMediaContentrecord class.
 
- 
- 
Method Details- 
toStringReturns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
- 
hashCodepublic final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
- 
equalsIndicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object).
- 
typeReturns the value of thetyperecord component.- Returns:
- the value of the typerecord component
 
- 
textReturns the value of thetextrecord component.- Returns:
- the value of the textrecord component
 
- 
imageUrlReturns the value of theimageUrlrecord component.- Returns:
- the value of the imageUrlrecord component
 
 
-