Class: OpenAI::Models::Moderation

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/moderation.rb

Defined Under Namespace

Classes: Categories, CategoryAppliedInputTypes, CategoryScores

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(harassment: , harassment_threatening: , hate: , hate_threatening: , illicit: , illicit_violent: , self_harm: , self_harm_instructions: , self_harm_intent: , sexual: , sexual_minors: , violence: , violence_graphic: ) ⇒ void

Some parameter documentations has been truncated, see Categories for more details.

A list of the categories, and whether they are flagged or not.

Parameters:

  • (defaults to: )

    Content that expresses, incites, or promotes harassing language towards any targ

  • (defaults to: )

    Harassment content that also includes violence or serious harm towards any targe

  • (defaults to: )

    Content that expresses, incites, or promotes hate based on race, gender, ethnici

  • (defaults to: )

    Hateful content that also includes violence or serious harm towards the targeted

  • (defaults to: )

    Content that includes instructions or advice that facilitate the planning or exe

  • (defaults to: )

    Content that includes instructions or advice that facilitate the planning or exe

  • (defaults to: )

    Content that promotes, encourages, or depicts acts of self-harm, such as suicide

  • (defaults to: )

    Content that encourages performing acts of self-harm, such as suicide, cutting,

  • (defaults to: )

    Content where the speaker expresses that they are engaging or intend to engage i

  • (defaults to: )

    Content meant to arouse sexual excitement, such as the description of sexual act

  • (defaults to: )

    Sexual content that includes an individual who is under 18 years old.

  • (defaults to: )

    Content that depicts death, violence, or physical injury.

  • (defaults to: )

    Content that depicts death, violence, or physical injury in graphic detail.



# File 'lib/openai/models/moderation.rb', line 30


Instance Attribute Details

#categoriesOpenAI::Models::Moderation::Categories

A list of the categories, and whether they are flagged or not.

Returns:



10
# File 'lib/openai/models/moderation.rb', line 10

required :categories, -> { OpenAI::Moderation::Categories }

#category_applied_input_typesOpenAI::Models::Moderation::CategoryAppliedInputTypes

A list of the categories along with the input type(s) that the score applies to.

Returns:



16
# File 'lib/openai/models/moderation.rb', line 16

required :category_applied_input_types, -> { OpenAI::Moderation::CategoryAppliedInputTypes }

#category_scoresOpenAI::Models::Moderation::CategoryScores

A list of the categories along with their scores as predicted by model.

Returns:



22
# File 'lib/openai/models/moderation.rb', line 22

required :category_scores, -> { OpenAI::Moderation::CategoryScores }

#flaggedBoolean

Whether any of the below categories are flagged.

Returns:



28
# File 'lib/openai/models/moderation.rb', line 28

required :flagged, OpenAI::Internal::Type::Boolean

Class Method Details

.valuesArray<Symbol>

Returns:



# File 'lib/openai/models/moderation.rb', line 447