Liking cljdoc? Tell your friends :D

llm.sdk.providers.openai.moderation

OpenAI Moderations adapter.

POST {base}/moderations. omni-moderation-latest (the default since Nov 2024) accepts multi-modal input — a vector of {:type :text|:image_url} maps as well as plain strings. text-moderation-* models are text-only.

Response shape per the OpenAI Moderations API: {:id :model :results [{:flagged bool :categories {category-name bool} :category_scores {category-name float} :category_applied_input_types {category-name ["text"|"image"]}}]}

OpenAI Moderations adapter.

POST {base}/moderations. omni-moderation-latest (the default since
Nov 2024) accepts multi-modal input — a vector of {:type :text|:image_url}
maps as well as plain strings. text-moderation-* models are
text-only.

Response shape per the OpenAI Moderations API:
  {:id :model
   :results [{:flagged bool
              :categories {category-name bool}
              :category_scores {category-name float}
              :category_applied_input_types {category-name ["text"|"image"]}}]}
raw docstring

build-moderation-request-openaiclj

(build-moderation-request-openai profile request)
source

make-transportclj

(make-transport)
source

parse-moderation-error-openaiclj

(parse-moderation-error-openai profile status body)
source

parse-moderation-response-openaiclj

(parse-moderation-response-openai profile raw)
source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close