Class Completion
-
- All Implemented Interfaces:
public final class Completion
-
-
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()Unique object identifier. final Stringcompletion()The resulting completion up to and excluding the stop sequences. final Modelmodel()The model that will complete your prompt. final Optional<String>stopReason()The reason that we stopped. final JsonValue_type()Object type. final JsonField<String>_id()Returns the raw JSON value of id. final JsonField<String>_completion()Returns the raw JSON value of completion. final JsonField<Model>_model()Returns the raw JSON value of model. final JsonField<String>_stopReason()Returns the raw JSON value of stopReason. final Map<String, JsonValue>_additionalProperties()final Completion.BuildertoBuilder()final Completionvalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static Completion.Builderbuilder()Returns a mutable builder for constructing an instance of Completion. -
-
Method Detail
-
completion
final String completion()
The resulting completion up to and excluding the stop sequences.
-
model
final Model model()
The model that will complete your prompt.\n\nSee models for additional details and options.
-
stopReason
final Optional<String> stopReason()
The reason that we stopped.
This may be one the following values:
"stop_sequence": we reached a stop sequence — either provided by you via thestop_sequencesparameter, or a stop sequence built into the model"max_tokens": we exceededmax_tokens_to_sampleor the model's maximum
-
_type
final JsonValue _type()
Object type.
For Text Completions, this is always
"completion".Expected to always return the following:
JsonValue.from("completion")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_id
final JsonField<String> _id()
Returns the raw JSON value of id.
Unlike id, this method doesn't throw if the JSON field has an unexpected type.
-
_completion
final JsonField<String> _completion()
Returns the raw JSON value of completion.
Unlike completion, this method doesn't throw if the JSON field has an unexpected type.
-
_model
final JsonField<Model> _model()
Returns the raw JSON value of model.
Unlike model, this method doesn't throw if the JSON field has an unexpected type.
-
_stopReason
final JsonField<String> _stopReason()
Returns the raw JSON value of stopReason.
Unlike stopReason, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final Completion.Builder toBuilder()
-
validate
final Completion validate()
-
builder
final static Completion.Builder builder()
Returns a mutable builder for constructing an instance of Completion.
The following fields are required:
.id() .completion() .model() .stopReason()
-
-
-
-