Skip to content

Commit 3853b8e

Browse files
committed
docs: standardize ai-aws-content-moderation attribute table to 6-column format
1 parent 116dd4b commit 3853b8e

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

docs/en/latest/plugins/ai-aws-content-moderation.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,16 @@ This Plugin must be used in Routes that proxy requests to LLMs only.
4242

4343
## Plugin Attributes
4444

45-
| **Field** | **Required** | **Type** | **Description** |
46-
| --- | --- | --- | --- |
47-
| `comprehend` | True | object | [AWS Comprehend](https://aws.amazon.com/comprehend/) configurations. |
48-
| `comprehend.access_key_id` | True | string | AWS access key ID. |
49-
| `comprehend.secret_access_key` | True | string | AWS secret access key. |
50-
| `comprehend.region` | True | string | AWS region. |
51-
| `comprehend.endpoint` | False | string | AWS Comprehend service endpoint. If not specified, it defaults to `https://comprehend.{region}.amazonaws.com`. If set, it must match the pattern `^https?://`. |
52-
| `comprehend.ssl_verify` | False | boolean | If true, enable TLS certificate verification. Default: `true`. |
53-
| `moderation_categories` | False | object | Key-value pairs of moderation category and their corresponding threshold. In each pair, the key should be one of `PROFANITY`, `HATE_SPEECH`, `INSULT`, `HARASSMENT_OR_ABUSE`, `SEXUAL`, or `VIOLENCE_OR_THREAT`; and the threshold value should be between 0 and 1 (inclusive). |
54-
| `moderation_threshold` | False | number | Overall toxicity threshold. A higher value means more toxic content allowed. This option differs from the individual category thresholds in `moderation_categories`. For example, if `moderation_categories` is set with a `PROFANITY` threshold of `0.5`, and a request has a `PROFANITY` score of `0.1`, the request will not exceed the category threshold. However, if the request has other categories like `SEXUAL` or `VIOLENCE_OR_THREAT` exceeding the `moderation_threshold`, the request will be rejected. Default: `0.5`. Range: 0 - 1. |
45+
| Name | Type | Required | Default | Valid values | Description |
46+
| --- | --- | --- | --- | --- | --- |
47+
| `comprehend` | object | True | | | [AWS Comprehend](https://aws.amazon.com/comprehend/) configurations. |
48+
| `comprehend.access_key_id` | string | True | | | AWS access key ID. |
49+
| `comprehend.secret_access_key` | string | True | | | AWS secret access key. |
50+
| `comprehend.region` | string | True | | | AWS region. |
51+
| `comprehend.endpoint` | string | False | | | AWS Comprehend service endpoint. If not specified, it defaults to `https://comprehend.{region}.amazonaws.com`. If set, it must match the pattern `^https?://`. |
52+
| `comprehend.ssl_verify` | boolean | False | true | | If true, enable TLS certificate verification. |
53+
| `moderation_categories` | object | False | | | Key-value pairs of moderation category and their corresponding threshold. In each pair, the key should be one of `PROFANITY`, `HATE_SPEECH`, `INSULT`, `HARASSMENT_OR_ABUSE`, `SEXUAL`, or `VIOLENCE_OR_THREAT`; and the threshold value should be between 0 and 1 (inclusive). |
54+
| `moderation_threshold` | number | False | 0.5 | 0 - 1 | Overall toxicity threshold. A higher value means more toxic content allowed. This option differs from the individual category thresholds in `moderation_categories`. For example, if `moderation_categories` is set with a `PROFANITY` threshold of `0.5`, and a request has a `PROFANITY` score of `0.1`, the request will not exceed the category threshold. However, if the request has other categories like `SEXUAL` or `VIOLENCE_OR_THREAT` exceeding the `moderation_threshold`, the request will be rejected. |
5555

5656
## Examples
5757

docs/zh/latest/plugins/ai-aws-content-moderation.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,16 @@ import TabItem from '@theme/TabItem';
4444

4545
## 插件属性
4646

47-
| **字段** | **必选项** | **类型** | **描述** |
48-
| --- | --- | --- | --- |
49-
| `comprehend` || Object | [AWS Comprehend](https://aws.amazon.com/comprehend/) 配置。 |
50-
| `comprehend.access_key_id` || String | AWS 访问密钥 ID。 |
51-
| `comprehend.secret_access_key` || String | AWS 秘密访问密钥。 |
52-
| `comprehend.region` || String | AWS 区域。 |
53-
| `comprehend.endpoint` || String | AWS Comprehend 服务端点。未设置时默认为 `https://comprehend.{region}.amazonaws.com`。如果设置,必须匹配模式 `^https?://`|
54-
| `comprehend.ssl_verify` || Boolean | 如果为 true,则启用 TLS 证书验证。默认值:`true`|
55-
| `moderation_categories` || Object | 审核类别及其对应阈值的键值对。在每个键值对中,键应为 `PROFANITY``HATE_SPEECH``INSULT``HARASSMENT_OR_ABUSE``SEXUAL``VIOLENCE_OR_THREAT` 之一;阈值应在 0 到 1 之间(包含)。 |
56-
| `moderation_threshold` || Number | 整体毒性阈值。值越高,允许的有害内容越多。此选项与 `moderation_categories` 中的单独类别阈值不同。例如,如果 `moderation_categories` 中设置了 `PROFANITY` 阈值为 `0.5`,而请求的 `PROFANITY` 分数为 `0.1`,则请求不会超过类别阈值。但如果请求的其他类别(如 `SEXUAL``VIOLENCE_OR_THREAT`)超过了 `moderation_threshold`,则请求将被拒绝。默认值:`0.5`。范围:0 - 1|
47+
| 名称 | 类型 | 必选项 | 默认值 | 有效值 | 描述 |
48+
| --- | --- | --- | --- | --- | --- |
49+
| `comprehend` | object | | | | [AWS Comprehend](https://aws.amazon.com/comprehend/) 配置。 |
50+
| `comprehend.access_key_id` | string | | | | AWS 访问密钥 ID。 |
51+
| `comprehend.secret_access_key` | string | | | | AWS 秘密访问密钥。 |
52+
| `comprehend.region` | string | | | | AWS 区域。 |
53+
| `comprehend.endpoint` | string | | | | AWS Comprehend 服务端点。未设置时默认为 `https://comprehend.{region}.amazonaws.com`。如果设置,必须匹配模式 `^https?://`|
54+
| `comprehend.ssl_verify` | boolean | | true | | 如果为 true,则启用 TLS 证书验证。 |
55+
| `moderation_categories` | object | | | | 审核类别及其对应阈值的键值对。在每个键值对中,键应为 `PROFANITY``HATE_SPEECH``INSULT``HARASSMENT_OR_ABUSE``SEXUAL``VIOLENCE_OR_THREAT` 之一;阈值应在 0 到 1 之间(包含)。 |
56+
| `moderation_threshold` | number | | 0.5 | 0 - 1 | 整体毒性阈值。值越高,允许的有害内容越多。此选项与 `moderation_categories` 中的单独类别阈值不同。例如,如果 `moderation_categories` 中设置了 `PROFANITY` 阈值为 `0.5`,而请求的 `PROFANITY` 分数为 `0.1`,则请求不会超过类别阈值。但如果请求的其他类别(如 `SEXUAL``VIOLENCE_OR_THREAT`)超过了 `moderation_threshold`,则请求将被拒绝。 |
5757

5858
## 使用示例
5959

0 commit comments

Comments
 (0)