feat: advanced prompt (#1330)

Co-authored-by: Joel <iamjoel007@gmail.com>
Co-authored-by: JzoNg <jzongcode@gmail.com>
Co-authored-by: Gillian97 <jinling.sunshine@gmail.com>
This commit is contained in:
zxhlyh
2023-10-12 23:14:28 +08:00
committed by GitHub
parent 42a5b3ec17
commit 5b9858a8a3
131 changed files with 5944 additions and 451 deletions

View File

@@ -1,5 +1,22 @@
const translation = {
pageTitle: '提示词编排',
pageTitle: {
line1: '提示词',
line2: '编排',
},
promptMode: {
simple: '切换到高级模式以编辑内置的提示词',
advanced: '高级模式',
switchBack: '返回简单模式',
advancedWarning: {
title: '您已切换到高级模式,一旦修改提示词,将无法返回简单模式。',
description: '在高级模式下,您可以编辑内置的提示词。',
learnMore: '了解更多',
ok: '确定',
},
operation: {
addMessage: '添加消息',
},
},
operation: {
applyConfig: '发布',
resetConfig: '重置',
@@ -80,6 +97,17 @@ const translation = {
deleteContextVarTip: '该变量已被设置为上下文查询变量,删除该变量将影响数据集的正常使用。 如果您仍需要删除它,请在上下文部分中重新选择它。',
},
},
conversationHistory: {
title: '对话历史',
description: '设置对话角色的前缀名称',
tip: '对话历史未启用,请在上面的提示中添加<histories>。',
learnMore: '了解更多',
editModal: {
title: '编辑对话角色名称',
userPrefix: '用户前缀',
assistantPrefix: '助手前缀',
},
},
},
automatic: {
title: '自动编排',
@@ -132,13 +160,15 @@ const translation = {
},
varKeyError: {
canNoBeEmpty: '变量不能为空',
tooLong: '变量: {{key}} 长度太长。不能超过 16 个字符',
tooLong: '变量: {{key}} 长度太长。不能超过 30 个字符',
notValid: '变量: {{key}} 非法。只能包含英文字符,数字和下划线',
notStartWithNumber: '变量: {{key}} 不能以数字开头',
keyAlreadyExists: '变量:{{key}} 已存在',
},
otherError: {
promptNoBeEmpty: '前缀提示词不能为空',
promptNoBeEmpty: '提示词不能为空',
historyNoBeEmpty: '提示词中必须设置对话历史',
queryNoBeEmpty: '提示词中必须设置查询内容',
},
variableConig: {
modalTitle: '变量设置',
@@ -182,6 +212,13 @@ const translation = {
run: '运行',
},
result: '结果',
datasetConfig: {
params: '参数设置',
top_k: 'Top K',
top_kTip: '用于筛选与用户问题相似度最高的文本片段。系统同时会根据选用模型上下文窗口大小动态调整分段数量。',
score_threshold: 'Score 阈值',
score_thresholdTip: '用于设置文本片段筛选的相似度阈值。',
},
}
export default translation