Merge branch 'feat/rag-pipeline' of https://github.com/langgenius/dify into feat/rag-pipeline

This commit is contained in:
twwu 2025-05-30 15:54:46 +08:00
commit 898495b5c4
3 changed files with 2 additions and 29 deletions

View File

@ -6,6 +6,7 @@ on:
- "main"
- "deploy/dev"
- "deploy/enterprise"
- "feat/rag-pipeline"
tags:
- "*"

View File

@ -16,7 +16,7 @@ import { useNodes } from 'reactflow'
import type { DataSourceNodeType } from '@/app/components/workflow/nodes/data-source/types'
import { useTranslation } from 'react-i18next'
import produce from 'immer'
import { useNodesSyncDraft } from '../../hooks'
import { useNodesSyncDraft } from '@/app/components/workflow/hooks'
import type { InputVar, RAGPipelineVariables } from '@/models/pipeline'
type InputFieldDialogProps = {

View File

@ -1,13 +1,10 @@
import {
useCallback,
useEffect,
} from 'react'
import { produce } from 'immer'
import { useStoreApi } from 'reactflow'
import { useNodeDataUpdate } from '@/app/components/workflow/hooks'
import type { ValueSelector } from '@/app/components/workflow/types'
import { useModelListAndDefaultModelAndCurrentProviderAndModel } from '@/app/components/header/account-setting/model-provider-page/hooks'
import { ModelTypeEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'
import {
ChunkStructureEnum,
IndexMethodEnum,
@ -174,31 +171,6 @@ export const useConfig = (id: string) => {
})
}, [handleNodeDataUpdate])
const {
currentModel,
currentProvider,
} = useModelListAndDefaultModelAndCurrentProviderAndModel(ModelTypeEnum.textEmbedding)
const handleInitConfig = useCallback(() => {
const nodeData = getNodeData()
if (!nodeData?.data.embedding_model && !nodeData?.data.embedding_model_provider && currentModel && currentProvider) {
handleEmbeddingModelChange({
embeddingModel: currentModel.model,
embeddingModelProvider: currentProvider.provider,
})
}
}, [
getNodeData,
handleEmbeddingModelChange,
currentModel,
currentProvider,
])
useEffect(() => {
handleInitConfig()
}, [handleInitConfig])
return {
handleChunkStructureChange,
handleIndexMethodChange,