ExOpenAI.Moderations.create_moderation
You're seeing just the function
create_moderation
, go back to ExOpenAI.Moderations module for more information.
Specs
create_moderation(any(), [{:model, String.t()}]) :: {:ok, ExOpenAI.Components.CreateModerationResponse.t()} | {:error, any()}
Classifies if text violates OpenAI's Content Policy
Endpoint: https://api.openai.com/v1/moderations
Method: POST
Docs: https://platform.openai.com/docs/api-reference/moderations
Required Arguments:
input
: The input text to classify
Optional Arguments:
model
: Two content moderations models are available:text-moderation-stable
andtext-moderation-latest
.
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
.
Example: "text-moderation-stable"