safetySettings property
Optional. A list of unique SafetySetting instances for blocking unsafe
content.
that will be enforced on the GenerateTextRequest.prompt and
GenerateTextResponse.candidates. There should not be more than one
setting for each SafetyCategory type. The API will block any prompts and
responses that fail to meet the thresholds set by these settings. This list
overrides the default settings for each SafetyCategory specified in the
safety_settings. If there is no SafetySetting for a given
SafetyCategory provided in the list, the API will use the default safety
setting for that category. Harm categories HARM_CATEGORY_DEROGATORY,
HARM_CATEGORY_TOXICITY, HARM_CATEGORY_VIOLENCE, HARM_CATEGORY_SEXUAL,
HARM_CATEGORY_MEDICAL, HARM_CATEGORY_DANGEROUS are supported in text
service.
Implementation
final List<SafetySetting> safetySettings;