generative-ai-python

google.generativeai.protos.SafetyRating

Safety rating for a piece of content.

The safety rating contains the category of harm and the harm probability level in that category for a piece of content. Content is classified for safety across a number of harm categories and the probability of the harm classification is included here.

`category` `google.ai.generativelanguage.HarmCategory` Required. The category for this rating.
`probability` `google.ai.generativelanguage.SafetyRating.HarmProbability` Required. The probability of harm for this content.
`blocked` `bool` Was this content blocked because of this rating?

Child Classes

class HarmProbability