Class: OpenAI::Models::Moderation::Categories

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

Overview

See Also:

  • OpenAI::Models::Moderation#categories

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, 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, coerce_with_error, dump, #dump, #inspect, inspect, meta_info, 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 ⇒ Object

Parameters:

  • harassment —

    Content that expresses, incites, or promotes harassing language towards any target.

  • harassment_threatening —

    Harassment content that also includes violence or serious harm towards any target.

  • hate —

    Content that expresses, incites, or promotes hate based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. Hateful content aimed at non-protected groups (e.g., chess players) is harassment.

  • hate_threatening —

    Hateful content that also includes violence or serious harm towards the targeted group based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste.

  • illicit —

    Content that includes instructions or advice that facilitate the planning or execution of wrongdoing, or that gives advice or instruction on how to commit illicit acts. For example, "how to shoplift" would fit this category.

  • illicit_violent —

    Content that includes instructions or advice that facilitate the planning or execution of wrongdoing that also includes violence, or that gives advice or instruction on the procurement of any weapon.

  • self_harm —

    Content that promotes, encourages, or depicts acts of self-harm, such as suicide, cutting, and eating disorders.

  • self_harm_instructions —

    Content that encourages performing acts of self-harm, such as suicide, cutting, and eating disorders, or that gives instructions or advice on how to commit such acts.

  • self_harm_intent —

    Content where the speaker expresses that they are engaging or intend to engage in acts of self-harm, such as suicide, cutting, and eating disorders.

  • sexual —

    Content meant to arouse sexual excitement, such as the description of sexual activity, or that promotes sexual services (excluding sex education and wellness).

  • sexual_minors —

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

  • violence —

    Content that depicts death, violence, or physical injury.

  • violence_graphic —

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



163
# File 'sig/openai/models/moderation.rbs', line 163

def initialize: (

Instance Attribute Details

#harassment ⇒ Boolean

Content that expresses, incites, or promotes harassing language towards any target.

Returns:



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

required :harassment, OpenAI::Internal::Type::Boolean

#harassment_threatening ⇒ Boolean

Harassment content that also includes violence or serious harm towards any target.

Returns:



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

required :harassment_threatening, OpenAI::Internal::Type::Boolean, api_name: :"harassment/threatening"

#hate ⇒ Boolean

Content that expresses, incites, or promotes hate based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. Hateful content aimed at non-protected groups (e.g., chess players) is harassment.

Returns:



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

required :hate, OpenAI::Internal::Type::Boolean

#hate_threatening ⇒ Boolean

Hateful content that also includes violence or serious harm towards the targeted group based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste.

Returns:



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

required :hate_threatening, OpenAI::Internal::Type::Boolean, api_name: :"hate/threatening"

#illicit ⇒ Boolean?

Content that includes instructions or advice that facilitate the planning or execution of wrongdoing, or that gives advice or instruction on how to commit illicit acts. For example, "how to shoplift" would fit this category.

Returns:



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

required :illicit, OpenAI::Internal::Type::Boolean, nil?: true

#illicit_violent ⇒ Boolean?

Content that includes instructions or advice that facilitate the planning or execution of wrongdoing that also includes violence, or that gives advice or instruction on the procurement of any weapon.

Returns:



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

required :illicit_violent, OpenAI::Internal::Type::Boolean, api_name: :"illicit/violent", nil?: true

#self_harm ⇒ Boolean

Content that promotes, encourages, or depicts acts of self-harm, such as suicide, cutting, and eating disorders.

Returns:



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

required :self_harm, OpenAI::Internal::Type::Boolean, api_name: :"self-harm"

#self_harm_instructions ⇒ Boolean

Content that encourages performing acts of self-harm, such as suicide, cutting, and eating disorders, or that gives instructions or advice on how to commit such acts.

Returns:



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

required :self_harm_instructions, OpenAI::Internal::Type::Boolean, api_name: :"self-harm/instructions"

#self_harm_intent ⇒ Boolean

Content where the speaker expresses that they are engaging or intend to engage in acts of self-harm, such as suicide, cutting, and eating disorders.

Returns:



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

required :self_harm_intent, OpenAI::Internal::Type::Boolean, api_name: :"self-harm/intent"

#sexual ⇒ Boolean

Content meant to arouse sexual excitement, such as the description of sexual activity, or that promotes sexual services (excluding sex education and wellness).

Returns:



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

required :sexual, OpenAI::Internal::Type::Boolean

#sexual_minors ⇒ Boolean

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

Returns:



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

required :sexual_minors, OpenAI::Internal::Type::Boolean, api_name: :"sexual/minors"

#violence ⇒ Boolean

Content that depicts death, violence, or physical injury.

Returns:



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

required :violence, OpenAI::Internal::Type::Boolean

#violence_graphic ⇒ Boolean

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

Returns:



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

required :violence_graphic, OpenAI::Internal::Type::Boolean, api_name: :"violence/graphic"

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


179
# File 'sig/openai/models/moderation.rbs', line 179

def to_hash: -> {