SafetySetting

data class SafetySetting(val category: HarmCategory? = null, val threshold: HarmBlockThreshold? = null)

A per-request safety setting controlling the block threshold for a single HarmCategory.

Constructors

Link copied to clipboard
constructor(category: HarmCategory? = null, threshold: HarmBlockThreshold? = null)

Properties

Link copied to clipboard
val category: HarmCategory? = null

The harm category this setting applies to.

Link copied to clipboard

The probability threshold at or above which content in category is blocked.