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
510f0593
Commit
510f0593
authored
Feb 28, 2024
by
Joel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: question classify
parent
7a438f89
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
page.tsx
web/app/(commonLayout)/workflow/nodes/page.tsx
+1
-1
node.tsx
...pp/components/workflow/nodes/question-classifier/node.tsx
+14
-1
No files found.
web/app/(commonLayout)/workflow/nodes/page.tsx
View file @
510f0593
...
...
@@ -5,7 +5,7 @@ import { memo } from 'react'
import
Workflow
from
'@/app/components/workflow'
import
{
BlockEnum
}
from
'@/app/components/workflow/types'
const
nodes
=
[
BlockEnum
.
HttpRequest
/* 9 */
,
BlockEnum
.
Tool
/* 10 */
,
BlockEnum
.
VariableAssigner
/* 11 */
,
BlockEnum
.
Start
/* 1 */
,
BlockEnum
.
DirectAnswer
/* 2 */
,
BlockEnum
.
LLM
/* 3 */
,
BlockEnum
.
KnowledgeRetrieval
/* 4 */
,
BlockEnum
.
QuestionClassifier
/* 5
*/
,
BlockEnum
.
QuestionClassifier
/* 5 */
,
BlockEnum
.
HttpRequest
/* 9 */
,
BlockEnum
.
Tool
/* 10 */
,
BlockEnum
.
VariableAssigner
/* 11 */
,
BlockEnum
.
Start
/* 1 */
,
BlockEnum
.
DirectAnswer
/* 2 */
,
BlockEnum
.
LLM
/* 3 */
,
BlockEnum
.
KnowledgeRetrieval
/* 4
*/
,
BlockEnum
.
IfElse
/* 6 */
,
BlockEnum
.
Code
/* 7 */
,
BlockEnum
.
TemplateTransform
/* 8 */
,
BlockEnum
.
End
/* 12 */
,
].
map
((
item
,
i
)
=>
({
...
...
web/app/components/workflow/nodes/question-classifier/node.tsx
View file @
510f0593
import
type
{
FC
}
from
'react'
import
{
useState
}
from
'react'
import
InfoPanel
from
'../_base/components/info-panel'
import
{
mockData
}
from
'./mock'
import
{
...
...
@@ -8,7 +9,8 @@ import ModelSelector from '@/app/components/header/account-setting/model-provide
const
Node
:
FC
=
()
=>
{
const
{
provider
,
name
:
modelId
}
=
mockData
.
model
const
topics
=
mockData
.
topics
const
tempTopics
=
mockData
.
topics
const
[
topics
,
setTopics
]
=
useState
(
tempTopics
)
const
{
textGenerationModelList
,
}
=
useTextGenerationCurrentProviderAndModelAndModelList
()
...
...
@@ -27,6 +29,17 @@ const Node: FC = () => {
content=
{
topic
.
topic
}
/>
))
}
{
/* For test */
}
<
div
className=
'mt-1 flex items-center h-6 justify-center bg-gray-100 rounded-md px-1 space-x-1 text-xs font-normal text-gray-700'
onClick=
{
()
=>
{
setTopics
([...
topics
,
{
id
:
`${Date.now()}`
,
name
:
`Topic${topics.length}`
,
topic
:
`Topic${topics.length}`
,
}])
}
}
>
Add
</
div
>
</
div
>
</
div
>
)
...
...
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