Class CreateChatCompletionResponseChoicesInner
java.lang.Object
com.sap.ai.sdk.foundationmodels.openai.generated.model.CreateChatCompletionResponseChoicesInner
CreateChatCompletionResponseChoicesInner
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe reason the model stopped generating tokens. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncontentFilterResults(ContentFilterChoiceResults contentFilterResults) Set the contentFilterResults of thisCreateChatCompletionResponseChoicesInnerinstance and return the same instance.booleanSet the finishReason of thisCreateChatCompletionResponseChoicesInnerinstance and return the same instance.Get contentFilterResultsgetCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theCreateChatCompletionResponseChoicesInner.The reason the model stopped generating tokens.getIndex()The index of the choice in the list of choices.Get logprobsGet messageinthashCode()Set the index of thisCreateChatCompletionResponseChoicesInnerinstance and return the same instance.Set the logprobs of thisCreateChatCompletionResponseChoicesInnerinstance and return the same instance.message(ChatCompletionResponseMessage message) Set the message of thisCreateChatCompletionResponseChoicesInnerinstance and return the same instance.voidsetContentFilterResults(ContentFilterChoiceResults contentFilterResults) Set the contentFilterResults of thisCreateChatCompletionResponseChoicesInnerinstance.voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisCreateChatCompletionResponseChoicesInnerinstance.voidSet the finishReason of thisCreateChatCompletionResponseChoicesInnerinstance.voidSet the index of thisCreateChatCompletionResponseChoicesInnerinstance.voidSet the logprobs of thisCreateChatCompletionResponseChoicesInnerinstance.voidsetMessage(ChatCompletionResponseMessage message) Set the message of thisCreateChatCompletionResponseChoicesInnerinstance.toMap()Get the value of all properties of thisCreateChatCompletionResponseChoicesInnerinstance including unrecognized properties.toString()
-
Constructor Details
-
CreateChatCompletionResponseChoicesInner
public CreateChatCompletionResponseChoicesInner()
-
-
Method Details
-
finishReason
@Nonnull public CreateChatCompletionResponseChoicesInner finishReason(@Nonnull CreateChatCompletionResponseChoicesInner.FinishReasonEnum finishReason) Set the finishReason of thisCreateChatCompletionResponseChoicesInnerinstance and return the same instance.- Parameters:
finishReason- The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, `length` if the maximum number of tokens specified in the request was reached, `content_filter` if content was omitted due to a flag from our content filters, `tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.- Returns:
- The same instance of this
CreateChatCompletionResponseChoicesInnerclass
-
getFinishReason
The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, `length` if the maximum number of tokens specified in the request was reached, `content_filter` if content was omitted due to a flag from our content filters, `tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.- Returns:
- finishReason The finishReason of this
CreateChatCompletionResponseChoicesInnerinstance.
-
setFinishReason
public void setFinishReason(@Nonnull CreateChatCompletionResponseChoicesInner.FinishReasonEnum finishReason) Set the finishReason of thisCreateChatCompletionResponseChoicesInnerinstance.- Parameters:
finishReason- The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, `length` if the maximum number of tokens specified in the request was reached, `content_filter` if content was omitted due to a flag from our content filters, `tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.
-
index
Set the index of thisCreateChatCompletionResponseChoicesInnerinstance and return the same instance.- Parameters:
index- The index of the choice in the list of choices.- Returns:
- The same instance of this
CreateChatCompletionResponseChoicesInnerclass
-
getIndex
The index of the choice in the list of choices.- Returns:
- index The index of this
CreateChatCompletionResponseChoicesInnerinstance.
-
setIndex
Set the index of thisCreateChatCompletionResponseChoicesInnerinstance.- Parameters:
index- The index of the choice in the list of choices.
-
message
@Nonnull public CreateChatCompletionResponseChoicesInner message(@Nonnull ChatCompletionResponseMessage message) Set the message of thisCreateChatCompletionResponseChoicesInnerinstance and return the same instance.- Parameters:
message- The message of thisCreateChatCompletionResponseChoicesInner- Returns:
- The same instance of this
CreateChatCompletionResponseChoicesInnerclass
-
getMessage
Get message- Returns:
- message The message of this
CreateChatCompletionResponseChoicesInnerinstance.
-
setMessage
Set the message of thisCreateChatCompletionResponseChoicesInnerinstance.- Parameters:
message- The message of thisCreateChatCompletionResponseChoicesInner
-
contentFilterResults
@Nonnull public CreateChatCompletionResponseChoicesInner contentFilterResults(@Nullable ContentFilterChoiceResults contentFilterResults) Set the contentFilterResults of thisCreateChatCompletionResponseChoicesInnerinstance and return the same instance.- Parameters:
contentFilterResults- The contentFilterResults of thisCreateChatCompletionResponseChoicesInner- Returns:
- The same instance of this
CreateChatCompletionResponseChoicesInnerclass
-
getContentFilterResults
Get contentFilterResults- Returns:
- contentFilterResults The contentFilterResults of this
CreateChatCompletionResponseChoicesInnerinstance.
-
setContentFilterResults
Set the contentFilterResults of thisCreateChatCompletionResponseChoicesInnerinstance.- Parameters:
contentFilterResults- The contentFilterResults of thisCreateChatCompletionResponseChoicesInner
-
logprobs
@Nonnull public CreateChatCompletionResponseChoicesInner logprobs(@Nullable CreateChatCompletionResponseChoicesInnerLogprobs logprobs) Set the logprobs of thisCreateChatCompletionResponseChoicesInnerinstance and return the same instance.- Parameters:
logprobs- The logprobs of thisCreateChatCompletionResponseChoicesInner- Returns:
- The same instance of this
CreateChatCompletionResponseChoicesInnerclass
-
getLogprobs
Get logprobs- Returns:
- logprobs The logprobs of this
CreateChatCompletionResponseChoicesInnerinstance.
-
setLogprobs
Set the logprobs of thisCreateChatCompletionResponseChoicesInnerinstance.- Parameters:
logprobs- The logprobs of thisCreateChatCompletionResponseChoicesInner
-
getCustomFieldNames
Get the names of the unrecognizable properties of theCreateChatCompletionResponseChoicesInner.- 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 thisCreateChatCompletionResponseChoicesInnerinstance.- 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 thisCreateChatCompletionResponseChoicesInnerinstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisCreateChatCompletionResponseChoicesInnerinstance. 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
-
toMap()instead.