{
- TEST RUN
+ {t('datasetPipeline.testRun.title')}
@@ -119,10 +176,10 @@ const TestRunPanel = () => {
- {dataSource === DataSourceType.FILE && (
+ {datasource.type === DataSourceType.FILE && (
{
notSupportBatchUpload={notSupportBatchUpload}
/>
)}
- {dataSource === DataSourceType.NOTION && (
+ {datasource.type === DataSourceType.NOTION && (
)}
- {dataSource === DataSourceProvider.fireCrawl && (
+ {datasource.type === DataSourceProvider.fireCrawl && (
{
onCrawlOptionsChange={setCrawlOptions}
/>
)}
- {dataSource === DataSourceProvider.jinaReader && (
+ {datasource.type === DataSourceProvider.jinaReader && (
{
onCrawlOptionsChange={setCrawlOptions}
/>
)}
- {dataSource === DataSourceProvider.waterCrawl && (
+ {datasource.type === DataSourceProvider.waterCrawl && (
{
{
currentStep === 2 && (
{
- console.log('Processing data:', data)
- }}
+ onProcess={handleProcess}
onBack={handleBackStep}
/>
)
diff --git a/web/app/components/rag-pipeline/components/panel/test-run/types.ts b/web/app/components/rag-pipeline/components/panel/test-run/types.ts
index 72ee5acaca..990fbda47f 100644
--- a/web/app/components/rag-pipeline/components/panel/test-run/types.ts
+++ b/web/app/components/rag-pipeline/components/panel/test-run/types.ts
@@ -1,3 +1,6 @@
+import type { DataSourceProvider } from '@/models/common'
+import type { DataSourceType } from '@/models/datasets'
+
export enum TestRunStep {
dataSource = 'dataSource',
documentProcessing = 'documentProcessing',
@@ -6,4 +9,11 @@ export enum TestRunStep {
export type DataSourceOption = {
label: string
value: string
+ type: DataSourceType | DataSourceProvider
+}
+
+export type Datasource = {
+ nodeId: string
+ type: DataSourceType | DataSourceProvider
+ config: any
}
diff --git a/web/i18n/en-US/dataset-pipeline.ts b/web/i18n/en-US/dataset-pipeline.ts
index 705a484a13..c479e7e801 100644
--- a/web/i18n/en-US/dataset-pipeline.ts
+++ b/web/i18n/en-US/dataset-pipeline.ts
@@ -23,6 +23,8 @@ const translation = {
editInfo: 'Edit info',
exportDSL: 'Export DSL',
useTemplate: 'Use this Knowledge Pipeline',
+ backToDataSource: 'Back to Data Source',
+ process: 'Process',
},
knowledgeNameAndIcon: 'Knowledge name & icon',
knowledgeNameAndIconPlaceholder: 'Please enter the name of the Knowledge Base',
@@ -43,6 +45,16 @@ const translation = {
structure: 'Structure',
structureTooltip: 'Chunk Structure determines how documents are split and indexed—offering General, Parent-Child, and Q&A modes—and is unique to each knowledge base.',
},
+ testRun: {
+ title: 'Test Run',
+ steps: {
+ dataSource: 'Data Source',
+ documentProcessing: 'Document Processing',
+ },
+ dataSource: {
+ localFiles: 'Local Files',
+ },
+ },
}
export default translation
diff --git a/web/i18n/zh-Hans/dataset-pipeline.ts b/web/i18n/zh-Hans/dataset-pipeline.ts
index 3f90180e2a..0bb5c6688b 100644
--- a/web/i18n/zh-Hans/dataset-pipeline.ts
+++ b/web/i18n/zh-Hans/dataset-pipeline.ts
@@ -23,6 +23,8 @@ const translation = {
editInfo: '编辑信息',
exportDSL: '导出 DSL',
useTemplate: '使用此知识库流水线',
+ backToDataSource: '返回数据源',
+ process: '处理',
},
knowledgeNameAndIcon: '知识库名称和图标',
knowledgeNameAndIconPlaceholder: '请输入知识库名称',
@@ -43,6 +45,16 @@ const translation = {
structure: '文档结构',
structureTooltip: '文档结构决定了文档的拆分和索引方式,Dify 提供了通用、父子和问答模式,每个知识库的文档结构是唯一的。',
},
+ testRun: {
+ title: '测试运行',
+ steps: {
+ dataSource: '数据源',
+ documentProcessing: '文档处理',
+ },
+ dataSource: {
+ localFiles: '本地文件',
+ },
+ },
}
export default translation
diff --git a/web/models/pipeline.ts b/web/models/pipeline.ts
index d61cc059f4..465d67559f 100644
--- a/web/models/pipeline.ts
+++ b/web/models/pipeline.ts
@@ -79,6 +79,7 @@ export type Variables = {
max_length: number
required: boolean
options?: string[]
+ default: string | number | boolean
}
export type PipelineProcessingParamsResponse = {