Stay organized with collections
Save and categorize content based on your preferences.
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
|
The safety rating of the response content.
|
Properties
CitationMetadata Firebase::AI::Candidate::CitationMetadata
Cited works in the model’s response content, if it exists.
FinishReason
FinishReason Firebase::AI::Candidate::FinishReason
The reason the model stopped generating content, if it exists; for example, if the model generated a predefined stop sequence.
GroundingMetadata Firebase::AI::Candidate::GroundingMetadata
Grounding metadata for the response, if any.
SafetyRatings
IReadOnlyList< SafetyRating > Firebase::AI::Candidate::SafetyRatings
The safety rating of the response content.
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-07-24 UTC.
[null,null,["Last updated 2025-07-24 UTC."],[],[],null,["# Firebase.AI.Candidate Struct Reference\n\nFirebase.AI.Candidate\n=====================\n\nA struct representing a possible reply to a content generation prompt.\n\nSummary\n-------\n\nEach content generation prompt may produce multiple candidate responses.\n\n| ### Properties ||\n|------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [CitationMetadata](#struct_firebase_1_1_a_i_1_1_candidate_1a46a5266aa61b973482cfef8bfd233069) | [CitationMetadata](/docs/reference/unity/struct/firebase/a-i/citation-metadata#struct_firebase_1_1_a_i_1_1_citation_metadata) Cited works in the model's response content, if it exists. |\n| [Content](#struct_firebase_1_1_a_i_1_1_candidate_1ab6fc4a3c799f977cd6259b27856e4e22) | [ModelContent](/docs/reference/unity/struct/firebase/a-i/model-content#struct_firebase_1_1_a_i_1_1_model_content) The response's content. |\n| [FinishReason](#struct_firebase_1_1_a_i_1_1_candidate_1ab0438648e017e9ae0a7e02ec9c3b52bd) | [FinishReason](/docs/reference/unity/namespace/firebase/a-i#namespace_firebase_1_1_a_i_1ab636544c199b4ff23cce90300815c455) The reason the model stopped generating content, if it exists; for example, if the model generated a predefined stop sequence. |\n| [GroundingMetadata](#struct_firebase_1_1_a_i_1_1_candidate_1adb692b2d9e18559ac3af2da27cc3b078) | [GroundingMetadata](/docs/reference/unity/struct/firebase/a-i/grounding-metadata#struct_firebase_1_1_a_i_1_1_grounding_metadata) Grounding metadata for the response, if any. |\n| [SafetyRatings](#struct_firebase_1_1_a_i_1_1_candidate_1a967e1a2467ce46436abe9279891ee1af) | `IReadOnlyList\u003c `[SafetyRating](/docs/reference/unity/struct/firebase/a-i/safety-rating#struct_firebase_1_1_a_i_1_1_safety_rating)` \u003e` The safety rating of the response content. |\n\nProperties\n----------\n\n### CitationMetadata\n\n```c#\nCitationMetadata Firebase::AI::Candidate::CitationMetadata\n``` \nCited works in the model's response content, if it exists. \n\n### Content\n\n```c#\nModelContent Firebase::AI::Candidate::Content\n``` \nThe response's content. \n\n### FinishReason\n\n```c#\nFinishReason Firebase::AI::Candidate::FinishReason\n``` \nThe reason the model stopped generating content, if it exists; for example, if the model generated a predefined stop sequence. \n\n### GroundingMetadata\n\n```c#\nGroundingMetadata Firebase::AI::Candidate::GroundingMetadata\n``` \nGrounding metadata for the response, if any. \n\n### SafetyRatings\n\n```c#\nIReadOnlyList\u003c SafetyRating \u003e Firebase::AI::Candidate::SafetyRatings\n``` \nThe safety rating of the response content."]]