Skip to content

Commit 42985e6

Browse files
committed
Revert "docs: use enterprise-safe examples and localize zh/ja examples"
This reverts commit d0854eb.
1 parent d0854eb commit 42985e6

5 files changed

Lines changed: 11 additions & 11 deletions

File tree

en/use-dify/workspace/api-extension/moderation-api-extension.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ When **Content Moderation > Review Input Content** is enabled in applications su
4242
"app_id": "61248ab4-1125-45be-ae32-0ce91334d021",
4343
"inputs": {
4444
"var_1": "My SSN is 123-45-6789.",
45-
"var_2": "My phone number is 415-555-0142."
45+
"var_2": "My phone number is 123-456-7890."
4646
},
4747
"query": "Please help me update my account."
4848
}

ja/use-dify/workspace/api-extension/moderation-api-extension.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Chatflow、Agent、チャットアシスタントなどのアプリケーショ
7272
{
7373
"flagged": true,
7474
"action": "direct_output",
75-
"preset_response": "貴社のご使用ポリシーに反するコンテンツとなっております。"
75+
"preset_response": "Your content violates our usage policy."
7676
}
7777
```
7878
* `action=overridden`
@@ -133,7 +133,7 @@ Chatflow、Agent、チャットアシスタントなどのアプリケーショ
133133
{
134134
"flagged": true,
135135
"action": "direct_output",
136-
"preset_response": "貴社のご使用ポリシーに反するコンテンツとなっております。"
136+
"preset_response": "Your content violates our usage policy."
137137
}
138138
```
139139
* `action=overridden`

versions/3-0-x/en/user-guide/extension/api-based-extension/moderation.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ This module is used to review the content input by end-users and the output cont
3939
"app_id": "61248ab4-1125-45be-ae32-0ce91334d021",
4040
"inputs": {
4141
"var_1": "My SSN is 123-45-6789.",
42-
"var_2": "My phone number is 415-555-0142."
42+
"var_2": "My phone number is 123-456-7890."
4343
},
4444
"query": "Please help me update my account."
4545
}

versions/3-0-x/zh/user-guide/application-orchestrate/app-toolkits/moderation-tool.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ OpenAI 和大多数 LLM 公司提供的模型,都带有内容审查功能,
1515

1616
### 功能二:自定义关键词
1717

18-
开发者可以自定义需要审查的敏感词,比如把“密钥”作为关键词,在用户输入的时候作审核动作,要求预设回复内容为“您的内容违反了我们的使用政策。”可以预见的结果是当用户在终端输入包含“密钥”的语料片段,就会触发敏感词审查工具,返回预设回复内容。
18+
开发者可以自定义需要审查的敏感词,比如把“密钥”作为关键词,在用户输入的时候作审核动作,要求预设回复内容为“The content is violating usage policies.”可以预见的结果是当用户在终端输入包含“密钥”的语料片段,就会触发敏感词审查工具,返回预设回复内容。
1919

2020
### 功能三: 敏感词审查 Moderation 扩展
2121

2222
不同的企业内部往往有着不同的敏感词审查机制,企业在开发自己的 AI 应用如企业内部知识库 ChatBot,需要对员工输入的查询内容作敏感词审查。为此,开发者可以根据自己企业内部的敏感词审查机制写一个 API 扩展,具体可参考 [敏感内容审查](/zh-hans/guides/tools/extensions/api-based/moderation),从而在 Dify 上调用,实现敏感词审查的高度自定义和隐私保护。
2323

2424
![Moderation Settings](https://assets-docs.dify.ai/dify-enterprise-mintlify/zh_CN/guides/application-orchestrate/app-toolkits/d8b6dff6fce6d70795b87aefc56eb02b.png)
2525

26-
比如我们在自己的本地服务中自定义敏感词审查规则:不能查询有关公司内部薪资的问题。当用户在`query`变量输入"薪资",则在对话时会返回 "您的内容违反了我们的使用政策。"。
26+
比如我们在自己的本地服务中自定义敏感词审查规则:不能查询有关公司内部薪资的问题。当用户在`query`变量输入"薪资",则在对话时会返回 "Your content violates our usage policy."。

zh/use-dify/workspace/api-extension/moderation-api-extension.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ title: 敏感内容审查
4141
"params": {
4242
"app_id": "61248ab4-1125-45be-ae32-0ce91334d021",
4343
"inputs": {
44-
"var_1": "我的身份证号是 11010119900307123X。",
45-
"var_2": "我的手机号是 138-0013-8000。"
44+
"var_1": "我的身份证号是 123456789012345678。",
45+
"var_2": "我的手机号是 123-4567-8901。"
4646
},
4747
"query": "请帮我更新账户信息。"
4848
}
@@ -72,7 +72,7 @@ title: 敏感内容审查
7272
{
7373
"flagged": true,
7474
"action": "direct_output",
75-
"preset_response": "您的内容违反了我们的使用政策。"
75+
"preset_response": "Your content violates our usage policy."
7676
}
7777
```
7878
* `action=overridden`
@@ -110,7 +110,7 @@ title: 敏感内容审查
110110
"point": "app.moderation.output",
111111
"params": {
112112
"app_id": "61248ab4-1125-45be-ae32-0ce91334d021",
113-
"text": "我的身份证号是 11010119900307123X"
113+
"text": "我的身份证号是 123456789012345678"
114114
}
115115
}
116116
```
@@ -133,7 +133,7 @@ title: 敏感内容审查
133133
{
134134
"flagged": true,
135135
"action": "direct_output",
136-
"preset_response": "您的内容违反了我们的使用政策。"
136+
"preset_response": "Your content violates our usage policy."
137137
}
138138
```
139139
* `action=overridden`

0 commit comments

Comments
 (0)