Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
6d561844
Commit
6d561844
authored
Feb 29, 2024
by
Joel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: knowledge retirveval output
parent
b2de27b7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
0 deletions
+55
-0
panel.tsx
...p/components/workflow/nodes/knowledge-retrieval/panel.tsx
+43
-0
workflow.ts
web/i18n/en-US/workflow.ts
+6
-0
workflow.ts
web/i18n/zh-Hans/workflow.ts
+6
-0
No files found.
web/app/components/workflow/nodes/knowledge-retrieval/panel.tsx
View file @
6d561844
...
...
@@ -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
>
)
}
...
...
web/i18n/en-US/workflow.ts
View file @
6d561844
...
...
@@ -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'
,
...
...
web/i18n/zh-Hans/workflow.ts
View file @
6d561844
...
...
@@ -55,6 +55,12 @@ const translation = {
},
knowledgeRetrieval
:
{
queryVariable
:
'查询变量'
,
outputVars
:
{
output
:
'召回的分段'
,
content
:
'分段内容'
,
title
:
'分段标题'
,
metadata
:
'其他元数据'
,
},
},
http
:
{
inputVars
:
'输入变量'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment