Class Completion
-
- All Implemented Interfaces:
public final class Completion
Represents 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 class
Completion.Builder
A builder for Completion.
-
Method Summary
Modifier and Type Method Description final String
id()
A unique identifier for the completion. final List<CompletionChoice>
choices()
The list of completion choices the model generated for the input prompt. final Long
created()
The Unix timestamp (in seconds) of when the completion was created. final String
model()
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 Completion
validate()
final Completion.Builder
toBuilder()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static Completion.Builder
builder()
-
-
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
seed
request 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
seed
request 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()
-
-
-
-