SafetyRating

class SafetyRating


An assessment of the potential harm of some generated content.

The rating will be restricted to a particular category.

Summary

Public properties

Boolean?

Indicates whether the content was blocked due to safety concerns.

HarmCategory

The category of harm being assessed (for example, Hate speech).

HarmProbability

The likelihood of the content causing harm.

Float

A numerical score representing the probability of harm, between 0 and 1.

HarmSeverity?

The severity of the potential harm.

Float?

A numerical score representing the severity of harm.

Public properties

blocked

val blocked: Boolean?

Indicates whether the content was blocked due to safety concerns.

category

val category: HarmCategory

The category of harm being assessed (for example, Hate speech).

probability

val probability: HarmProbability

The likelihood of the content causing harm.

probabilityScore

val probabilityScore: Float

A numerical score representing the probability of harm, between 0 and 1.

severity

val severity: HarmSeverity?

The severity of the potential harm.

severityScore

val severityScore: Float?

A numerical score representing the severity of harm.