SafetySetting

class SafetySetting(harmCategory: HarmCategory, threshold: HarmBlockThreshold, method: HarmBlockMethod? = null)(source)

A configuration for a HarmBlockThreshold of some HarmCategory allowed and blocked in responses.

Parameters

harmCategory

The relevant HarmCategory.

threshold

The threshold form harm allowable.

method

Specify if the threshold is used for probability or severity score, if not specified it will default to HarmBlockMethod.PROBABILITY.

Constructors

Link copied to clipboard
constructor(harmCategory: HarmCategory, threshold: HarmBlockThreshold, method: HarmBlockMethod? = null)