HarmBlockMethod

classHarmBlockMethod


Specifies how the block method computes the score that will be compared against theHarmBlockThreshold inSafetySetting.

Summary

Public companion properties

HarmBlockMethod

The harm block method uses the probability score.

HarmBlockMethod

The harm block method uses both probability and severity scores.

Public properties

Int

Public companion properties

PROBABILITY

val PROBABILITYHarmBlockMethod

The harm block method uses the probability score. SeeHarmProbability.

SEVERITY

val SEVERITYHarmBlockMethod

The harm block method uses both probability and severity scores. SeeHarmSeverity andHarmProbability.

Public properties

ordinal

val ordinalInt

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-21 UTC.