Class CompletionChoice.Builder
-
- All Implemented Interfaces:
public final class CompletionChoice.Builder
A builder for CompletionChoice.
-
-
Method Summary
-
-
Method Detail
-
finishReason
final CompletionChoice.Builder finishReason(CompletionChoice.FinishReason finishReason)
The reason the model stopped generating tokens. This will be
stop
if the model hit a natural stop point or a provided stop sequence,length
if the maximum number of tokens specified in the request was reached, orcontent_filter
if content was omitted due to a flag from our content filters.
-
finishReason
final CompletionChoice.Builder finishReason(JsonField<CompletionChoice.FinishReason> finishReason)
Sets Builder.finishReason to an arbitrary JSON value.
You should usually call Builder.finishReason with a well-typed FinishReason value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
index
final CompletionChoice.Builder index(Long index)
-
index
final CompletionChoice.Builder index(JsonField<Long> index)
Sets Builder.index to an arbitrary JSON value.
You should usually call Builder.index with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
logprobs
final CompletionChoice.Builder logprobs(CompletionChoice.Logprobs logprobs)
-
logprobs
final CompletionChoice.Builder logprobs(Optional<CompletionChoice.Logprobs> logprobs)
Alias for calling Builder.logprobs with
logprobs.orElse(null)
.
-
logprobs
final CompletionChoice.Builder logprobs(JsonField<CompletionChoice.Logprobs> logprobs)
Sets Builder.logprobs to an arbitrary JSON value.
You should usually call Builder.logprobs with a well-typed Logprobs value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
text
final CompletionChoice.Builder text(String text)
-
text
final CompletionChoice.Builder text(JsonField<String> text)
Sets Builder.text to an arbitrary JSON value.
You should usually call Builder.text with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final CompletionChoice.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final CompletionChoice.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final CompletionChoice.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final CompletionChoice.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final CompletionChoice.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final CompletionChoice build()
Returns an immutable instance of CompletionChoice.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.finishReason() .index() .logprobs() .text()
-
-
-
-