Class SafetySetting (1.48.0)

SafetySetting(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Safety settings.

Attributes

NameDescription
category google.cloud.aiplatform_v1.types.HarmCategory
Required. Harm category.
threshold google.cloud.aiplatform_v1.types.SafetySetting.HarmBlockThreshold
Required. The harm block threshold.
method google.cloud.aiplatform_v1.types.SafetySetting.HarmBlockMethod
Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score.

Classes

HarmBlockMethod

HarmBlockMethod(value)

Probability vs severity.

Values: HARM_BLOCK_METHOD_UNSPECIFIED (0): The harm block method is unspecified. SEVERITY (1): The harm block method uses both probability and severity scores. PROBABILITY (2): The harm block method uses the probability score.

HarmBlockThreshold

HarmBlockThreshold(value)

Probability based thresholds levels for blocking.

Values: HARM_BLOCK_THRESHOLD_UNSPECIFIED (0): Unspecified harm block threshold. BLOCK_LOW_AND_ABOVE (1): Block low threshold and above (i.e. block more). BLOCK_MEDIUM_AND_ABOVE (2): Block medium threshold and above. BLOCK_ONLY_HIGH (3): Block only high threshold (i.e. block less). BLOCK_NONE (4): Block none.

Methods

SafetySetting

SafetySetting(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Safety settings.