Class ChatCompletion
-
- All Implemented Interfaces:
public final class ChatCompletionRepresents a chat completion response returned by model, based on the provided input.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classChatCompletion.Builderpublic final classChatCompletion.Choicepublic final classChatCompletion.ServiceTierThe service tier used for processing the request.
-
Method Summary
Modifier and Type Method Description final Stringid()A unique identifier for the chat completion. final List<ChatCompletion.Choice>choices()A list of chat completion choices. final Longcreated()The Unix timestamp (in seconds) of when the chat completion was created. final Stringmodel()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 ChatCompletionvalidate()final ChatCompletion.BuildertoBuilder()Booleanequals(Object other)IntegerhashCode()StringtoString()final static ChatCompletion.Builderbuilder()-
-
Method Detail
-
choices
final List<ChatCompletion.Choice> choices()
A list of chat completion choices. Can be more than one if
nis 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
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<ChatCompletion.Choice>> _choices()
A list of chat completion choices. Can be more than one if
nis 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
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 ChatCompletion validate()
-
toBuilder
final ChatCompletion.Builder toBuilder()
-
builder
final static ChatCompletion.Builder builder()
-
-
-
-