Candidate

data class Candidate(val content: Content, val finishReason: FinishReason? = null, val finishMessage: String? = null, val citationMetadata: CitationMetadata? = null, val groundingMetadata: GroundingMetadata? = null, val avgLogprobs: Double? = null, val logprobsResult: LogprobsResult? = null)

Represents a possible response from the model.

Constructors

Link copied to clipboard
constructor(content: Content, finishReason: FinishReason? = null, finishMessage: String? = null, citationMetadata: CitationMetadata? = null, groundingMetadata: GroundingMetadata? = null, avgLogprobs: Double? = null, logprobsResult: LogprobsResult? = null)

Properties

Link copied to clipboard
val avgLogprobs: Double? = null

The average log probability of the candidate's tokens.

Link copied to clipboard

The citation metadata associated with the candidate.

Link copied to clipboard

The content of the candidate.

Link copied to clipboard
val finishMessage: String? = null

The message associated with the finish reason.

Link copied to clipboard

The reason why the model stopped generating content.

Link copied to clipboard

The grounding metadata associated with the candidate.

Link copied to clipboard

Detailed log probabilities for the chosen and top candidate tokens.