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 Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordThe image content of the message. -
Constructor Summary
ConstructorsConstructorDescriptionMediaContent(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 Summary
Modifier 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
-
MediaContent
Shortcut constructor for a text content.- Parameters:
text- The text content of the message.
-
MediaContent
Shortcut constructor for an image content.- Parameters:
imageUrl- The image content of the message.
-
MediaContent
public MediaContent(String type, String text, MiniMaxApi.ChatCompletionMessage.MediaContent.ImageUrl imageUrl) Creates an instance of aMediaContentrecord class.
-
-
Method Details
-
toString
Returns 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. -
hashCode
public 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. -
equals
Indicates 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). -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
imageUrl
Returns the value of theimageUrlrecord component.- Returns:
- the value of the
imageUrlrecord component
-