Class Candidate.Builder
- Enclosing class:
- Candidate
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Candidate.Builder
avgLogprobs
(Double avgLogprobs) Setter for avgLogprobs.abstract Candidate
build()
abstract Candidate.Builder
citationMetadata
(CitationMetadata citationMetadata) Setter for citationMetadata.citationMetadata
(CitationMetadata.Builder citationMetadataBuilder) Setter for citationMetadata builder.abstract Candidate.Builder
Setter for content.content
(Content.Builder contentBuilder) Setter for content builder.abstract Candidate.Builder
finishMessage
(String finishMessage) Setter for finishMessage.abstract Candidate.Builder
finishReason
(FinishReason finishReason) Setter for finishReason.finishReason
(FinishReason.Known knownType) Setter for finishReason given a known enum.finishReason
(String finishReason) Setter for finishReason given a string.abstract Candidate.Builder
groundingMetadata
(GroundingMetadata groundingMetadata) Setter for groundingMetadata.groundingMetadata
(GroundingMetadata.Builder groundingMetadataBuilder) Setter for groundingMetadata builder.abstract Candidate.Builder
Setter for index.abstract Candidate.Builder
logprobsResult
(LogprobsResult logprobsResult) Setter for logprobsResult.logprobsResult
(LogprobsResult.Builder logprobsResultBuilder) Setter for logprobsResult builder.safetyRatings
(SafetyRating... safetyRatings) Setter for safetyRatings.safetyRatings
(SafetyRating.Builder... safetyRatingsBuilders) Setter for safetyRatings builder.abstract Candidate.Builder
safetyRatings
(List<SafetyRating> safetyRatings) Setter for safetyRatings.abstract Candidate.Builder
tokenCount
(Integer tokenCount) Setter for tokenCount.abstract Candidate.Builder
urlContextMetadata
(UrlContextMetadata urlContextMetadata) Setter for urlContextMetadata.urlContextMetadata
(UrlContextMetadata.Builder urlContextMetadataBuilder) Setter for urlContextMetadata builder.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
content
Setter for content.content: Contains the multi-part content of the response.
-
content
Setter for content builder.content: Contains the multi-part content of the response.
-
citationMetadata
Setter for citationMetadata.citationMetadata: Source attribution of the generated content.
-
citationMetadata
Setter for citationMetadata builder.citationMetadata: Source attribution of the generated content.
-
finishMessage
Setter for finishMessage.finishMessage: Describes the reason the model stopped generating tokens.
-
tokenCount
Setter for tokenCount.tokenCount: Number of tokens for this candidate.
-
finishReason
Setter for finishReason.finishReason: The reason why the model stopped generating tokens. If empty, the model has not stopped generating the tokens.
-
finishReason
Setter for finishReason given a known enum.finishReason: The reason why the model stopped generating tokens. If empty, the model has not stopped generating the tokens.
-
finishReason
Setter for finishReason given a string.finishReason: The reason why the model stopped generating tokens. If empty, the model has not stopped generating the tokens.
-
urlContextMetadata
Setter for urlContextMetadata.urlContextMetadata: Metadata related to url context retrieval tool.
-
urlContextMetadata
Setter for urlContextMetadata builder.urlContextMetadata: Metadata related to url context retrieval tool.
-
avgLogprobs
Setter for avgLogprobs.avgLogprobs: Output only. Average log probability score of the candidate.
-
groundingMetadata
Setter for groundingMetadata.groundingMetadata: Output only. Metadata specifies sources used to ground generated content.
-
groundingMetadata
Setter for groundingMetadata builder.groundingMetadata: Output only. Metadata specifies sources used to ground generated content.
-
index
Setter for index.index: Output only. Index of the candidate.
-
logprobsResult
Setter for logprobsResult.logprobsResult: Output only. Log-likelihood scores for the response tokens and top tokens
-
logprobsResult
Setter for logprobsResult builder.logprobsResult: Output only. Log-likelihood scores for the response tokens and top tokens
-
safetyRatings
Setter for safetyRatings.safetyRatings: Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.
-
safetyRatings
Setter for safetyRatings.safetyRatings: Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.
-
safetyRatings
Setter for safetyRatings builder.safetyRatings: Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.
-
build
-