google.generativeai.types.SafetySettingDict

Safety setting, affecting the safety-blocking behavior.

Passing a safety setting for a category changes the allowed proability that content is blocked.

category google.ai.generativelanguage.HarmCategory

Required. The category for this setting.

threshold google.ai.generativelanguage.SafetySetting.HarmBlockThreshold

Required. Controls the probability threshold at which harm is blocked.