Class Completion.Builder
-
- All Implemented Interfaces:
public final class Completion.Builder
-
-
Constructor Summary
Constructors Constructor Description Completion.Builder()
-
Method Summary
Modifier and Type Method Description final Completion.Builder
id(String id)
A unique identifier for the completion. final Completion.Builder
id(JsonField<String> id)
A unique identifier for the completion. final Completion.Builder
choices(List<CompletionChoice> choices)
The list of completion choices the model generated for the input prompt. final Completion.Builder
choices(JsonField<List<CompletionChoice>> choices)
The list of completion choices the model generated for the input prompt. final Completion.Builder
addChoice(CompletionChoice choice)
The list of completion choices the model generated for the input prompt. final Completion.Builder
created(Long created)
The Unix timestamp (in seconds) of when the completion was created. final Completion.Builder
created(JsonField<Long> created)
The Unix timestamp (in seconds) of when the completion was created. final Completion.Builder
model(String model)
The model used for completion. final Completion.Builder
model(JsonField<String> model)
The model used for completion. final Completion.Builder
object_(JsonValue object_)
The object type, which is always "text_completion" final Completion.Builder
systemFingerprint(String systemFingerprint)
This fingerprint represents the backend configuration that the model runs with. final Completion.Builder
systemFingerprint(JsonField<String> systemFingerprint)
This fingerprint represents the backend configuration that the model runs with. final Completion.Builder
usage(CompletionUsage usage)
Usage statistics for the completion request. final Completion.Builder
usage(JsonField<CompletionUsage> usage)
Usage statistics for the completion request. final Completion.Builder
additionalProperties(Map<String, JsonValue> additionalProperties)
final Completion.Builder
putAdditionalProperty(String key, JsonValue value)
final Completion.Builder
putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
final Completion.Builder
removeAdditionalProperty(String key)
final Completion.Builder
removeAllAdditionalProperties(Set<String> keys)
final Completion
build()
-
-
Method Detail
-
id
final Completion.Builder id(String id)
A unique identifier for the completion.
-
id
final Completion.Builder id(JsonField<String> id)
A unique identifier for the completion.
-
choices
final Completion.Builder choices(List<CompletionChoice> choices)
The list of completion choices the model generated for the input prompt.
-
choices
final Completion.Builder choices(JsonField<List<CompletionChoice>> choices)
The list of completion choices the model generated for the input prompt.
-
addChoice
final Completion.Builder addChoice(CompletionChoice choice)
The list of completion choices the model generated for the input prompt.
-
created
final Completion.Builder created(Long created)
The Unix timestamp (in seconds) of when the completion was created.
-
created
final Completion.Builder created(JsonField<Long> created)
The Unix timestamp (in seconds) of when the completion was created.
-
model
final Completion.Builder model(String model)
The model used for completion.
-
model
final Completion.Builder model(JsonField<String> model)
The model used for completion.
-
object_
final Completion.Builder object_(JsonValue object_)
The object type, which is always "text_completion"
-
systemFingerprint
final Completion.Builder systemFingerprint(String systemFingerprint)
This fingerprint represents the backend configuration that the model runs with.
Can be used in conjunction with the
seed
request parameter to understand when backend changes have been made that might impact determinism.
-
systemFingerprint
final Completion.Builder systemFingerprint(JsonField<String> systemFingerprint)
This fingerprint represents the backend configuration that the model runs with.
Can be used in conjunction with the
seed
request parameter to understand when backend changes have been made that might impact determinism.
-
usage
final Completion.Builder usage(CompletionUsage usage)
Usage statistics for the completion request.
-
usage
final Completion.Builder usage(JsonField<CompletionUsage> usage)
Usage statistics for the completion request.
-
additionalProperties
final Completion.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final Completion.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final Completion.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final Completion.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final Completion.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final Completion build()
-
-
-
-