create_moderation {openai} | R Documentation |
Create moderation
Description
Classifies if text violates OpenAI's Content Policy. See this page for details.
Usage
create_moderation(
input,
model,
openai_api_key = Sys.getenv("OPENAI_API_KEY"),
openai_organization = NULL
)
Arguments
input |
required; an arbitrary length character vector. |
model |
required; a length one character vector. |
openai_api_key |
required; defaults to |
openai_organization |
optional; defaults to |
Details
For arguments description please refer to the official documentation.
Value
Returns a list, elements of which contain information about the model.
Examples
## Not run:
create_moderation(
input = "I want to kill them all.",
model = "text-moderation-stable"
)
## End(Not run)
[Package openai version 0.4.1 Index]