Stay organized with collections
Save and categorize content based on your preferences.
Firebase.AI.GenerateContentResponse
The model's response to a generate content request.
Summary
Properties
|
Candidates
|
A list of candidate response content, ordered from best to worst.
|
FunctionCalls
|
Returns function calls found in any Part s of the first candidate of the response, if any.
|
PromptFeedback
|
A value containing the safety ratings for the response, or, if the request was blocked, a reason for blocking the request.
|
Text
|
string
The response's content as text, if it exists.
|
UsageMetadata
|
Token usage metadata for processing the generate content request.
|
Properties
Candidates
IReadOnlyList< Candidate > Firebase::AI::GenerateContentResponse::Candidates
A list of candidate response content, ordered from best to worst.
FunctionCalls
IReadOnlyList< ModelContent.FunctionCallPart > Firebase::AI::GenerateContentResponse::FunctionCalls
Returns function calls found in any Part
s of the first candidate of the response, if any.
PromptFeedback
PromptFeedback Firebase::AI::GenerateContentResponse::PromptFeedback
A value containing the safety ratings for the response, or, if the request was blocked, a reason for blocking the request.
Text
string Firebase::AI::GenerateContentResponse::Text
The response's content as text, if it exists.
UsageMetadata Firebase::AI::GenerateContentResponse::UsageMetadata
Token usage metadata for processing the generate content request.
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.GenerateContentResponse Struct Reference\n\nFirebase.AI.GenerateContentResponse\n===================================\n\nThe model's response to a generate content request.\n\nSummary\n-------\n\n| ### Properties ||\n|-------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Candidates](#struct_firebase_1_1_a_i_1_1_generate_content_response_1acbb6ea188246f46459f9538297133697) | `IReadOnlyList\u003c `[Candidate](/docs/reference/unity/struct/firebase/a-i/candidate#struct_firebase_1_1_a_i_1_1_candidate)` \u003e` A list of candidate response content, ordered from best to worst. |\n| [FunctionCalls](#struct_firebase_1_1_a_i_1_1_generate_content_response_1a49535ea2092d86f0000b2b5ccf3ad9d6) | `IReadOnlyList\u003c `[ModelContent.FunctionCallPart](/docs/reference/unity/struct/firebase/a-i/model-content/function-call-part#struct_firebase_1_1_a_i_1_1_model_content_1_1_function_call_part)` \u003e` Returns function calls found in any `Part`s of the first candidate of the response, if any. |\n| [PromptFeedback](#struct_firebase_1_1_a_i_1_1_generate_content_response_1a2af16c02c8dcdf061cde4edb9492f72e) | [PromptFeedback](/docs/reference/unity/struct/firebase/a-i/prompt-feedback#struct_firebase_1_1_a_i_1_1_prompt_feedback) A value containing the safety ratings for the response, or, if the request was blocked, a reason for blocking the request. |\n| [Text](#struct_firebase_1_1_a_i_1_1_generate_content_response_1ad9e722a9dc514972d10c29f58fbc29ff) | `string` The response's content as text, if it exists. |\n| [UsageMetadata](#struct_firebase_1_1_a_i_1_1_generate_content_response_1a281dac07869b1a8df233df004641877a) | [UsageMetadata](/docs/reference/unity/struct/firebase/a-i/usage-metadata#struct_firebase_1_1_a_i_1_1_usage_metadata) Token usage metadata for processing the generate content request. |\n\nProperties\n----------\n\n### Candidates\n\n```c#\nIReadOnlyList\u003c Candidate \u003e Firebase::AI::GenerateContentResponse::Candidates\n``` \nA list of candidate response content, ordered from best to worst. \n\n### FunctionCalls\n\n```c#\nIReadOnlyList\u003c ModelContent.FunctionCallPart \u003e Firebase::AI::GenerateContentResponse::FunctionCalls\n``` \nReturns function calls found in any `Part`s of the first candidate of the response, if any. \n\n### PromptFeedback\n\n```c#\nPromptFeedback Firebase::AI::GenerateContentResponse::PromptFeedback\n``` \nA value containing the safety ratings for the response, or, if the request was blocked, a reason for blocking the request. \n\n### Text\n\n```c#\nstring Firebase::AI::GenerateContentResponse::Text\n``` \nThe response's content as text, if it exists. \n\n### UsageMetadata\n\n```c#\nUsageMetadata Firebase::AI::GenerateContentResponse::UsageMetadata\n``` \nToken usage metadata for processing the generate content request."]]