feat: annotation management frontend (#1764)

This commit is contained in:
Joel
2023-12-18 15:41:24 +08:00
committed by GitHub
parent 96d2de2258
commit 65fd4b39ce
122 changed files with 4718 additions and 214 deletions

View File

@@ -0,0 +1,87 @@
const translation = {
title: 'Annotations',
name: 'Annotated Response',
editBy: 'Answer edited by {{author}}',
noData: {
title: 'No annotations',
description: 'You can edit annotations in app debuggiung, or import annotations in bulk here for high-quality response.',
},
table: {
header: {
question: 'question',
answer: 'answer',
createdAt: 'created at',
hits: 'hits',
actions: 'actions',
addAnnotation: 'Add Annotation',
bulkImport: 'Bulk Import',
bulkExport: 'Bulk Export',
clearAll: 'Clear All Annotation',
},
},
editModal: {
title: 'Edit Annotated Response',
queryName: 'User Query',
answerName: 'Storyteller Bot',
yourAnswer: 'Your Answer',
answerPlaceholder: 'Type your answer here',
yourQuery: 'Your Query',
queryPlaceholder: 'Type your query here',
removeThisCache: 'Remove this Annotation',
createdAt: 'Created At',
},
addModal: {
title: 'Add Annotated Response',
queryName: 'Question',
answerName: 'Answer',
answerPlaceholder: 'Type answer here',
queryPlaceholder: 'Type query here',
createNext: 'Add another annotated response',
},
batchModal: {
title: 'Bulk Import',
csvUploadTitle: 'Drag and drop your CSV file here, or ',
browse: 'browse',
tip: 'The CSV file must conform to the following structure:',
question: 'question',
answer: 'answer',
contentTitle: 'chunk content',
content: 'content',
template: 'Download the template here',
cancel: 'Cancel',
run: 'Run Batch',
runError: 'Run batch failed',
processing: 'In batch processing',
completed: 'Import completed',
error: 'Import Error',
ok: 'OK',
},
errorMessage: {
answerRequired: 'Answer is required',
queryRequired: 'Question is required',
},
viewModal: {
annotatedResponse: 'Annotated Response',
hitHistory: 'Hit History',
hit: 'Hit',
hits: 'Hits',
noHitHistory: 'No hit history',
},
hitHistoryTable: {
query: 'Query',
match: 'Match',
response: 'Response',
source: 'Source',
score: 'Score',
time: 'Time',
},
initSetup: {
title: 'Annotated Response Initial Setup',
configTitle: 'Annotated Response Setup',
confirmBtn: 'Save & Enable',
configConfirmBtn: 'Save',
},
embeddingModelSwitchTip: 'Annotation text vectorization model, switching models will be re-embedded, resulting in additional costs.',
}
export default translation

View File

@@ -0,0 +1,90 @@
const translation = {
title: '标注',
name: '标注回复',
editBy: '{{author}}编辑的答案',
noData: {
title: '没有标注',
description: '你可以在应用会话调试中编辑标注,也可以在此批量导入标注用于高质量回复。',
},
table: {
header: {
question: '提问',
match: '匹配',
response: '回复',
answer: '答案',
createdAt: '创建时间',
hits: '命中次数',
actions: '操作',
addAnnotation: '添加标注',
bulkImport: '批量导入',
bulkExport: '批量导出',
clearAll: '删除所有标注',
},
},
editModal: {
title: '编辑标注回复',
queryName: '用户提问',
answerName: '机器回复',
yourAnswer: '您的回复',
answerPlaceholder: '在这里输入您的回复',
yourQuery: '您的提问',
queryPlaceholder: '在这里输入您的提问',
removeThisCache: '删除此标注',
createdAt: '创建于',
},
addModal: {
title: '添加标注回复',
queryName: '提问',
answerName: '回复',
answerPlaceholder: '输入回复',
queryPlaceholder: '输入提问',
createNext: '添加下一个标注回复',
},
batchModal: {
title: '批量导入',
csvUploadTitle: '将您的 CSV 文件拖放到此处,或',
browse: '选择文件',
tip: 'CSV 文件必须符合以下结构:',
question: '问题',
answer: '回答',
contentTitle: '分段内容',
content: '内容',
template: '下载模板',
cancel: '取消',
run: '导入',
runError: '批量导入失败',
processing: '批量处理中',
completed: '导入完成',
error: '导入出错',
ok: '确定',
},
errorMessage: {
answerRequired: '回复不能为空',
queryRequired: '提问不能为空',
},
viewModal: {
annotatedResponse: '标注回复',
hitHistory: '命中历史',
hit: '次命中',
hits: '次命中',
noHitHistory: '没有命中历史',
},
hitHistoryTable: {
question: '问题',
query: '提问',
match: '匹配',
response: '回复',
source: '来源',
score: '分数',
time: '时间',
},
initSetup: {
title: '标注回复初始设置',
configTitle: '标注回复设置',
confirmBtn: '保存并启用',
configConfirmBtn: '保存',
},
embeddingModelSwitchTip: '标注文本向量化模型,切换模型会重新嵌入,产生额外费用消耗',
}
export default translation

View File

@@ -75,6 +75,27 @@ const translation = {
description: 'Once enabled, show source document and attributed section of the generated content.',
resDes: 'Citations and Attributions is enabled',
},
annotation: {
title: 'Annotated Response',
description: 'You can manually add high-quality response to the cache for prioritized matching with similar user questions.',
resDes: 'Annotation Response is enabled',
scoreThreshold: {
title: 'Score Threshold',
description: 'Used to set the similarity threshold for annotation response.',
easyMatch: 'Easy Match',
accurateMatch: 'Accurate Match',
},
matchVariable: {
title: 'Match Variable',
choosePlaceholder: 'Choose match variable',
},
cacheManagement: 'Annotations',
cached: 'Annotationed',
remove: 'Remove',
removeConfirm: 'Delete this annotation ?',
add: 'Add annotation',
edit: 'Edit annotation',
},
dataSet: {
title: 'Context',
noData: 'You can import Knowledge as context',

View File

@@ -75,6 +75,27 @@ const translation = {
description: '启用后,显示源文档和生成内容的归属部分。',
resDes: '引用和归属已启用',
},
annotation: {
title: '标注回复',
description: '启用后,将标注用户的回复,以便在用户重复提问时快速响应。',
resDes: '标注回复已启用',
scoreThreshold: {
title: '分数阈值',
description: '用于设置标注回复的匹配相似度阈值。',
easyMatch: '容易匹配',
accurateMatch: '精准匹配',
},
matchVariable: {
title: '匹配变量',
choosePlaceholder: '请选择变量',
},
cacheManagement: '标注管理',
cached: '已标注',
remove: '移除',
removeConfirm: '删除这个标注?',
add: '添加标注',
edit: '编辑标注',
},
dataSet: {
title: '上下文',
noData: '您可以导入知识库作为上下文',

View File

@@ -1,5 +1,5 @@
const translation = {
title: 'Logs & Annotations',
title: 'Logs',
description: 'The logs record the running status of the application, including user inputs and AI replies.',
dateTimeFormat: 'MM/DD/YYYY hh:mm A',
table: {

View File

@@ -1,5 +1,5 @@
const translation = {
title: '日志与标注',
title: '日志',
description: '日志记录了应用的运行情况,包括用户的输入和 AI 的回复。',
dateTimeFormat: 'YYYY-MM-DD HH:mm',
table: {

View File

@@ -98,6 +98,11 @@ const translation = {
fullTipLine1: 'Upgrade your plan to',
fullTipLine2: 'build more apps.',
},
annotatedResponse: {
fullTipLine1: 'Upgrade your plan to',
fullTipLine2: 'annotate more conversations.',
quotaTitle: 'Annotated Response Quota',
},
}
export default translation

View File

@@ -98,6 +98,11 @@ const translation = {
fullTipLine1: '升级您的套餐以',
fullTipLine2: '构建更多的程序。',
},
annotatedResponse: {
fullTipLine1: '升级您的套餐以',
fullTipLine2: '标注更多对话。',
quotaTitle: '标注的配额',
},
}
export default translation

View File

@@ -1,6 +1,7 @@
const translation = {
api: {
success: 'Success',
actionSuccess: 'Action succeeded',
saved: 'Saved',
create: 'Created',
remove: 'Removed',
@@ -31,6 +32,7 @@ const translation = {
ok: 'OK',
log: 'Log',
learnMore: 'Learn More',
params: 'Params',
},
placeholder: {
input: 'Please enter',
@@ -236,6 +238,7 @@ const translation = {
embeddingModel: {
key: 'Embedding Model',
tip: 'Set the default model for document embedding processing of the Knowledge, both retrieval and import of the Knowledge use this Embedding model for vectorization processing. Switching will cause the vector dimension between the imported Knowledge and the question to be inconsistent, resulting in retrieval failure. To avoid retrieval failure, please do not switch this model at will.',
required: 'Embedding Model is required',
},
speechToTextModel: {
key: 'Speech-to-Text Model',

View File

@@ -1,6 +1,7 @@
const translation = {
api: {
success: '成功',
actionSuccess: '操作成功',
saved: '已保存',
create: '已创建',
remove: '已移除',
@@ -31,6 +32,7 @@ const translation = {
ok: '好的',
log: '日志',
learnMore: '了解更多',
params: '参数',
},
placeholder: {
input: '请输入',
@@ -236,6 +238,7 @@ const translation = {
embeddingModel: {
key: 'Embedding 模型',
tip: '设置知识库文档嵌入处理的默认模型检索和导入知识库均使用该Embedding模型进行向量化处理切换后将导致已导入的知识库与问题之间的向量维度不一致从而导致检索失败。为避免检索失败请勿随意切换该模型。',
required: '请选择 Embedding 模型',
},
speechToTextModel: {
key: '语音转文本模型',