Class ChatCompletion.Builder
-
- All Implemented Interfaces:
public final class ChatCompletion.Builder
-
-
Constructor Summary
Constructors Constructor Description ChatCompletion.Builder()
-
Method Summary
Modifier and Type Method Description final ChatCompletion.Builderid(String id)A unique identifier for the chat completion. final ChatCompletion.Builderid(JsonField<String> id)A unique identifier for the chat completion. final ChatCompletion.Builderchoices(List<ChatCompletion.Choice> choices)A list of chat completion choices. final ChatCompletion.Builderchoices(JsonField<List<ChatCompletion.Choice>> choices)A list of chat completion choices. final ChatCompletion.BuilderaddChoice(ChatCompletion.Choice choice)A list of chat completion choices. final ChatCompletion.Buildercreated(Long created)The Unix timestamp (in seconds) of when the chat completion was created. final ChatCompletion.Buildercreated(JsonField<Long> created)The Unix timestamp (in seconds) of when the chat completion was created. final ChatCompletion.Buildermodel(String model)The model used for the chat completion. final ChatCompletion.Buildermodel(JsonField<String> model)The model used for the chat completion. final ChatCompletion.Builderobject_(JsonValue object_)The object type, which is always chat.completion.final ChatCompletion.BuilderserviceTier(ChatCompletion.ServiceTier serviceTier)The service tier used for processing the request. final ChatCompletion.BuilderserviceTier(Optional<ChatCompletion.ServiceTier> serviceTier)The service tier used for processing the request. final ChatCompletion.BuilderserviceTier(JsonField<ChatCompletion.ServiceTier> serviceTier)The service tier used for processing the request. final ChatCompletion.BuildersystemFingerprint(String systemFingerprint)This fingerprint represents the backend configuration that the model runs with. final ChatCompletion.BuildersystemFingerprint(JsonField<String> systemFingerprint)This fingerprint represents the backend configuration that the model runs with. final ChatCompletion.Builderusage(CompletionUsage usage)Usage statistics for the completion request. final ChatCompletion.Builderusage(JsonField<CompletionUsage> usage)Usage statistics for the completion request. final ChatCompletion.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final ChatCompletion.BuilderputAdditionalProperty(String key, JsonValue value)final ChatCompletion.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final ChatCompletion.BuilderremoveAdditionalProperty(String key)final ChatCompletion.BuilderremoveAllAdditionalProperties(Set<String> keys)final ChatCompletionbuild()-
-
Method Detail
-
id
final ChatCompletion.Builder id(String id)
A unique identifier for the chat completion.
-
id
final ChatCompletion.Builder id(JsonField<String> id)
A unique identifier for the chat completion.
-
choices
final ChatCompletion.Builder choices(List<ChatCompletion.Choice> choices)
A list of chat completion choices. Can be more than one if
nis greater than 1.
-
choices
final ChatCompletion.Builder choices(JsonField<List<ChatCompletion.Choice>> choices)
A list of chat completion choices. Can be more than one if
nis greater than 1.
-
addChoice
final ChatCompletion.Builder addChoice(ChatCompletion.Choice choice)
A list of chat completion choices. Can be more than one if
nis greater than 1.
-
created
final ChatCompletion.Builder created(Long created)
The Unix timestamp (in seconds) of when the chat completion was created.
-
created
final ChatCompletion.Builder created(JsonField<Long> created)
The Unix timestamp (in seconds) of when the chat completion was created.
-
model
final ChatCompletion.Builder model(String model)
The model used for the chat completion.
-
model
final ChatCompletion.Builder model(JsonField<String> model)
The model used for the chat completion.
-
object_
final ChatCompletion.Builder object_(JsonValue object_)
The object type, which is always
chat.completion.
-
serviceTier
final ChatCompletion.Builder serviceTier(ChatCompletion.ServiceTier serviceTier)
The service tier used for processing the request.
-
serviceTier
final ChatCompletion.Builder serviceTier(Optional<ChatCompletion.ServiceTier> serviceTier)
The service tier used for processing the request.
-
serviceTier
final ChatCompletion.Builder serviceTier(JsonField<ChatCompletion.ServiceTier> serviceTier)
The service tier used for processing the request.
-
systemFingerprint
final ChatCompletion.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 ChatCompletion.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 ChatCompletion.Builder usage(CompletionUsage usage)
Usage statistics for the completion request.
-
usage
final ChatCompletion.Builder usage(JsonField<CompletionUsage> usage)
Usage statistics for the completion request.
-
additionalProperties
final ChatCompletion.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final ChatCompletion.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final ChatCompletion.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final ChatCompletion.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final ChatCompletion.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final ChatCompletion build()
-
-
-
-