diff --git a/web/app/components/datasets/create/file-uploader/index.tsx b/web/app/components/datasets/create/file-uploader/index.tsx
index 5ed4b7dd05..92dfc0f9c0 100644
--- a/web/app/components/datasets/create/file-uploader/index.tsx
+++ b/web/app/components/datasets/create/file-uploader/index.tsx
@@ -322,6 +322,7 @@ const FileUploader = ({
{t('datasetCreation.stepOne.uploader.tip', {
size: fileUploadConfig.file_size_limit,
supportTypes: supportTypesShowNames,
+ batchCount: fileUploadConfig.batch_count_limit,
})}
{dragging && }
diff --git a/web/app/components/datasets/documents/create-from-pipeline/index.tsx b/web/app/components/datasets/documents/create-from-pipeline/index.tsx
index fc19058cca..3e727b4ba7 100644
--- a/web/app/components/datasets/documents/create-from-pipeline/index.tsx
+++ b/web/app/components/datasets/documents/create-from-pipeline/index.tsx
@@ -25,6 +25,7 @@ import ProcessDocuments from './process-documents'
import ChunkPreview from './preview/chunk-preview'
import Processing from './processing'
import { DatasourceType } from '@/models/pipeline'
+import { TransferMethod } from '@/types/app'
const TestRunPanel = () => {
const { t } = useTranslation()
@@ -137,12 +138,14 @@ const TestRunPanel = () => {
if (datasource.type === DatasourceType.localFile) {
const { id, name, type, size, extension, mime_type } = previewFile.current as File
const documentInfo = {
- upload_file_id: id,
+ related_id: id,
name,
type,
size,
extension,
mime_type,
+ url: '',
+ transfer_method: TransferMethod.local_file,
}
datasourceInfoList.push(documentInfo)
}
@@ -183,12 +186,14 @@ const TestRunPanel = () => {
fileList.forEach((file) => {
const { id, name, type, size, extension, mime_type } = file.file
const documentInfo = {
- upload_file_id: id,
+ related_id: id,
name,
type,
size,
extension,
mime_type,
+ url: '',
+ transfer_method: TransferMethod.local_file,
}
datasourceInfoList.push(documentInfo)
})
diff --git a/web/app/components/rag-pipeline/components/panel/test-run/data-source/local-file/file-uploader.tsx b/web/app/components/rag-pipeline/components/panel/test-run/data-source/local-file/file-uploader.tsx
index c596ad49a7..a8568266c4 100644
--- a/web/app/components/rag-pipeline/components/panel/test-run/data-source/local-file/file-uploader.tsx
+++ b/web/app/components/rag-pipeline/components/panel/test-run/data-source/local-file/file-uploader.tsx
@@ -274,6 +274,7 @@ const FileUploader = ({
{t('datasetCreation.stepOne.uploader.tip', {
size: fileUploadConfig.file_size_limit,
supportTypes: supportTypesShowNames,
+ batchCount: fileUploadConfig.batch_count_limit,
})}
{dragging && }
diff --git a/web/app/components/rag-pipeline/components/panel/test-run/index.tsx b/web/app/components/rag-pipeline/components/panel/test-run/index.tsx
index 032be2da47..17fe9a7334 100644
--- a/web/app/components/rag-pipeline/components/panel/test-run/index.tsx
+++ b/web/app/components/rag-pipeline/components/panel/test-run/index.tsx
@@ -18,6 +18,8 @@ import { useTranslation } from 'react-i18next'
import { usePipelineRun } from '../../../hooks'
import type { Datasource } from './types'
import { DatasourceType } from '@/models/pipeline'
+import { TransferMethod } from '@/types/app'
+import Tooltip from '@/app/components/base/tooltip'
const TestRunPanel = () => {
const { t } = useTranslation()
@@ -96,12 +98,14 @@ const TestRunPanel = () => {
if (datasource.type === DatasourceType.localFile) {
const { id, name, type, size, extension, mime_type } = fileList[0].file
const documentInfo = {
- upload_file_id: id,
+ related_id: id,
name,
type,
size,
extension,
mime_type,
+ url: '',
+ transfer_method: TransferMethod.local_file,
}
datasourceInfoList.push(documentInfo)
}
@@ -140,8 +144,12 @@ const TestRunPanel = () => {
-
- {t('datasetPipeline.testRun.title')}
+
+ {t('datasetPipeline.testRun.title')}
+
diff --git a/web/i18n/en-US/dataset-creation.ts b/web/i18n/en-US/dataset-creation.ts
index 96640cf8a5..dd1c6657dc 100644
--- a/web/i18n/en-US/dataset-creation.ts
+++ b/web/i18n/en-US/dataset-creation.ts
@@ -37,7 +37,7 @@ const translation = {
title: 'Upload file',
button: 'Drag and drop file or folder, or',
browse: 'Browse',
- tip: 'Supports {{supportTypes}}. Max {{size}}MB each.',
+ tip: 'Supports {{supportTypes}}. Max {{batchCount}} in a batch and {{size}} MB each.',
validation: {
typeError: 'File type not supported',
size: 'File too large. Maximum is {{size}}MB',
diff --git a/web/i18n/en-US/dataset-pipeline.ts b/web/i18n/en-US/dataset-pipeline.ts
index ab53bb5f97..ab904350c7 100644
--- a/web/i18n/en-US/dataset-pipeline.ts
+++ b/web/i18n/en-US/dataset-pipeline.ts
@@ -49,6 +49,7 @@ const translation = {
},
testRun: {
title: 'Test Run',
+ tooltip: 'In Test Run mode, only one file upload at a time is allowed for easier debugging and observation.',
steps: {
dataSource: 'Data Source',
documentProcessing: 'Document Processing',
diff --git a/web/i18n/zh-Hans/dataset-creation.ts b/web/i18n/zh-Hans/dataset-creation.ts
index ecf46c9d73..d9a7edb0f6 100644
--- a/web/i18n/zh-Hans/dataset-creation.ts
+++ b/web/i18n/zh-Hans/dataset-creation.ts
@@ -37,7 +37,7 @@ const translation = {
title: '上传文本文件',
button: '拖拽文件或文件夹至此,或者',
browse: '选择文件',
- tip: '已支持 {{supportTypes}},每个文件不超过 {{size}}MB。',
+ tip: '已支持 {{supportTypes}},每批最多 {{batchCount}} 个文件,每个文件不超过 {{size}} MB。',
validation: {
typeError: '文件类型不支持',
size: '文件太大了,不能超过 {{size}}MB',
diff --git a/web/i18n/zh-Hans/dataset-pipeline.ts b/web/i18n/zh-Hans/dataset-pipeline.ts
index 8bca2839d5..c0aff73e87 100644
--- a/web/i18n/zh-Hans/dataset-pipeline.ts
+++ b/web/i18n/zh-Hans/dataset-pipeline.ts
@@ -49,6 +49,7 @@ const translation = {
},
testRun: {
title: '测试运行',
+ tooltip: '在测试运行模式下,每次只能上传一个文件,便于调试和观察。',
steps: {
dataSource: '数据源',
documentProcessing: '文档处理',