A response candidate generated from the model.

index int

Output only. Index of the candidate in the list of candidates.


Output only. Generated content returned from the model.


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

safety_ratings MutableSequence[]

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


Output only. Citation information for model-generated candidate.

This field may be populated with recitation information for any text included in the content. These are passages that are "recited" from copyrighted material in the foundational LLM's training data.

token_count int

Output only. Token count for this candidate.

grounding_attributions MutableSequence[]

Output only. Attribution information for sources that contributed to a grounded answer.

This field is populated for GenerateAnswer calls.

Child Classes

class FinishReason