Class Completion
-
- All Implemented Interfaces:
public final class CompletionRepresents a completion response from the API. Note: both the streamed and non-streamed response objects share the same shape (unlike the chat endpoint).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classCompletion.BuilderA builder for Completion.
-
Method Summary
Modifier and Type Method Description final Stringid()A unique identifier for the completion. final List<CompletionChoice>choices()The list of completion choices the model generated for the input prompt. final Longcreated()The Unix timestamp (in seconds) of when the completion was created. final Stringmodel()The model used for completion. final JsonValue_object_()The object type, which is always "text_completion" final Optional<String>systemFingerprint()This fingerprint represents the backend configuration that the model runs with. final Optional<CompletionUsage>usage()Usage statistics for the completion request. final JsonField<String>_id()A unique identifier for the completion. final JsonField<List<CompletionChoice>>_choices()The list of completion choices the model generated for the input prompt. final JsonField<Long>_created()The Unix timestamp (in seconds) of when the completion was created. final JsonField<String>_model()The model used for completion. final JsonField<String>_systemFingerprint()This fingerprint represents the backend configuration that the model runs with. final JsonField<CompletionUsage>_usage()Usage statistics for the completion request. final Map<String, JsonValue>_additionalProperties()final Completionvalidate()final Completion.BuildertoBuilder()Booleanequals(Object other)IntegerhashCode()StringtoString()final static Completion.Builderbuilder()-
-
Method Detail
-
choices
final List<CompletionChoice> choices()
The list of completion choices the model generated for the input prompt.
-
systemFingerprint
final Optional<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 Optional<CompletionUsage> usage()
Usage statistics for the completion request.
-
_choices
final JsonField<List<CompletionChoice>> _choices()
The list of completion choices the model generated for the input prompt.
-
_created
final JsonField<Long> _created()
The Unix timestamp (in seconds) of when the completion was created.
-
_systemFingerprint
final 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 JsonField<CompletionUsage> _usage()
Usage statistics for the completion request.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
validate
final Completion validate()
-
toBuilder
final Completion.Builder toBuilder()
-
builder
final static Completion.Builder builder()
-
-
-
-