Record Class DashScopeApiSpec.ChatCompletionOutput
java.lang.Object
java.lang.Record
com.alibaba.cloud.ai.dashscope.spec.DashScopeApiSpec.ChatCompletionOutput
- Record Components:
text- chat completion text if result format is text.choices- A list of chat completion choices. Can be more than one if n is greater than 1. used in conjunction with the seed request parameter to understand when backend changes have been made that might impact determinism.
- Enclosing class:
- DashScopeApiSpec
public static record DashScopeApiSpec.ChatCompletionOutput(String text, List<DashScopeApiSpec.ChatCompletionOutput.Choice> choices, DashScopeApiSpec.SearchInfo searchInfo)
extends Record
Represents a chat completion response returned by model, based on the provided
input.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordChat completion choice. -
Constructor Summary
ConstructorsConstructorDescriptionChatCompletionOutput(String text, List<DashScopeApiSpec.ChatCompletionOutput.Choice> choices, DashScopeApiSpec.SearchInfo searchInfo) Creates an instance of aChatCompletionOutputrecord class. -
Method Summary
Modifier and TypeMethodDescriptionchoices()Returns the value of thechoicesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thesearchInforecord component.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ChatCompletionOutput
public ChatCompletionOutput(String text, List<DashScopeApiSpec.ChatCompletionOutput.Choice> choices, DashScopeApiSpec.SearchInfo searchInfo) Creates an instance of aChatCompletionOutputrecord 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). -
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
choices
Returns the value of thechoicesrecord component.- Returns:
- the value of the
choicesrecord component
-
searchInfo
Returns the value of thesearchInforecord component.- Returns:
- the value of the
searchInforecord component
-