Class ChatCompletionChunk.Builder
-
- All Implemented Interfaces:
public final class ChatCompletionChunk.Builder
-
-
Constructor Summary
Constructors Constructor Description ChatCompletionChunk.Builder()
-
Method Summary
Modifier and Type Method Description final ChatCompletionChunk.Builderid(String id)A unique identifier for the chat completion. final ChatCompletionChunk.Builderid(JsonField<String> id)A unique identifier for the chat completion. final ChatCompletionChunk.Builderchoices(List<ChatCompletionChunk.Choice> choices)A list of chat completion choices. final ChatCompletionChunk.Builderchoices(JsonField<List<ChatCompletionChunk.Choice>> choices)A list of chat completion choices. final ChatCompletionChunk.BuilderaddChoice(ChatCompletionChunk.Choice choice)A list of chat completion choices. final ChatCompletionChunk.Buildercreated(Long created)The Unix timestamp (in seconds) of when the chat completion was created. final ChatCompletionChunk.Buildercreated(JsonField<Long> created)The Unix timestamp (in seconds) of when the chat completion was created. final ChatCompletionChunk.Buildermodel(String model)The model to generate the completion. final ChatCompletionChunk.Buildermodel(JsonField<String> model)The model to generate the completion. final ChatCompletionChunk.Builderobject_(JsonValue object_)The object type, which is always chat.completion.chunk.final ChatCompletionChunk.BuilderserviceTier(ChatCompletionChunk.ServiceTier serviceTier)The service tier used for processing the request. final ChatCompletionChunk.BuilderserviceTier(Optional<ChatCompletionChunk.ServiceTier> serviceTier)The service tier used for processing the request. final ChatCompletionChunk.BuilderserviceTier(JsonField<ChatCompletionChunk.ServiceTier> serviceTier)The service tier used for processing the request. final ChatCompletionChunk.BuildersystemFingerprint(String systemFingerprint)This fingerprint represents the backend configuration that the model runs with. final ChatCompletionChunk.BuildersystemFingerprint(JsonField<String> systemFingerprint)This fingerprint represents the backend configuration that the model runs with. final ChatCompletionChunk.Builderusage(CompletionUsage usage)An optional field that will only be present when you set stream_options: {"include_usage": true}in your request.final ChatCompletionChunk.Builderusage(Optional<CompletionUsage> usage)An optional field that will only be present when you set stream_options: {"include_usage": true}in your request.final ChatCompletionChunk.Builderusage(JsonField<CompletionUsage> usage)An optional field that will only be present when you set stream_options: {"include_usage": true}in your request.final ChatCompletionChunk.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final ChatCompletionChunk.BuilderputAdditionalProperty(String key, JsonValue value)final ChatCompletionChunk.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final ChatCompletionChunk.BuilderremoveAdditionalProperty(String key)final ChatCompletionChunk.BuilderremoveAllAdditionalProperties(Set<String> keys)final ChatCompletionChunkbuild()-
-
Method Detail
-
id
final ChatCompletionChunk.Builder id(String id)
A unique identifier for the chat completion. Each chunk has the same ID.
-
id
final ChatCompletionChunk.Builder id(JsonField<String> id)
A unique identifier for the chat completion. Each chunk has the same ID.
-
choices
final ChatCompletionChunk.Builder choices(List<ChatCompletionChunk.Choice> choices)
A list of chat completion choices. Can contain more than one elements if
nis greater than 1. Can also be empty for the last chunk if you setstream_options: {"include_usage": true}.
-
choices
final ChatCompletionChunk.Builder choices(JsonField<List<ChatCompletionChunk.Choice>> choices)
A list of chat completion choices. Can contain more than one elements if
nis greater than 1. Can also be empty for the last chunk if you setstream_options: {"include_usage": true}.
-
addChoice
final ChatCompletionChunk.Builder addChoice(ChatCompletionChunk.Choice choice)
A list of chat completion choices. Can contain more than one elements if
nis greater than 1. Can also be empty for the last chunk if you setstream_options: {"include_usage": true}.
-
created
final ChatCompletionChunk.Builder created(Long created)
The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.
-
created
final ChatCompletionChunk.Builder created(JsonField<Long> created)
The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.
-
model
final ChatCompletionChunk.Builder model(String model)
The model to generate the completion.
-
model
final ChatCompletionChunk.Builder model(JsonField<String> model)
The model to generate the completion.
-
object_
final ChatCompletionChunk.Builder object_(JsonValue object_)
The object type, which is always
chat.completion.chunk.
-
serviceTier
final ChatCompletionChunk.Builder serviceTier(ChatCompletionChunk.ServiceTier serviceTier)
The service tier used for processing the request.
-
serviceTier
final ChatCompletionChunk.Builder serviceTier(Optional<ChatCompletionChunk.ServiceTier> serviceTier)
The service tier used for processing the request.
-
serviceTier
final ChatCompletionChunk.Builder serviceTier(JsonField<ChatCompletionChunk.ServiceTier> serviceTier)
The service tier used for processing the request.
-
systemFingerprint
final ChatCompletionChunk.Builder systemFingerprint(String systemFingerprint)
This fingerprint represents the backend configuration that the model runs with. Can be used in conjunction with the
seedrequest parameter to understand when backend changes have been made that might impact determinism.
-
systemFingerprint
final ChatCompletionChunk.Builder systemFingerprint(JsonField<String> systemFingerprint)
This fingerprint represents the backend configuration that the model runs with. Can be used in conjunction with the
seedrequest parameter to understand when backend changes have been made that might impact determinism.
-
usage
final ChatCompletionChunk.Builder usage(CompletionUsage usage)
An optional field that will only be present when you set
stream_options: {"include_usage": true}in your request. When present, it contains a null value except for the last chunk which contains the token usage statistics for the entire request.
-
usage
final ChatCompletionChunk.Builder usage(Optional<CompletionUsage> usage)
An optional field that will only be present when you set
stream_options: {"include_usage": true}in your request. When present, it contains a null value except for the last chunk which contains the token usage statistics for the entire request.
-
usage
final ChatCompletionChunk.Builder usage(JsonField<CompletionUsage> usage)
An optional field that will only be present when you set
stream_options: {"include_usage": true}in your request. When present, it contains a null value except for the last chunk which contains the token usage statistics for the entire request.
-
additionalProperties
final ChatCompletionChunk.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final ChatCompletionChunk.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final ChatCompletionChunk.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final ChatCompletionChunk.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final ChatCompletionChunk.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final ChatCompletionChunk build()
-
-
-
-