Firebase. AI. Candidate
A struct representing a possible reply to a content generation prompt.
Summary
Each content generation prompt may produce multiple candidate responses.
Properties | |
|---|---|
CitationMetadata | Cited works in the model’s response content, if it exists. |
Content | The response’s content. |
FinishReason | The reason the model stopped generating content, if it exists; for example, if the model generated a predefined stop sequence. |
GroundingMetadata | Grounding metadata for the response, if any. |
SafetyRatings | IReadOnlyList<SafetyRating >The safety rating of the response content. |
UrlContextMetadata | Metadata related to the URLContext tool. |
Properties
CitationMetadata
CitationMetadataFirebase::AI::Candidate::CitationMetadata
Cited works in the model’s response content, if it exists.
FinishReason
FinishReasonFirebase::AI::Candidate::FinishReason
The reason the model stopped generating content, if it exists; for example, if the model generated a predefined stop sequence.
GroundingMetadata
GroundingMetadataFirebase::AI::Candidate::GroundingMetadata
Grounding metadata for the response, if any.
SafetyRatings
IReadOnlyList<SafetyRating>Firebase::AI::Candidate::SafetyRatings
The safety rating of the response content.
UrlContextMetadata
UrlContextMetadataFirebase::AI::Candidate::UrlContextMetadata
Metadata related to theURLContext tool.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-10-16 UTC.