Class ChoiceLogprobs
java.lang.Object
com.sap.ai.sdk.orchestration.model.ChoiceLogprobs
Log probabilities for the choice.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddContentItem(ChatCompletionTokenLogprob contentItem) Add one content instance to thisChoiceLogprobs.addRefusalItem(ChatCompletionTokenLogprob refusalItem) Add one refusal instance to thisChoiceLogprobs.content(List<ChatCompletionTokenLogprob> content) Set the content of thisChoiceLogprobsinstance and return the same instance.static ChoiceLogprobscreate()Create a newChoiceLogprobsinstance.booleanA list of message content tokens with log probability information.getCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theChoiceLogprobs.A list of message refusal tokens with log probability information.inthashCode()refusal(List<ChatCompletionTokenLogprob> refusal) Set the refusal of thisChoiceLogprobsinstance and return the same instance.voidsetContent(List<ChatCompletionTokenLogprob> content) Set the content of thisChoiceLogprobsinstance.voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisChoiceLogprobsinstance.voidsetRefusal(List<ChatCompletionTokenLogprob> refusal) Set the refusal of thisChoiceLogprobsinstance.toMap()Get the value of all properties of thisChoiceLogprobsinstance including unrecognized properties.toString()
-
Constructor Details
-
ChoiceLogprobs
protected ChoiceLogprobs()Default constructor for ChoiceLogprobs.
-
-
Method Details
-
content
Set the content of thisChoiceLogprobsinstance and return the same instance.- Parameters:
content- A list of message content tokens with log probability information.- Returns:
- The same instance of this
ChoiceLogprobsclass
-
addContentItem
Add one content instance to thisChoiceLogprobs.- Parameters:
contentItem- The content that should be added- Returns:
- The same instance of type
ChoiceLogprobs
-
getContent
A list of message content tokens with log probability information.- Returns:
- content The content of this
ChoiceLogprobsinstance.
-
setContent
Set the content of thisChoiceLogprobsinstance.- Parameters:
content- A list of message content tokens with log probability information.
-
refusal
Set the refusal of thisChoiceLogprobsinstance and return the same instance.- Parameters:
refusal- A list of message refusal tokens with log probability information.- Returns:
- The same instance of this
ChoiceLogprobsclass
-
addRefusalItem
Add one refusal instance to thisChoiceLogprobs.- Parameters:
refusalItem- The refusal that should be added- Returns:
- The same instance of type
ChoiceLogprobs
-
getRefusal
A list of message refusal tokens with log probability information.- Returns:
- refusal The refusal of this
ChoiceLogprobsinstance.
-
setRefusal
Set the refusal of thisChoiceLogprobsinstance.- Parameters:
refusal- A list of message refusal tokens with log probability information.
-
getCustomFieldNames
Get the names of the unrecognizable properties of theChoiceLogprobs.- Returns:
- The set of properties names
-
getCustomField
@Nullable @Deprecated public Object getCustomField(@Nonnull String name) throws NoSuchElementException Deprecated.UsetoMap()instead.Get the value of an unrecognizable property of thisChoiceLogprobsinstance.- Parameters:
name- The name of the property- Returns:
- The value of the property
- Throws:
NoSuchElementException- If no property with the given name could be found.
-
toMap
Get the value of all properties of thisChoiceLogprobsinstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisChoiceLogprobsinstance. If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Parameters:
customFieldName- The name of the propertycustomFieldValue- The value of the property
-
equals
-
hashCode
public int hashCode() -
toString
-
create
Create a newChoiceLogprobsinstance. No arguments are required.
-
toMap()instead.