Commit 6d561844 authored by Joel's avatar Joel

feat: knowledge retirveval output

parent b2de27b7
......@@ -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 = () => {
/>
</Field>
</div>
<Split />
<div className='px-4 pt-4 pb-2'>
<OutputVars>
<>
<VarItem
name='output'
type='Array[Object]'
description={t(`${i18nPrefix}.outputVars.output`)}
subItems={[
{
name: 'content',
type: 'string',
description: t(`${i18nPrefix}.outputVars.content`),
},
{
name: 'title',
type: 'string',
description: t(`${i18nPrefix}.outputVars.title`),
},
// {
// name: 'url',
// type: 'string',
// description: t(`${i18nPrefix}.outputVars.url`)
// },
// {
// name: 'icon',
// type: 'string',
// description: t(`${i18nPrefix}.outputVars.icon`)
// },
{
name: 'metadata',
type: 'object',
description: t(`${i18nPrefix}.outputVars.metadata`),
},
]}
/>
</>
</OutputVars>
</div>
</div>
)
}
......
......@@ -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',
......
......@@ -55,6 +55,12 @@ const translation = {
},
knowledgeRetrieval: {
queryVariable: '查询变量',
outputVars: {
output: '召回的分段',
content: '分段内容',
title: '分段标题',
metadata: '其他元数据',
},
},
http: {
inputVars: '输入变量',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment