Skip to content

Latest commit

 

History

History
88 lines (55 loc) · 2.09 KB

GenerateContentResponse.md

File metadata and controls

88 lines (55 loc) · 2.09 KB

google.generativeai.protos.GenerateContentResponse

View source on GitHub

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