feat: add api-based extension & external data tool & moderation (#1459)
This commit is contained in:
@@ -98,6 +98,26 @@ const translation = {
|
||||
deleteContextVarTip: 'This variable has been set as a context query variable, and removing it will impact the normal use of the dataset. If you still need to delete it, please reselect it in the context section.',
|
||||
},
|
||||
},
|
||||
tools: {
|
||||
title: 'Tools',
|
||||
tips: 'Tools provide a standard API call method, taking user input or variables as request parameters for querying external data as context.',
|
||||
toolsInUse: '{{count}} tools in use',
|
||||
modal: {
|
||||
title: 'Tool',
|
||||
toolType: {
|
||||
title: 'Tool Type',
|
||||
placeholder: 'Please select the tool type',
|
||||
},
|
||||
name: {
|
||||
title: 'Name',
|
||||
placeholder: 'Please enter the name',
|
||||
},
|
||||
variableName: {
|
||||
title: 'Variable Name',
|
||||
placeholder: 'Please enter the variable name',
|
||||
},
|
||||
},
|
||||
},
|
||||
conversationHistory: {
|
||||
title: 'Conversation History',
|
||||
description: 'Set prefix names for conversation roles',
|
||||
@@ -109,6 +129,47 @@ const translation = {
|
||||
assistantPrefix: 'Assistant prefix',
|
||||
},
|
||||
},
|
||||
toolbox: {
|
||||
title: 'TOOLBOX',
|
||||
},
|
||||
moderation: {
|
||||
title: 'Content moderation',
|
||||
description: 'Content moderation',
|
||||
allEnabled: 'INPUT/OUTPUT Content Enabled',
|
||||
inputEnabled: 'INPUT Content Enabled',
|
||||
outputEnabled: 'OUTPUT Content Enabled',
|
||||
modal: {
|
||||
title: 'Content moderation settings',
|
||||
provider: {
|
||||
title: 'Provider',
|
||||
openai: 'OpenAI Moderation',
|
||||
openaiTip: {
|
||||
prefix: 'OpenAI Moderation requires an OpenAI API key configured in the ',
|
||||
suffix: '.',
|
||||
},
|
||||
keywords: 'Keywords',
|
||||
},
|
||||
keywords: {
|
||||
tip: 'One per line, separated by line breaks. Up to 100 characters per line.',
|
||||
placeholder: 'One per line, separated by line breaks',
|
||||
line: 'Line',
|
||||
},
|
||||
content: {
|
||||
input: 'Moderate INPUT Content',
|
||||
output: 'Moderate OUTPUT Content',
|
||||
preset: 'Preset replies',
|
||||
placeholder: 'Preset replies content here',
|
||||
condition: 'Moderate INPUT and OUTPUT Content enabled at least one',
|
||||
fromApi: 'Preset replies are returned by API',
|
||||
errorMessage: 'Preset replies cannot be empty',
|
||||
supportMarkdown: 'Markdown supported',
|
||||
},
|
||||
openaiNotConfig: {
|
||||
before: 'OpenAI Moderation requires an OpenAI API key configured in the',
|
||||
after: '',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
automatic: {
|
||||
title: 'Automated application orchestration',
|
||||
|
||||
@@ -98,6 +98,26 @@ const translation = {
|
||||
deleteContextVarTip: '该变量已被设置为上下文查询变量,删除该变量将影响数据集的正常使用。 如果您仍需要删除它,请在上下文部分中重新选择它。',
|
||||
},
|
||||
},
|
||||
tools: {
|
||||
title: '工具',
|
||||
tips: '工具提供了一个标准的 API 调用方式,将用户输入或变量作为 API 的请求参数,用于查询外部数据作为上下文。',
|
||||
toolsInUse: '{{count}} 工具使用中',
|
||||
modal: {
|
||||
title: '工具',
|
||||
toolType: {
|
||||
title: '工具类型',
|
||||
placeholder: '请选择工具类型',
|
||||
},
|
||||
name: {
|
||||
title: '名称',
|
||||
placeholder: '请填写名称',
|
||||
},
|
||||
variableName: {
|
||||
title: '变量名称',
|
||||
placeholder: '请填写变量名称',
|
||||
},
|
||||
},
|
||||
},
|
||||
conversationHistory: {
|
||||
title: '对话历史',
|
||||
description: '设置对话角色的前缀名称',
|
||||
@@ -109,6 +129,47 @@ const translation = {
|
||||
assistantPrefix: '助手前缀',
|
||||
},
|
||||
},
|
||||
toolbox: {
|
||||
title: '工具箱',
|
||||
},
|
||||
moderation: {
|
||||
title: '内容审核',
|
||||
description: '内容审核',
|
||||
allEnabled: '审核输入/审核输出 内容已启用',
|
||||
inputEnabled: '审核输入内容已启用',
|
||||
outputEnabled: '审核输出内容已启用',
|
||||
modal: {
|
||||
title: '内容审核设置',
|
||||
provider: {
|
||||
title: '类别',
|
||||
openai: 'OpenAI Moderation',
|
||||
openaiTip: {
|
||||
prefix: 'OpenAI Moderation 需要在',
|
||||
suffix: '中配置 OpenAI API 密钥。',
|
||||
},
|
||||
keywords: '关键词',
|
||||
},
|
||||
keywords: {
|
||||
tip: '每行一个,用换行符分隔。每行最多 100 个字符。',
|
||||
placeholder: '每行一个,用换行符分隔',
|
||||
line: '行',
|
||||
},
|
||||
content: {
|
||||
input: '审核输入内容',
|
||||
output: '审核输出内容',
|
||||
preset: '预设回复',
|
||||
placeholder: '这里预设回复内容',
|
||||
condition: '审核输入内容和审核输出内容至少启用一项',
|
||||
fromApi: '预设回复通过 API 返回',
|
||||
errorMessage: '预设回复不能为空',
|
||||
supportMarkdown: '支持 Markdown',
|
||||
},
|
||||
openaiNotConfig: {
|
||||
before: 'OpenAI 内容审核需要在',
|
||||
after: '中配置 OpenAI API 密钥。',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
automatic: {
|
||||
title: '自动编排',
|
||||
|
||||
@@ -30,6 +30,7 @@ const translation = {
|
||||
reload: 'Reload',
|
||||
ok: 'OK',
|
||||
log: 'Log',
|
||||
learnMore: 'Learn More',
|
||||
},
|
||||
placeholder: {
|
||||
input: 'Please enter',
|
||||
@@ -108,6 +109,7 @@ const translation = {
|
||||
provider: 'Model Provider',
|
||||
dataSource: 'Data Source',
|
||||
plugin: 'Plugins',
|
||||
apiBasedExtension: 'API-based Extension',
|
||||
},
|
||||
account: {
|
||||
avatar: 'Avatar',
|
||||
@@ -299,6 +301,37 @@ const translation = {
|
||||
keyFrom: 'Get your SerpAPI key from SerpAPI Account Page',
|
||||
},
|
||||
},
|
||||
apiBasedExtension: {
|
||||
title: 'API-based extensions provide centralized API management, simplifying configuration for easy use across Dify\'s applications.',
|
||||
link: 'Learn how to develop your own API-based Extension.',
|
||||
linkUrl: 'https://docs.dify.ai/advanced/api_based_extension',
|
||||
add: 'Add API-based Extension',
|
||||
selector: {
|
||||
title: 'API-based Extension',
|
||||
placeholder: 'Please select API-based extension',
|
||||
manage: 'Manage API-based Extension',
|
||||
},
|
||||
modal: {
|
||||
title: 'Add API-based Extension',
|
||||
editTitle: 'Edit API-based Extension',
|
||||
name: {
|
||||
title: 'Name',
|
||||
placeholder: 'Please enter the name',
|
||||
},
|
||||
apiEndpoint: {
|
||||
title: 'API Endpoint',
|
||||
placeholder: 'Please enter the API endpoint',
|
||||
},
|
||||
apiKey: {
|
||||
title: 'API-key',
|
||||
placeholder: 'Please enter the API-key',
|
||||
lengthError: 'API-key length cannot be less than 5 characters',
|
||||
},
|
||||
},
|
||||
confirm: {
|
||||
desc: 'Deleting the WebHook might cause the extension points configured for this API-based Extension to fail and produce errors. Please proceed with caution.',
|
||||
},
|
||||
},
|
||||
about: {
|
||||
changeLog: 'Changlog',
|
||||
updateNow: 'Update now',
|
||||
@@ -384,11 +417,12 @@ const translation = {
|
||||
},
|
||||
variable: {
|
||||
item: {
|
||||
title: 'Variables',
|
||||
desc: 'Insert variable template',
|
||||
title: 'Variables & External Tools',
|
||||
desc: 'Insert Variables & External Tools',
|
||||
},
|
||||
modal: {
|
||||
add: 'New variable',
|
||||
addTool: 'New tool',
|
||||
},
|
||||
},
|
||||
query: {
|
||||
|
||||
@@ -30,6 +30,7 @@ const translation = {
|
||||
reload: '刷新',
|
||||
ok: '好的',
|
||||
log: '日志',
|
||||
learnMore: '了解更多',
|
||||
},
|
||||
placeholder: {
|
||||
input: '请输入',
|
||||
@@ -108,6 +109,7 @@ const translation = {
|
||||
provider: '模型供应商',
|
||||
dataSource: '数据来源',
|
||||
plugin: '插件',
|
||||
apiBasedExtension: '基于 API 的扩展',
|
||||
},
|
||||
account: {
|
||||
avatar: '头像',
|
||||
@@ -299,6 +301,37 @@ const translation = {
|
||||
keyFrom: '从 SerpAPI 帐户页面获取您的 SerpAPI 密钥',
|
||||
},
|
||||
},
|
||||
apiBasedExtension: {
|
||||
title: '基于 API 的扩展提供了一个集中式的 API 管理,在此统一添加 API 配置后,方便在 Dify 上的各类应用中直接使用。',
|
||||
link: '了解如何开发您自己的基于 API 的扩展。',
|
||||
linkUrl: 'https://docs.dify.ai/v/zh-hans/advanced/api_based_extension',
|
||||
add: '新增基于 API 的扩展',
|
||||
selector: {
|
||||
title: '基于 API 的扩展',
|
||||
placeholder: '请选择基于 API 的扩展',
|
||||
manage: '管理基于 API 的扩展',
|
||||
},
|
||||
modal: {
|
||||
title: '新增基于 API 的扩展',
|
||||
editTitle: '编辑基于 API 的扩展',
|
||||
name: {
|
||||
title: '名称',
|
||||
placeholder: '请输入名称',
|
||||
},
|
||||
apiEndpoint: {
|
||||
title: 'API Endpoint',
|
||||
placeholder: '请输入 API endpoint',
|
||||
},
|
||||
apiKey: {
|
||||
title: 'API-key',
|
||||
placeholder: '请输入 API-key',
|
||||
lengthError: 'API-key 不能少于 5 位',
|
||||
},
|
||||
},
|
||||
confirm: {
|
||||
desc: '删除 WebHook 可能会导致这个基于 API 的扩展配置的扩展失败并产生错误。请谨慎删除。',
|
||||
},
|
||||
},
|
||||
about: {
|
||||
changeLog: '更新日志',
|
||||
updateNow: '现在更新',
|
||||
@@ -384,11 +417,12 @@ const translation = {
|
||||
},
|
||||
variable: {
|
||||
item: {
|
||||
title: '变量',
|
||||
desc: '插入变量模板',
|
||||
title: '变量 & 外部工具',
|
||||
desc: '插入变量和外部工具',
|
||||
},
|
||||
modal: {
|
||||
add: '添加新变量',
|
||||
addTool: '添加工具',
|
||||
},
|
||||
},
|
||||
query: {
|
||||
|
||||
@@ -3,8 +3,10 @@ const translation = {
|
||||
desc: 'Here you can modify the properties and working methods of the dataset.',
|
||||
form: {
|
||||
name: 'Dataset Name',
|
||||
namePlaceholder: 'Please enter the dataset name',
|
||||
nameError: 'Name cannot be empty',
|
||||
desc: 'Dataset description',
|
||||
descInfo: 'Please write a clear textual description to outline the content of the dataset. This description will be used as a basis for matching when selecting from multiple datasets for inference.',
|
||||
descPlaceholder: 'Describe what is in this data set. A detailed description allows AI to access the content of the data set in a timely manner. If empty, Dify will use the default hit strategy.',
|
||||
descWrite: 'Learn how to write a good dataset description.',
|
||||
permissions: 'Permissions',
|
||||
|
||||
@@ -3,8 +3,10 @@ const translation = {
|
||||
desc: '在这里您可以修改数据集的工作方式以及其它设置。',
|
||||
form: {
|
||||
name: '数据集名称',
|
||||
namePlaceholder: '请输入数据集名称',
|
||||
nameError: '名称不能为空',
|
||||
desc: '数据集描述',
|
||||
descInfo: '请写出清楚的文字描述来概述数据集的内容。当从多个数据集中进行选择匹配时,该描述将用作匹配的基础。',
|
||||
descPlaceholder: '描述这个数据集中的内容。详细的描述可以让 AI 及时访问数据集的内容。如果为空,Dify 将使用默认的命中策略。',
|
||||
descWrite: '了解如何编写更好的数据集描述。',
|
||||
permissions: '可见权限',
|
||||
|
||||
Reference in New Issue
Block a user