このページは、まだ日本語ではご利用いただけません。翻訳中です。
構成
このプラグインはDBレスモードに対応しています。
互換性のあるプロトコル
AI Azure Content Safetyプラグインは以下のプロトコルに対応しています:
grpc, grpcs, http, https
パラメータ
このプラグインの設定で使用できるすべてのパラメータのリストは次のとおりです。
-
name or plugin
string requiredプラグイン名。この場合は
ai-azure-content-safety。- Kong Admin API、Kong Konnect API、宣言型構成、または decK ファイルを使用する場合、フィールドは
nameです。 - Kubernetes で KongPlugin オブジェクトを使用する場合、フィールドは
pluginです。
- Kong Admin API、Kong Konnect API、宣言型構成、または decK ファイルを使用する場合、フィールドは
-
instance_name
stringプラグインのインスタンスを識別するための任意のカスタム名 (例:
ai-azure-content-safety_my-service。インスタンス名はKong ManagerとKonnectに表示されるので、 例えば複数のサービスで同じプラグインを複数のコンテキストで実行する場合に便利です。また、Kong Admin API経由で特定のプラグインインスタンスに アクセスするためにも使用できます。
インスタンス名は、次のコンテキスト内で一意である必要があります。
- Kong Gateway Enterpriseのワークスペース内
- Konnectのコントロールプレーン(CP)またはコントロールプレーン(CP)グループ内
- Kong Gateway (OSS)の全世界
-
service.name or service.id
stringプラグインが対象とするサービス名または ID。最上位の
/pluginsエンドポイント. からプラグインをサービスに追加する場合は、これらのパラメータのいずれかを設定してください/services/{serviceName|Id}/pluginsを使用する場合は必要ありません。 -
route.name or route.id
stringプラグインがターゲットとするルート名または ID。最上位の
/pluginsエンドポイント. を通るルートにプラグインを追加する場合は、これらのパラメータのいずれかを設定してください/routes/{routeName|Id}/pluginsを使用する場合は必要ありません。 -
enabled
boolean default:trueこのプラグインが適用されるかどうか。
-
config
record required-
content_safety_url
string required referenceableFull URL, inc protocol, of the Azure Content Safety instance.
-
azure_api_version
string required default:2023-10-01len_min:1Sets the ?api-version URL parameter, used for defining the Azure Content Services interchange format.
-
azure_use_managed_identity
boolean default:falseIf checked, uses (if set)
azure_client_id,azure_client_secret, and/orazure_tenant_idfor Azure authentication, via Managed or User-assigned identity
-
azure_client_id
stringIf
azure_use_managed_identityis true, set the client ID if required.
-
azure_client_secret
stringIf
azure_use_managed_identityis true, set the client secret if required.
-
azure_tenant_id
stringIf
azure_use_managed_identityis true, set the tenant ID if required.
-
content_safety_key
string referenceable encryptedIf
azure_use_managed_identityis true, set the API key to call Content Safety.
-
text_source
string default:concatenate_all_contentMust be one of:concatenate_all_content,concatenate_user_contentSelect where to pick the ‘text’ for the Azure Content Services request.
-
categories
array of typerecordArray of categories, and their thresholds, to measure on.
-
name
string required
-
rejection_level
integer required
-
-
reveal_failure_reason
boolean default:trueSet true to tell the caller why their request was rejected, if so.
-
output_type
string default:FourSeverityLevelsMust be one of:FourSeverityLevels,EightSeverityLevelsSee https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/content-filter#content-filtering-categories
-
blocklist_names
array of typestringUse these configured blocklists (in Azure Content Services) when inspecting content.
-
halt_on_blocklist_hit
boolean default:trueTells Azure to reject the request if any blocklist filter is hit.
-