Record Class MiniMaxApi.ChatCompletion.Choice
java.lang.Object
java.lang.Record
org.springframework.ai.minimax.api.MiniMaxApi.ChatCompletion.Choice
- Record Components:
finishReason
- The reason the model stopped generating tokens.index
- The index of the choice in the list of choices.message
- A chat completion message generated by the model.logprobs
- Log probability information for the choice.
- Enclosing class:
- MiniMaxApi.ChatCompletion
public static record MiniMaxApi.ChatCompletion.Choice(MiniMaxApi.ChatCompletionFinishReason finishReason, Integer index, MiniMaxApi.ChatCompletionMessage message, List<MiniMaxApi.ChatCompletionMessage> messages, MiniMaxApi.LogProbs logprobs)
extends Record
Chat completion choice.
-
Constructor Summary
ConstructorDescriptionChoice
(MiniMaxApi.ChatCompletionFinishReason finishReason, Integer index, MiniMaxApi.ChatCompletionMessage message, List<MiniMaxApi.ChatCompletionMessage> messages, MiniMaxApi.LogProbs logprobs) Creates an instance of aChoice
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.Returns the value of thefinishReason
record component.final int
hashCode()
Returns a hash code value for this object.index()
Returns the value of theindex
record component.logprobs()
Returns the value of thelogprobs
record component.message()
Returns the value of themessage
record component.messages()
Returns the value of themessages
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Choice
public Choice(MiniMaxApi.ChatCompletionFinishReason finishReason, Integer index, MiniMaxApi.ChatCompletionMessage message, List<MiniMaxApi.ChatCompletionMessage> messages, MiniMaxApi.LogProbs logprobs) Creates an instance of aChoice
record class.- Parameters:
finishReason
- the value for thefinishReason
record componentindex
- the value for theindex
record componentmessage
- the value for themessage
record componentmessages
- the value for themessages
record componentlogprobs
- the value for thelogprobs
record component
-
-
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)
. -
finishReason
Returns the value of thefinishReason
record component.- Returns:
- the value of the
finishReason
record component
-
index
Returns the value of theindex
record component.- Returns:
- the value of the
index
record component
-
message
Returns the value of themessage
record component.- Returns:
- the value of the
message
record component
-
messages
Returns the value of themessages
record component.- Returns:
- the value of the
messages
record component
-
logprobs
Returns the value of thelogprobs
record component.- Returns:
- the value of the
logprobs
record component
-