diff --git a/.kiwi/en-US/DataHandle.ts b/.kiwi/en-US/DataHandle.ts
index 3f2dd5b..4ddff01 100644
--- a/.kiwi/en-US/DataHandle.ts
+++ b/.kiwi/en-US/DataHandle.ts
@@ -43,8 +43,8 @@ export default {
kaiShiShiJian: 'Start Time',
wanChengShiJian: 'Completion time',
chuangJianRen: 'Creator',
- chuLiHouShuJu: 'Processed Dataset',
- chuLiQianShuJu: 'Dataset before Processing',
+ chuLiHouShuJu: 'Processed Dataset:',
+ chuLiQianShuJu: 'Dataset before Processing:',
qAWenBen: 'QA Text',
puTongWenBen: 'Normal ext',
wenJianLeiXing: 'File Type',
diff --git a/.kiwi/zh-CN/DataHandle.ts b/.kiwi/zh-CN/DataHandle.ts
index 2240c7f..cbb6449 100644
--- a/.kiwi/zh-CN/DataHandle.ts
+++ b/.kiwi/zh-CN/DataHandle.ts
@@ -43,8 +43,8 @@ export default {
kaiShiShiJian: '开始时间',
wanChengShiJian: '完成时间',
chuangJianRen: '创建人',
- chuLiHouShuJu: '处理后数据集',
- chuLiQianShuJu: '处理前数据集',
+ chuLiHouShuJu: '处理后数据集:',
+ chuLiQianShuJu: '处理前数据集:',
qAWenBen: 'QA文本',
puTongWenBen: '普通文本',
wenJianLeiXing: '文件类型',
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 8f030c5..cf4c18e 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -3524,7 +3524,7 @@ packages:
'@dnd-kit/core': ^6.0.7
react: '>=16.8.0'
dependencies:
- '@dnd-kit/core': 6.1.0(react-dom@17.0.2)(react@18.2.0)
+ '@dnd-kit/core': 6.1.0(react-dom@18.2.0)(react@18.2.0)
'@dnd-kit/utilities': 3.2.2(react@18.2.0)
react: 18.2.0
tslib: 2.6.2
diff --git a/src/pages/CreateDataHandle/index.jsx b/src/pages/CreateDataHandle/index.jsx
index 896f60e..1603c00 100644
--- a/src/pages/CreateDataHandle/index.jsx
+++ b/src/pages/CreateDataHandle/index.jsx
@@ -91,13 +91,6 @@ class $$Page extends React.Component {
this.state = {
afterTreatmentData: [
- {
- _type: 'qa_split',
- type: 'QA拆分',
- before:
- ' 为了保证知识库问答质量,需要对文档做 QA 拆分,QA 拆分时需要选择对应的模型服务。',
- after: `Q:为什么要做 QA 拆分?
A:为了保证知识库问答质量。
Q:QA 拆分需要注意什么?
A:QA 拆分时需要选择对应的模型服务。`,
- },
{
_type: 'document_chunk',
type: '文本分段',
@@ -110,6 +103,13 @@ class $$Page extends React.Component {
为:分段长度 40 字符,分段重叠长度 10 字符。
`,
},
+ {
+ _type: 'qa_split',
+ type: 'QA拆分',
+ before:
+ ' 为了保证知识库问答质量,需要对文档做 QA 拆分,QA 拆分时需要选择对应的模型服务。',
+ after: `Q:为什么要做 QA 拆分?
A:为了保证知识库问答质量。
Q:QA 拆分需要注意什么?
A:QA 拆分时需要选择对应的模型服务。`,
+ },
{
_type: 'remove_invisible_characters',
type: '移除不可见字符',
@@ -181,8 +181,8 @@ class $$Page extends React.Component {
cacheqaSplitHighConfig: {},
configEnableMap: {},
configMap: {
- qa_split: 'QAsplitChecked',
document_chunk: 'TextSegmentationChecked',
+ qa_split: 'QAsplitChecked',
remove_invisible_characters: 'RemoveInvisibleCharactersChecked',
space_standardization: 'SpaceHandleChecked',
remove_garbled_text: 'RemoveGarbledCodeChecked',
@@ -237,16 +237,16 @@ class $$Page extends React.Component {
},
step2FormData: {},
step3Data: {
- QAsplitChecked: true,
- QAsplitForm: {
- type: undefined,
- model: undefined,
- },
TextSegmentationChecked: true,
TextSegmentationForm: {
chunk_size: 500,
chunk_overlap: 50,
},
+ QAsplitChecked: true,
+ QAsplitForm: {
+ type: undefined,
+ model: undefined,
+ },
RemoveInvisibleCharactersChecked: true,
SpaceHandleChecked: true,
RemoveGarbledCodeChecked: true,
diff --git a/src/pages/DataHandleDetail/FileStatus.less b/src/pages/DataHandleDetail/FileStatus.less
index 8c12bd3..a377dea 100644
--- a/src/pages/DataHandleDetail/FileStatus.less
+++ b/src/pages/DataHandleDetail/FileStatus.less
@@ -19,5 +19,5 @@
margin-right: 8px;
}
.retry {
- margin-left: 4px;
+ margin-left: 16px;
}
diff --git a/src/pages/DataHandleDetail/FileStatus.tsx b/src/pages/DataHandleDetail/FileStatus.tsx
index b4547e4..312533d 100644
--- a/src/pages/DataHandleDetail/FileStatus.tsx
+++ b/src/pages/DataHandleDetail/FileStatus.tsx
@@ -5,6 +5,7 @@ import React, { useEffect, useState } from 'react';
import Status from '@/components/Status';
import I18N from '@/utils/kiwiI18N';
+import utils from '../../utils/__utils';
import styles from './FileStatus.less';
interface Iprops {
@@ -62,13 +63,6 @@ const FileStatus: React.FC = props => {
@@ -83,22 +77,54 @@ const FileStatus: React.FC = props => {
setFileStatusCount(statusCount);
// setItems(_items);
}, [file_details]);
+
+ const onRetry = () => {
+ const record = props.data;
+ utils.bff
+ .dataProcessRetry({
+ input: {
+ id: record.id,
+ creator: utils.getAuthData()?.user?.name,
+ },
+ })
+ .then(res => {
+ utils.notification.success({
+ message: res.dataProcess.dataProcessRetry.message,
+ });
+ props.getData();
+ })
+ .catch(error => {
+ utils.notification.warn({
+ message: '重试失败',
+ });
+ });
+ };
+
return (
-
+
= props => {
{item.file_name}
- {item.status === 'fail' ? (
-
- {I18N.DataHandle.chongShi}
-
- ) : (
- ''
- )}
diff --git a/src/pages/DataHandleDetail/index.tsx b/src/pages/DataHandleDetail/index.tsx
index 8a06766..5d7c3ce 100644
--- a/src/pages/DataHandleDetail/index.tsx
+++ b/src/pages/DataHandleDetail/index.tsx
@@ -85,56 +85,6 @@ const DataHandleDetail = props => {
children:
detailData.file_type === 'text' ? I18N.DataHandle.puTongWenBen : I18N.DataHandle.qAWenBen,
},
- {
- label: I18N.DataHandle.chuLiQianShuJu,
- children: (
- <>
- Link('/dataset/detail/' + detailData.pre_dataset_name)}>
- {detailData.pre_dataset_name}
-
- ---
-
- Link(
- '/dataset/detail/' +
- detailData.pre_dataset_name +
- '/version/' +
- detailData.pre_dataset_name +
- '-' +
- detailData.pre_dataset_version
- )
- }
- >
- {detailData.pre_dataset_version}
-
- >
- ),
- },
- {
- label: I18N.DataHandle.chuLiHouShuJu,
- children: (
- <>
- Link('/dataset/detail/' + detailData.post_dataset_name)}>
- {detailData.post_dataset_name}
-
- ---
-
- Link(
- '/dataset/detail/' +
- detailData.post_dataset_name +
- '/version/' +
- detailData.post_dataset_name +
- '-' +
- detailData.post_dataset_version
- )
- }
- >
- {detailData.post_dataset_version}
-
- >
- ),
- },
{
label: I18N.DataHandle.kaiShiShiJian,
children: (
@@ -324,6 +274,62 @@ const DataHandleDetail = props => {
{I18N.DataHandle.haoShi}
{calcSpendTime(item)}
+
+ {I18N.DataHandle.chuLiQianShuJu}
+ <>
+ Link('/dataset/detail/' + detailData.pre_dataset_name)}>
+ {detailData.pre_dataset_name}
+
+ ---
+
+ Link(
+ '/dataset/detail/' +
+ detailData.pre_dataset_name +
+ '/version/' +
+ detailData.pre_dataset_name +
+ '-' +
+ detailData.pre_dataset_version
+ )
+ }
+ >
+ {detailData.pre_dataset_version}
+
+ >
+
+ {I18N.DataHandle.chuLiHouShuJu}
+ <>
+ Link('/dataset/detail/' + detailData.pre_dataset_name)}>
+ {detailData.pre_dataset_name}
+
+ ---
+
+ Link(
+ '/dataset/detail/' +
+ detailData.pre_dataset_name +
+ '/version/' +
+ detailData.pre_dataset_name +
+ '-' +
+ detailData.pre_dataset_version
+ )
+ }
+ >
+ {detailData.pre_dataset_version}
+
+ >
>
}
title={{item.name || I18N.DataHandle.zheShiYiGeMing}
}