View Source ExOpenAI.Components.CreateModerationRequest (ex_openai.ex v2.0.0-beta2)

Module for representing the OpenAI schema CreateModerationRequest.

Fields

  • :input - required - String.t() | [String.t()] | [{:%{}, [], [{{:required, [], [:image_url]}, {:%{}, [], [{{:required, [], [:url]}, {{:., [], [{:__aliases__, [alias: false], [:String]}, :t]}, [], []}}]}}, {{:required, [], [:type]}, :image_url}]} | {:%{}, [], [{{:required, [], [:text]}, {{:., [], [{:__aliases__, [alias: false], [:String]}, :t]}, [], []}}, {{:required, [], [:type]}, :text}]}]
    Input (or inputs) to classify. Can be a single string, an array of strings, or an array of multi-modal input objects similar to other models.

  • :model - optional - String.t() | :"omni-moderation-latest" | :"omni-moderation-2024-09-26" | :"text-moderation-latest" | :"text-moderation-stable"
    The content moderation model you would like to use. Learn more in the moderation guide, and learn about available models here.
    Default: "omni-moderation-latest"

Summary

Types

@type t() :: %ExOpenAI.Components.CreateModerationRequest{
  input:
    (String.t() | [String.t()])
    | [
        %{image_url: %{url: String.t()}, type: :image_url}
        | %{text: String.t(), type: :text}
      ],
  model:
    (String.t()
     | ((:"omni-moderation-latest" | :"omni-moderation-2024-09-26")
        | :"text-moderation-latest")
     | :"text-moderation-stable")
    | nil
}