mirror of https://github.com/langgenius/dify.git
feat: knowledge retirveval output
This commit is contained in:
parent
b2de27b7be
commit
6d5618447e
|
|
@ -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: '输入变量',
|
||||
|
|
|
|||
Loading…
Reference in New Issue