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