google.generativeai.protos.GenerateContentResponse
Response from the model supporting multiple candidate responses.
Safety ratings and content filtering are reported for both prompt in
GenerateContentResponse.prompt_feedback
and for each candidate
in finish_reason
and in safety_ratings
. The API:
- Returns either all requested candidates or none of them
- Returns no candidates at all only if there was something wrong
with the prompt (check
prompt_feedback
)
- Reports feedback on each candidate in
finish_reason
and
safety_ratings
.
Attributes |
`candidates`
|
`MutableSequence[google.ai.generativelanguage.Candidate]`
Candidate responses from the model.
|
`prompt_feedback`
|
`google.ai.generativelanguage.GenerateContentResponse.PromptFeedback`
Returns the prompt's feedback related to the
content filters.
|
`usage_metadata`
|
`google.ai.generativelanguage.GenerateContentResponse.UsageMetadata`
Output only. Metadata on the generation
requests' token usage.
|
Child Classes
class PromptFeedback
class UsageMetadata