diff --git a/web/app/components/workflow/nodes/knowledge-base/default.ts b/web/app/components/workflow/nodes/knowledge-base/default.ts index 94caf73253..29d37c66d2 100644 --- a/web/app/components/workflow/nodes/knowledge-base/default.ts +++ b/web/app/components/workflow/nodes/knowledge-base/default.ts @@ -18,10 +18,16 @@ const nodeDefault: NodeDefault = { score_threshold: 0.5, }, }, - checkValid() { + checkValid(payload) { + const { chunk_structure } = payload + let errorMessage = '' + + if (!chunk_structure) + errorMessage = 'Chunk structure is required.' + return { - isValid: true, - errorMessage: '', + isValid: !errorMessage, + errorMessage, } }, } diff --git a/web/app/components/workflow/nodes/tool/components/input-var-list.tsx b/web/app/components/workflow/nodes/tool/components/input-var-list.tsx index 1a609c58f5..7f310051e2 100644 --- a/web/app/components/workflow/nodes/tool/components/input-var-list.tsx +++ b/web/app/components/workflow/nodes/tool/components/input-var-list.tsx @@ -172,7 +172,7 @@ const InputVarList: FC = ({ return (
-
+
{label[language] || label.en_US} {paramType(type)} {required && Required}