Gemini.Types.SafetySetting (GeminiEx v0.2.1)

View Source

Safety settings for content generation.

Summary

Functions

Create a safety setting for dangerous content.

Get default safety settings (medium threshold for all categories).

Create a safety setting for harassment content.

Create a safety setting for hate speech content.

Get permissive safety settings (block only high risk content).

Create a safety setting for sexually explicit content.

Types

category()

@type category() ::
  :harm_category_harassment
  | :harm_category_hate_speech
  | :harm_category_sexually_explicit
  | :harm_category_dangerous_content

t()

@type t() :: %Gemini.Types.SafetySetting{category: category(), threshold: threshold()}

threshold()

@type threshold() ::
  :harm_block_threshold_unspecified
  | :block_low_and_above
  | :block_medium_and_above
  | :block_only_high
  | :block_none

Functions

dangerous_content(threshold \\ :block_medium_and_above)

Create a safety setting for dangerous content.

defaults()

Get default safety settings (medium threshold for all categories).

harassment(threshold \\ :block_medium_and_above)

Create a safety setting for harassment content.

hate_speech(threshold \\ :block_medium_and_above)

Create a safety setting for hate speech content.

permissive()

Get permissive safety settings (block only high risk content).

sexually_explicit(threshold \\ :block_medium_and_above)

Create a safety setting for sexually explicit content.