Parameters
See plugin common configurations for configuration options available to all plugins.
This plugin supports referencing sensitive parameter values from environment variables using the env:// prefix, or from a secret manager, such as HashiCorp Vault’s KV secrets engine, using the secret:// prefix. For more information, see environment variables in plugin and secrets.
comprehend
object
required
AWS Comprehend configurations.
access_key_id
string
required
AWS access key ID.
secret_access_key
string
required
AWS secret access key. The value is encrypted with AES before being stored in etcd.
region
string
required
AWS region.
endpoint
string
AWS Comprehend service endpoint. If not set, defaults to
https://comprehend.{region}.amazonaws.com.ssl_verify
boolean
default:
trueIf true, enable TLS certificate verification.
moderation_categories
object
Key-value pairs of moderation category and their corresponding threshold.
In each pair, the key should be one of the
PROFANITY,HATE_SPEECH,INSULT,HARASSMENT_OR_ABUSE,SEXUAL, orVIOLENCE_OR_THREAT; and the threshold value should be between 0 and 1 (inclusive).moderation_threshold
number
default:
0.5vaild vaule:
between 0 and 1 inclusive
Overall toxicity threshold. A higher value means more toxic content allowed.
This option differs from the individual category thresholds in
moderation_categories. For example, ifmoderation_categoriesis set with aPROFANITYthreshold of0.5, and a request has aPROFANITYscore of0.1, the request will not exceed the category threshold. However, if the request has other categories likeSEXUALorVIOLENCE_OR_THREATexceeding themoderation_threshold, the request will be rejected.fail_mode
string
default:
skipvaild vaule:
skip,warn, orerrorBehavior when the plugin is bound to a Consumer and receives a request whose format it does not recognize, such as a non-AI request. With
skip, the unrecognized request is passed through unchecked. Withwarn, the request is passed through and a warning is logged. Witherror, the request is rejected with HTTP 400.Available in API7 Enterprise from version 3.9.14.