Interface Candidate

A response candidate generated from the model.

interface Candidate {
    avgLogprobs?: number;
    citationMetadata?: CitationMetadata;
    content?: Content;
    finishMessage?: string;
    finishReason?: FinishReason;
    groundingMetadata?: GroundingMetadata;
    index?: number;
    logprobsResult?: LogprobsResult;
    safetyRatings?: SafetyRating[];
    tokenCount?: number;
}

Properties

avgLogprobs?: number

Output only. Average log probability score of the candidate.

citationMetadata?: CitationMetadata

Source attribution of the generated content.

content?: Content

Contains the multi-part content of the response.

finishMessage?: string

Describes the reason the model stopped generating tokens.

finishReason?: FinishReason

Output only. The reason why the model stopped generating tokens. If empty, the model has not stopped generating the tokens.

groundingMetadata?: GroundingMetadata

Output only. Metadata specifies sources used to ground generated content.

index?: number

Output only. Index of the candidate.

logprobsResult?: LogprobsResult

Output only. Log-likelihood scores for the response tokens and top tokens

safetyRatings?: SafetyRating[]

Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.

tokenCount?: number

Number of tokens for this candidate.

MMNEPVFCICPMFPCPTTAAATR