GenerateContentCandidate interface
Stay organized with collections
Save and categorize content based on your preferences.
A candidate returned as part of a GenerateContentResponse.
Signature:
export interface GenerateContentCandidate
Properties
GenerateContentCandidate.citationMetadata
Signature:
citationMetadata?: CitationMetadata;
GenerateContentCandidate.content
Signature:
content: Content;
GenerateContentCandidate.finishMessage
Signature:
finishMessage?: string;
GenerateContentCandidate.finishReason
Signature:
finishReason?: FinishReason;
GenerateContentCandidate.groundingMetadata
Signature:
groundingMetadata?: GroundingMetadata;
GenerateContentCandidate.index
Signature:
index: number;
GenerateContentCandidate.safetyRatings
Signature:
safetyRatings?: SafetyRating[];
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-20 UTC.
[null,null,["Last updated 2025-05-20 UTC."],[],[],null,["A candidate returned as part of a [GenerateContentResponse](./ai.generatecontentresponse.md#generatecontentresponse_interface).\n\n**Signature:** \n\n export interface GenerateContentCandidate \n\nProperties\n\nGenerateContentCandidate.citationMetadata\n\n**Signature:** \n\n citationMetadata?: CitationMetadata;\n\nGenerateContentCandidate.content\n\n**Signature:** \n\n content: Content;\n\nGenerateContentCandidate.finishMessage\n\n**Signature:** \n\n finishMessage?: string;\n\nGenerateContentCandidate.finishReason\n\n**Signature:** \n\n finishReason?: FinishReason;\n\nGenerateContentCandidate.groundingMetadata\n\n**Signature:** \n\n groundingMetadata?: GroundingMetadata;\n\nGenerateContentCandidate.index\n\n**Signature:** \n\n index: number;\n\nGenerateContentCandidate.safetyRatings\n\n**Signature:** \n\n safetyRatings?: SafetyRating[];"]]