generative-ai-python

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:

`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