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
0759b29c
Commit
0759b29c
authored
Feb 22, 2024
by
Joel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: retrial node
parent
db6074e0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
1 deletion
+50
-1
mock.ts
...app/components/workflow/nodes/knowledge-retrieval/mock.ts
+19
-0
node.tsx
...pp/components/workflow/nodes/knowledge-retrieval/node.tsx
+15
-1
types.ts
...pp/components/workflow/nodes/knowledge-retrieval/types.ts
+16
-0
No files found.
web/app/components/workflow/nodes/knowledge-retrieval/mock.ts
0 → 100644
View file @
0759b29c
import
type
{
KnowledgeRetrievalNodeType
}
from
'./types'
import
{
RETRIEVE_TYPE
}
from
'@/types/app'
export
const
mockData
:
KnowledgeRetrievalNodeType
=
{
type
:
'KnowledgeRetrieval'
,
desc
:
'xxx'
,
title
:
'KnowledgeRetrieval'
,
query_variable_selector
:
[
'aaa'
,
'name'
],
dataset_ids
:
[
'1'
],
retrieval_mode
:
RETRIEVE_TYPE
.
oneWay
,
multiple_retrieval_config
:
{
top_k
:
10
,
score_threshold
:
0.5
,
reranking_model
:
{
provider
:
''
,
model
:
''
,
},
},
}
web/app/components/workflow/nodes/knowledge-retrieval/node.tsx
View file @
0759b29c
import
type
{
FC
}
from
'react'
import
{
Folder
}
from
'@/app/components/base/icons/src/vender/solid/files'
const
Node
:
FC
=
()
=>
{
return
(
<
div
>
knowledge-retrieval
</
div
>
<
div
className=
'px-3'
>
<
div
className=
'space-y-0.5'
>
{
[
'product Doc'
,
'Text completion'
].
map
(
name
=>
(
<
div
key=
{
name
}
className=
'flex items-center h-[26px] bg-gray-100 rounded-md px-1 text-xs font-normal text-gray-700'
>
<
div
className=
'mr-1 shrink-0 p-1 bg-[#F5F8FF] rounded-md border-[0.5px] border-[#E0EAFF]'
>
<
Folder
className=
'w-3 h-3 text-[#444CE7]'
/>
</
div
>
<
div
className=
'text-xs font-normal text-gray-700'
>
{
name
}
</
div
>
</
div
>
))
}
</
div
>
</
div
>
)
}
...
...
web/app/components/workflow/nodes/knowledge-retrieval/types.ts
0 → 100644
View file @
0759b29c
import
type
{
CommonNodeType
,
ValueSelector
}
from
'@/app/components/workflow/types'
import
type
{
RETRIEVE_TYPE
}
from
'@/types/app'
export
type
KnowledgeRetrievalNodeType
=
CommonNodeType
&
{
query_variable_selector
:
ValueSelector
dataset_ids
:
string
[]
retrieval_mode
:
RETRIEVE_TYPE
multiple_retrieval_config
?:
{
top_k
:
number
score_threshold
:
number
reranking_model
:
{
provider
:
string
model
:
string
}
}
}
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