+ {renderHitResults(generalResultData)}
{submitLoading
?
= ({ datasetId }: Props) => {
return renderEmptyState()
if (hitResult?.records.length)
- return renderHitResults(hitResult.records, onClickCard)
+ return renderHitResults(hitResult.records)
- return renderHitResults(externalHitResult?.records || [], onClickExternalCard)
+ return renderHitResults(externalHitResult?.records || [])
})()
)
}
diff --git a/web/app/components/datasets/hit-testing/style.module.css b/web/app/components/datasets/hit-testing/style.module.css
index 1e90902a70..7d83b8abb6 100644
--- a/web/app/components/datasets/hit-testing/style.module.css
+++ b/web/app/components/datasets/hit-testing/style.module.css
@@ -5,7 +5,7 @@
@apply flex-1 h-full;
}
.leftDiv {
- @apply border-r border-gray-100 px-6 py-3 flex flex-col;
+ @apply px-6 py-3 flex flex-col;
}
.rightDiv {
@apply flex flex-col;
diff --git a/web/i18n/en-US/common.ts b/web/i18n/en-US/common.ts
index 6b60a7a5cc..f2cef3f0c6 100644
--- a/web/i18n/en-US/common.ts
+++ b/web/i18n/en-US/common.ts
@@ -42,6 +42,8 @@ const translation = {
zoomOut: 'Zoom Out',
zoomIn: 'Zoom In',
openInNewTab: 'Open in new tab',
+ saveAndRegenerate: 'Save & Regenerate Child Chunks',
+ close: 'Close',
},
errorMsg: {
fieldRequired: '{{field}} is required',
diff --git a/web/i18n/en-US/dataset-documents.ts b/web/i18n/en-US/dataset-documents.ts
index 11f0cd4127..00eafb7a2e 100644
--- a/web/i18n/en-US/dataset-documents.ts
+++ b/web/i18n/en-US/dataset-documents.ts
@@ -353,7 +353,12 @@ const translation = {
delete: 'Delete this chunk ?',
chunkAdded: '1 chunk added',
viewAddedChunk: 'View',
- saveAndRegenerate: 'Save & Regenerate Child Chunks',
+ regenerationConfirmTitle: 'Do you want to regenerate child chunks?',
+ regenerationConfirmMessage: 'Regenerating child chunks will overwrite the current child chunks, including edited chunks and newly added chunks. The regeneration cannot be undone.',
+ regeneratingTitle: 'Regenerating child chunks',
+ regeneratingMessage: 'This may take a moment, please wait...',
+ regenerationSuccessTitle: 'Regeneration completed',
+ regenerationSuccessMessage: 'You can close this window.',
},
}
diff --git a/web/i18n/en-US/dataset-hit-testing.ts b/web/i18n/en-US/dataset-hit-testing.ts
index 6dbfa47fee..385d68c771 100644
--- a/web/i18n/en-US/dataset-hit-testing.ts
+++ b/web/i18n/en-US/dataset-hit-testing.ts
@@ -19,7 +19,7 @@ const translation = {
testing: 'Testing',
},
hit: {
- title: 'RETRIEVAL PARAGRAPHS',
+ title: '{{num}} Retrieved Chunks',
emptyTip: 'Retrieval Testing results will show here',
},
noRecentTip: 'No recent query results here',
diff --git a/web/i18n/zh-Hans/common.ts b/web/i18n/zh-Hans/common.ts
index ec4b0acf9f..7c74b08d73 100644
--- a/web/i18n/zh-Hans/common.ts
+++ b/web/i18n/zh-Hans/common.ts
@@ -42,6 +42,8 @@ const translation = {
zoomOut: '缩小',
zoomIn: '放大',
openInNewTab: '在新标签页打开',
+ saveAndRegenerate: '保存并重新生成子分段',
+ close: '关闭',
},
errorMsg: {
fieldRequired: '{{field}} 为必填项',
diff --git a/web/i18n/zh-Hans/dataset-documents.ts b/web/i18n/zh-Hans/dataset-documents.ts
index 824da98850..18378c9154 100644
--- a/web/i18n/zh-Hans/dataset-documents.ts
+++ b/web/i18n/zh-Hans/dataset-documents.ts
@@ -351,7 +351,12 @@ const translation = {
delete: '删除这个分段?',
chunkAdded: '新增一个分段',
viewAddedChunk: '查看',
- saveAndRegenerate: '保存并重新生成子分段',
+ regenerationConfirmTitle: '是否需要重新生成子分段?',
+ regenerationConfirmMessage: '重新生成的子分段将会覆盖当前的子分段,包括编辑过的分段和新添加的分段。重新生成操作无法撤销。',
+ regeneratingTitle: '正在生成子分段',
+ regeneratingMessage: '生成子分段需要一些时间,请耐心等待...',
+ regenerationSuccessTitle: '子分段已重新生成',
+ regenerationSuccessMessage: '可以关闭窗口',
},
}
diff --git a/web/i18n/zh-Hans/dataset-hit-testing.ts b/web/i18n/zh-Hans/dataset-hit-testing.ts
index 09cfdc2824..6aba135c71 100644
--- a/web/i18n/zh-Hans/dataset-hit-testing.ts
+++ b/web/i18n/zh-Hans/dataset-hit-testing.ts
@@ -19,7 +19,7 @@ const translation = {
testing: '测试',
},
hit: {
- title: '召回段落',
+ title: '{{num}} 个召回段落',
emptyTip: '召回测试结果将展示在这里',
},
noRecentTip: '最近无查询结果',
diff --git a/web/models/datasets.ts b/web/models/datasets.ts
index 10495f19e7..72e7d3751d 100644
--- a/web/models/datasets.ts
+++ b/web/models/datasets.ts
@@ -479,10 +479,16 @@ export type HitTestingRecord = {
created_at: number
}
+export type HitTestingChildChunk = {
+ id: string
+ content: string
+ score: number
+}
export type HitTesting = {
segment: Segment
score: number
tsne_position: TsnePosition
+ child_chunks?: HitTestingChildChunk[] | null
}
export type ExternalKnowledgeBaseHitTesting = {