From 6d5618447ea2c87948506eb44ee49f8e1a0b2bc8 Mon Sep 17 00:00:00 2001 From: Joel Date: Thu, 29 Feb 2024 16:39:36 +0800 Subject: [PATCH] feat: knowledge retirveval output --- .../nodes/knowledge-retrieval/panel.tsx | 43 +++++++++++++++++++ web/i18n/en-US/workflow.ts | 6 +++ web/i18n/zh-Hans/workflow.ts | 6 +++ 3 files changed, 55 insertions(+) diff --git a/web/app/components/workflow/nodes/knowledge-retrieval/panel.tsx b/web/app/components/workflow/nodes/knowledge-retrieval/panel.tsx index 0827704450..c26b94d61b 100644 --- a/web/app/components/workflow/nodes/knowledge-retrieval/panel.tsx +++ b/web/app/components/workflow/nodes/knowledge-retrieval/panel.tsx @@ -4,6 +4,8 @@ import VarReferencePicker from '../_base/components/variable/var-reference-picke import useConfig from './use-config' import { mockData } from './mock' import Field from '@/app/components/workflow/nodes/_base/components/field' +import Split from '@/app/components/workflow/nodes/_base/components/split' +import OutputVars, { VarItem } from '@/app/components/workflow/nodes/_base/components/output-vars' const i18nPrefix = 'workflow.nodes.knowledgeRetrieval' @@ -30,6 +32,47 @@ const Panel: FC = () => { /> + + +
+ + <> + + + + +
) } diff --git a/web/i18n/en-US/workflow.ts b/web/i18n/en-US/workflow.ts index 4346287015..6f5d5a7485 100644 --- a/web/i18n/en-US/workflow.ts +++ b/web/i18n/en-US/workflow.ts @@ -56,6 +56,12 @@ const translation = { }, knowledgeRetrieval: { queryVariable: 'Query Variable', + outputVars: { + output: 'Retrieval segmented data', + content: 'Segmented content', + title: 'Segmented title', + metadata: 'Other metadata', + }, }, http: { inputVars: 'Input Variables', diff --git a/web/i18n/zh-Hans/workflow.ts b/web/i18n/zh-Hans/workflow.ts index 8daf27524a..a851777724 100644 --- a/web/i18n/zh-Hans/workflow.ts +++ b/web/i18n/zh-Hans/workflow.ts @@ -55,6 +55,12 @@ const translation = { }, knowledgeRetrieval: { queryVariable: '查询变量', + outputVars: { + output: '召回的分段', + content: '分段内容', + title: '分段标题', + metadata: '其他元数据', + }, }, http: { inputVars: '输入变量',