Class ChatCompletionChunk.Choice
-
- All Implemented Interfaces:
public final class ChatCompletionChunk.Choice
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classChatCompletionChunk.Choice.BuilderA builder for Choice.
public final classChatCompletionChunk.Choice.DeltaA chat completion delta generated by streamed model responses.
public final classChatCompletionChunk.Choice.FinishReasonThe reason the model stopped generating tokens. This will be
stopif the model hit a natural stop point or a provided stop sequence,lengthif the maximum number of tokens specified in the request was reached,content_filterif content was omitted due to a flag from our content filters,tool_callsif the model called a tool, orfunction_call(deprecated) if the model called a function.public final classChatCompletionChunk.Choice.LogprobsLog probability information for the choice.
-
Method Summary
Modifier and Type Method Description final ChatCompletionChunk.Choice.Deltadelta()A chat completion delta generated by streamed model responses. final Optional<ChatCompletionChunk.Choice.FinishReason>finishReason()The reason the model stopped generating tokens. final Longindex()The index of the choice in the list of choices. final Optional<ChatCompletionChunk.Choice.Logprobs>logprobs()Log probability information for the choice. final JsonField<ChatCompletionChunk.Choice.Delta>_delta()Returns the raw JSON value of delta. final JsonField<ChatCompletionChunk.Choice.FinishReason>_finishReason()Returns the raw JSON value of finishReason. final JsonField<Long>_index()Returns the raw JSON value of index. final JsonField<ChatCompletionChunk.Choice.Logprobs>_logprobs()Returns the raw JSON value of logprobs. final Map<String, JsonValue>_additionalProperties()final ChatCompletionChunk.Choice.BuildertoBuilder()final ChatCompletionChunk.Choicevalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static ChatCompletionChunk.Choice.Builderbuilder()Returns a mutable builder for constructing an instance of Choice. -
-
Method Detail
-
delta
final ChatCompletionChunk.Choice.Delta delta()
A chat completion delta generated by streamed model responses.
-
finishReason
final Optional<ChatCompletionChunk.Choice.FinishReason> finishReason()
The reason the model stopped generating tokens. This will be
stopif the model hit a natural stop point or a provided stop sequence,lengthif the maximum number of tokens specified in the request was reached,content_filterif content was omitted due to a flag from our content filters,tool_callsif the model called a tool, orfunction_call(deprecated) if the model called a function.
-
logprobs
final Optional<ChatCompletionChunk.Choice.Logprobs> logprobs()
Log probability information for the choice.
-
_delta
final JsonField<ChatCompletionChunk.Choice.Delta> _delta()
Returns the raw JSON value of delta.
Unlike delta, this method doesn't throw if the JSON field has an unexpected type.
-
_finishReason
final JsonField<ChatCompletionChunk.Choice.FinishReason> _finishReason()
Returns the raw JSON value of finishReason.
Unlike finishReason, this method doesn't throw if the JSON field has an unexpected type.
-
_index
final JsonField<Long> _index()
Returns the raw JSON value of index.
Unlike index, this method doesn't throw if the JSON field has an unexpected type.
-
_logprobs
final JsonField<ChatCompletionChunk.Choice.Logprobs> _logprobs()
Returns the raw JSON value of logprobs.
Unlike logprobs, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final ChatCompletionChunk.Choice.Builder toBuilder()
-
validate
final ChatCompletionChunk.Choice validate()
-
builder
final static ChatCompletionChunk.Choice.Builder builder()
Returns a mutable builder for constructing an instance of Choice.
The following fields are required:
.delta() .finishReason() .index()
-
-
-
-