OpenaiEx.Moderations (openai_ex v0.9.4)

View Source

This module provides an implementation of the OpenAI moderation API. The API reference can be found at https://platform.openai.com/docs/api-reference/moderations.

Summary

Functions

Calls the moderation endpoint.

Creates a new moderation request with the given arguments.

Functions

create(openai, moderation)

create!(openai, moderation)

Calls the moderation endpoint.

new(args)

Creates a new moderation request with the given arguments.

Example usage:

iex> OpenaiEx.Moderations.new(input: "This is a test")
%{
  input: "This is a test"
}

iex> OpenaiEx.Moderations.new(%{input: "This is a test"})
%{
  input: "This is a test"
}