Class ChatCompletion.Choice.Builder
-
- All Implemented Interfaces:
public final class ChatCompletion.Choice.Builder
A builder for Choice.
-
-
Method Summary
-
-
Method Detail
-
finishReason
final ChatCompletion.Choice.Builder finishReason(ChatCompletion.Choice.FinishReason 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, orfunction_call
(deprecated) if the model called a function.
-
finishReason
final ChatCompletion.Choice.Builder finishReason(JsonField<ChatCompletion.Choice.FinishReason> 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, orfunction_call
(deprecated) if the model called a function.
-
index
final ChatCompletion.Choice.Builder index(Long index)
The index of the choice in the list of choices.
-
index
final ChatCompletion.Choice.Builder index(JsonField<Long> index)
The index of the choice in the list of choices.
-
logprobs
final ChatCompletion.Choice.Builder logprobs(ChatCompletion.Choice.Logprobs logprobs)
Log probability information for the choice.
-
logprobs
final ChatCompletion.Choice.Builder logprobs(Optional<ChatCompletion.Choice.Logprobs> logprobs)
Log probability information for the choice.
-
logprobs
final ChatCompletion.Choice.Builder logprobs(JsonField<ChatCompletion.Choice.Logprobs> logprobs)
Log probability information for the choice.
-
message
final ChatCompletion.Choice.Builder message(ChatCompletionMessage message)
A chat completion message generated by the model.
-
message
final ChatCompletion.Choice.Builder message(JsonField<ChatCompletionMessage> message)
A chat completion message generated by the model.
-
additionalProperties
final ChatCompletion.Choice.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final ChatCompletion.Choice.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final ChatCompletion.Choice.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final ChatCompletion.Choice.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final ChatCompletion.Choice.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final ChatCompletion.Choice build()
-
-
-
-