Skip to content

ContentPolicyParameters

MarcoDotIO edited this page Dec 5, 2022 · 1 revision

ContentPolicyParameters

The parameter struct used for the Moderations endpoint

public struct ContentPolicyParameters 

Initializers

init(input:model:)

public init(
        input: String,
        model: ContentPolicyModels = .latest
    ) 

Properties

input

The input text to classify.

public var input: String

model

Two content moderations models are available:​ text-moderation-stable and text-moderation-latest.

public var model: ContentPolicyModels

The default is text-moderation-latest which will be automatically upgraded over time. This ensures you are always using our most accurate model. If you use text-moderation-stable, we will provide advanced notice before updating the model. Accuracy of text-moderation-stable may be slightly lower than for text-moderation-latest.

body

The body of the URL used for OpenAI API requests.

public var body: [String: Any] 
Types
Global Functions
Clone this wiki locally