|
@@ -27,6 +27,7 @@ import VariableAssigner from '@/app/components/workflow/nodes/variable-assigner/
|
|
|
import Assigner from '@/app/components/workflow/nodes/assigner/default'
|
|
|
import ParameterExtractorDefault from '@/app/components/workflow/nodes/parameter-extractor/default'
|
|
|
import IterationDefault from '@/app/components/workflow/nodes/iteration/default'
|
|
|
+import DocumentExtractorDefault from '@/app/components/workflow/nodes/document-extractor/default'
|
|
|
import { ssePost } from '@/service/base'
|
|
|
|
|
|
import { getInputVars as doGetInputVars } from '@/app/components/base/prompt-editor/constants'
|
|
@@ -43,6 +44,7 @@ const { checkValid: checkVariableAssignerValid } = VariableAssigner
|
|
|
const { checkValid: checkAssignerValid } = Assigner
|
|
|
const { checkValid: checkParameterExtractorValid } = ParameterExtractorDefault
|
|
|
const { checkValid: checkIterationValid } = IterationDefault
|
|
|
+const { checkValid: checkDocumentExtractorValid } = DocumentExtractorDefault
|
|
|
|
|
|
const checkValidFns: Record<BlockEnum, Function> = {
|
|
|
[BlockEnum.LLM]: checkLLMValid,
|
|
@@ -57,6 +59,7 @@ const checkValidFns: Record<BlockEnum, Function> = {
|
|
|
[BlockEnum.VariableAggregator]: checkVariableAssignerValid,
|
|
|
[BlockEnum.ParameterExtractor]: checkParameterExtractorValid,
|
|
|
[BlockEnum.Iteration]: checkIterationValid,
|
|
|
+ [BlockEnum.DocExtractor]: checkDocumentExtractorValid,
|
|
|
} as any
|
|
|
|
|
|
type Params<T> = {
|