CodingKeys
ModerationsResult.swift:39enum CodingKeys
enum CodingKeys
s6OpenAI17ModerationsResultV10ModerationV10CategoriesV10CodingKeysO
What are these?41D7X
import OpenAI
struct Categories
struct ModerationsResult
struct Moderation
case harassment
case harassmentThreatening
case hate
case hateThreatening
case selfHarm
case selfHarmIntent
case selfHarmInstructions
case sexual
case sexualMinors
case violence
case violenceGraphic
init(from decoder: any Decoder) throws
let harassment: Bool
Content that expresses, incites, or promotes harassing language towards any target.
let harassmentThreatening: Bool
Harassment content that also includes violence or serious harm towards any target.
let hate: Bool
Content that expresses, incites, or promotes hate based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste.
let hateThreatening: Bool
Hateful content that also includes violence or serious harm towards the targeted group.
let selfHarm: Bool
Content that promotes, encourages, or depicts acts of self-harm, such as suicide, cutting, and eating disorders.
let selfHarmInstructions: Bool
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.
let selfHarmIntent: Bool
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.
let sexual: Bool
Content meant to arouse sexual excitement, such as the description of sexual activity, or that promotes sexual services (excluding sex education and wellness).
let sexualMinors: Bool
Sexual content that includes an individual who is under 18 years old.
let violence: Bool
Content that promotes or glorifies violence or celebrates the suffering or humiliation of others.
let violenceGraphic: Bool
Violent content that depicts death, violence, or serious physical injury in extreme graphic detail.
func makeIterator() -> IndexingIterator<[(String, Bool)]>
protocol CaseIterable
A type that provides a collection of all of its values.
protocol CodingKey : CustomDebugStringConvertible, CustomStringConvertible, Sendable
A type that can be used as a key for encoding and decoding.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
protocol Sendable
init?(intValue: Int)
init?(rawValue: String)
init?(stringValue: String)
var debugDescription: String { get }
A textual representation of this key, suitable for debugging.
var description: String { get }
A textual representation of this key.
var hashValue: Int { get }
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.
func hash(into hasher: inout Hasher)