A safety setting that affects the safety-blocking behavior.
A SafetySetting consists of a harm category and a threshold for that category.
Required. The harm category to be blocked.
Required. The threshold for blocking content. If the harm probability exceeds this threshold, the content will be blocked.
Optional. The method for blocking content. If not specified, the default behavior is to use the probability score.
| JSON representation |
|---|
{ "category": enum ( |
HarmBlockMethod
The method for blocking content.
| Enums | |
|---|---|
HARM_BLOCK_METHOD_UNSPECIFIED |
The harm block method is unspecified. |
SEVERITY |
The harm block method uses both probability and severity scores. |
PROBABILITY |
The harm block method uses the probability score. |