client.generate_moderation().
例
主なパラメーター
model(必須): モデレーションモデルのID(例:openai/omni-moderation-latest)。input(必須): 文字列またはコンテンツ項目の配列(テキストまたはimage_url)。- 任意:
categories/severityフィルター(対応している場合)とuserタグ。
戻り値
ModerationResponseDocumentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Python SDKで /moderations を呼び出します。
client.generate_moderation().
moderation = client.generate_moderation({
"model": "openai/omni-moderation-latest",
"input": "Text to classify",
})
model(必須): モデレーションモデルのID(例: openai/omni-moderation-latest)。input(必須): 文字列またはコンテンツ項目の配列(テキストまたは image_url)。categories/severityフィルター(対応している場合)とuserタグ。ModerationResponse