mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-20 16:09:11 +08:00
feat: doc extract inputs
This commit is contained in:
parent
f6caf0915b
commit
6e15d7f777
@ -2,6 +2,7 @@ import type { FC } from 'react'
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import VarReferencePicker from '../_base/components/variable/var-reference-picker'
|
import VarReferencePicker from '../_base/components/variable/var-reference-picker'
|
||||||
|
import OutputVars, { VarItem } from '../_base/components/output-vars'
|
||||||
import useConfig from './use-config'
|
import useConfig from './use-config'
|
||||||
import type { DocExtractorNodeType } from './types'
|
import type { DocExtractorNodeType } from './types'
|
||||||
import Field from '@/app/components/workflow/nodes/_base/components/field'
|
import Field from '@/app/components/workflow/nodes/_base/components/field'
|
||||||
@ -26,7 +27,7 @@ const Panel: FC<NodePanelProps<DocExtractorNodeType>> = ({
|
|||||||
<div className='mt-2'>
|
<div className='mt-2'>
|
||||||
<div className='px-4 pb-4 space-y-4'>
|
<div className='px-4 pb-4 space-y-4'>
|
||||||
<Field
|
<Field
|
||||||
title={t(`${i18nPrefix}.assignedVariable`)}
|
title={t(`${i18nPrefix}.inputVars`)}
|
||||||
>
|
>
|
||||||
<VarReferencePicker
|
<VarReferencePicker
|
||||||
readonly={readOnly}
|
readonly={readOnly}
|
||||||
@ -38,6 +39,15 @@ const Panel: FC<NodePanelProps<DocExtractorNodeType>> = ({
|
|||||||
/>
|
/>
|
||||||
</Field>
|
</Field>
|
||||||
</div>
|
</div>
|
||||||
|
<div className='px-4 pt-4 pb-2'>
|
||||||
|
<OutputVars>
|
||||||
|
<VarItem
|
||||||
|
name='text'
|
||||||
|
type='string'
|
||||||
|
description={t(`${i18nPrefix}.outputVars.text`)}
|
||||||
|
/>
|
||||||
|
</OutputVars>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -494,6 +494,10 @@ const translation = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
docExtractor: {
|
docExtractor: {
|
||||||
|
inputVars: 'Input Variables',
|
||||||
|
outputVars: {
|
||||||
|
text: 'Extracted text',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
tracing: {
|
tracing: {
|
||||||
|
@ -493,6 +493,12 @@ const translation = {
|
|||||||
showAuthor: '显示作者',
|
showAuthor: '显示作者',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
docExtractor: {
|
||||||
|
inputVars: '输入变量',
|
||||||
|
outputVars: {
|
||||||
|
text: '提取的文本',
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
tracing: {
|
tracing: {
|
||||||
stopBy: '由{{user}}终止',
|
stopBy: '由{{user}}终止',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user