Interface SafetySetting

Safety settings.

interface SafetySetting {
    category?: HarmCategory;
    method?: HarmBlockMethod;
    threshold?: HarmBlockThreshold;
}

Properties

category?: HarmCategory

Required. Harm category.

Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score. This field is not supported in Gemini API.

threshold?: HarmBlockThreshold

Required. The harm block threshold.