Package com.google.genai.types
Class LogprobsResultCandidate.Builder
java.lang.Object
com.google.genai.types.LogprobsResultCandidate.Builder
- Enclosing class:
- LogprobsResultCandidate
Builder for LogprobsResultCandidate.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract LogprobsResultCandidatebuild()Clears the value of logProbability field.Clears the value of token field.Clears the value of tokenId field.abstract LogprobsResultCandidate.BuilderlogProbability(Float logProbability) Setter for logProbability.abstract LogprobsResultCandidate.BuilderSetter for token.abstract LogprobsResultCandidate.BuilderSetter for tokenId.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
logProbability
Setter for logProbability.logProbability: The log probability of this token. A higher value indicates that the model was more confident in this token. The log probability can be used to assess the relative likelihood of different tokens and to identify when the model is uncertain.
-
clearLogProbability
Clears the value of logProbability field. -
token
Setter for token.token: The token's string representation.
-
clearToken
Clears the value of token field. -
tokenId
Setter for tokenId.tokenId: The token's numerical ID. While the `token` field provides the string representation of the token, the `token_id` is the numerical representation that the model uses internally. This can be useful for developers who want to build custom logic based on the model's vocabulary.
-
clearTokenId
Clears the value of tokenId field. -
build
-