Send feedback
google.ai.generativelanguage.Candidate
Stay organized with collections
Save and categorize content based on your preferences.
A response candidate generated from the model.
View aliases
Main aliases
`google.ai.generativelanguage_v1beta.Candidate`
Attributes
index
int
Output only. Index of the candidate in the
list of candidates.
content
google.ai.generativelanguage.Content
Output only. Generated content returned from
the model.
finish_reason
google.ai.generativelanguage.Candidate.FinishReason
Optional. Output only. The reason why the
model stopped generating tokens.
If empty, the model has not stopped generating
the tokens.
safety_ratings
MutableSequence[google.ai.generativelanguage.SafetyRating]
List of ratings for the safety of a response
candidate.
There is at most one rating per category.
citation_metadata
google.ai.generativelanguage.CitationMetadata
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[google.ai.generativelanguage.GroundingAttribution]
Output only. Attribution information for sources that
contributed to a grounded answer.
This field is populated for GenerateAnswer
calls.
Child Classes
class FinishReason
Send feedback
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 2023-12-13 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?