Class ChatCompletion
-
- All Implemented Interfaces:
public final class ChatCompletion
Represents a chat completion response returned by model, based on the provided input.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
ChatCompletion.Builder
A builder for ChatCompletion.
public final class
ChatCompletion.Choice
public final class
ChatCompletion.ServiceTier
The service tier used for processing the request.
-
Method Summary
Modifier and Type Method Description final String
id()
A unique identifier for the chat completion. final List<ChatCompletion.Choice>
choices()
A list of chat completion choices. final Long
created()
The Unix timestamp (in seconds) of when the chat completion was created. final String
model()
The model used for the chat completion. final JsonValue
_object_()
The object type, which is always chat.completion
.final Optional<ChatCompletion.ServiceTier>
serviceTier()
The service tier used for processing the request. 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 chat completion. final JsonField<List<ChatCompletion.Choice>>
_choices()
A list of chat completion choices. final JsonField<Long>
_created()
The Unix timestamp (in seconds) of when the chat completion was created. final JsonField<String>
_model()
The model used for the chat completion. final JsonField<ChatCompletion.ServiceTier>
_serviceTier()
The service tier used for processing the request. 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 ChatCompletion
validate()
final ChatCompletion.Builder
toBuilder()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static ChatCompletion.Builder
builder()
-
-
Method Detail
-
choices
final List<ChatCompletion.Choice> choices()
A list of chat completion choices. Can be more than one if
n
is greater than 1.
-
created
final Long created()
The Unix timestamp (in seconds) of when the chat completion was created.
-
serviceTier
final Optional<ChatCompletion.ServiceTier> serviceTier()
The service tier used for processing the request.
-
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<ChatCompletion.Choice>> _choices()
A list of chat completion choices. Can be more than one if
n
is greater than 1.
-
_created
final JsonField<Long> _created()
The Unix timestamp (in seconds) of when the chat completion was created.
-
_serviceTier
final JsonField<ChatCompletion.ServiceTier> _serviceTier()
The service tier used for processing the request.
-
_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 ChatCompletion validate()
-
toBuilder
final ChatCompletion.Builder toBuilder()
-
builder
final static ChatCompletion.Builder builder()
-
-
-
-