Class ChatCompletionTokenLogprob.Builder
-
- All Implemented Interfaces:
public final class ChatCompletionTokenLogprob.Builder
A builder for ChatCompletionTokenLogprob.
-
-
Method Summary
-
-
Method Detail
-
token
final ChatCompletionTokenLogprob.Builder token(String token)
The token.
-
token
final ChatCompletionTokenLogprob.Builder token(JsonField<String> token)
Sets Builder.token to an arbitrary JSON value.
You should usually call Builder.token with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
bytes
final ChatCompletionTokenLogprob.Builder bytes(List<Long> bytes)
A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be
null
if there is no bytes representation for the token.
-
bytes
final ChatCompletionTokenLogprob.Builder bytes(Optional<List<Long>> bytes)
Alias for calling Builder.bytes with
bytes.orElse(null)
.
-
bytes
final ChatCompletionTokenLogprob.Builder bytes(JsonField<List<Long>> bytes)
Sets Builder.bytes to an arbitrary JSON value.
You should usually call Builder.bytes with a well-typed
List<Long>
value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addByte
final ChatCompletionTokenLogprob.Builder addByte(Long byte_)
-
logprob
final ChatCompletionTokenLogprob.Builder logprob(Double logprob)
The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value
-9999.0
is used to signify that the token is very unlikely.
-
logprob
final ChatCompletionTokenLogprob.Builder logprob(JsonField<Double> logprob)
Sets Builder.logprob to an arbitrary JSON value.
You should usually call Builder.logprob with a well-typed Double value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
topLogprobs
final ChatCompletionTokenLogprob.Builder topLogprobs(List<ChatCompletionTokenLogprob.TopLogprob> topLogprobs)
List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested
top_logprobs
returned.
-
topLogprobs
final ChatCompletionTokenLogprob.Builder topLogprobs(JsonField<List<ChatCompletionTokenLogprob.TopLogprob>> topLogprobs)
Sets Builder.topLogprobs to an arbitrary JSON value.
You should usually call Builder.topLogprobs with a well-typed
List<TopLogprob>
value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addTopLogprob
final ChatCompletionTokenLogprob.Builder addTopLogprob(ChatCompletionTokenLogprob.TopLogprob topLogprob)
Adds a single TopLogprob to topLogprobs.
-
additionalProperties
final ChatCompletionTokenLogprob.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final ChatCompletionTokenLogprob.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final ChatCompletionTokenLogprob.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final ChatCompletionTokenLogprob.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final ChatCompletionTokenLogprob.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final ChatCompletionTokenLogprob build()
Returns an immutable instance of ChatCompletionTokenLogprob.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.token() .bytes() .logprob() .topLogprobs()
-
-
-
-