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
ae9e7acd
Commit
ae9e7acd
authored
Mar 13, 2024
by
Joel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: other node run
parent
149eb38e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
0 deletions
+15
-0
panel.tsx
...p/components/workflow/nodes/knowledge-retrieval/panel.tsx
+3
-0
use-config.ts
...mponents/workflow/nodes/knowledge-retrieval/use-config.ts
+2
-0
panel.tsx
web/app/components/workflow/nodes/llm/panel.tsx
+3
-0
use-config.ts
web/app/components/workflow/nodes/llm/use-config.ts
+2
-0
panel.tsx
...p/components/workflow/nodes/question-classifier/panel.tsx
+3
-0
use-config.ts
...mponents/workflow/nodes/question-classifier/use-config.ts
+2
-0
No files found.
web/app/components/workflow/nodes/knowledge-retrieval/panel.tsx
View file @
ae9e7acd
...
@@ -12,6 +12,7 @@ import Split from '@/app/components/workflow/nodes/_base/components/split'
...
@@ -12,6 +12,7 @@ import Split from '@/app/components/workflow/nodes/_base/components/split'
import
OutputVars
,
{
VarItem
}
from
'@/app/components/workflow/nodes/_base/components/output-vars'
import
OutputVars
,
{
VarItem
}
from
'@/app/components/workflow/nodes/_base/components/output-vars'
import
{
InputVarType
,
type
NodePanelProps
}
from
'@/app/components/workflow/types'
import
{
InputVarType
,
type
NodePanelProps
}
from
'@/app/components/workflow/types'
import
BeforeRunForm
from
'@/app/components/workflow/nodes/_base/components/before-run-form'
import
BeforeRunForm
from
'@/app/components/workflow/nodes/_base/components/before-run-form'
import
ResultPanel
from
'@/app/components/workflow/run/result-panel'
const
i18nPrefix
=
'workflow.nodes.knowledgeRetrieval'
const
i18nPrefix
=
'workflow.nodes.knowledgeRetrieval'
...
@@ -36,6 +37,7 @@ const Panel: FC<NodePanelProps<KnowledgeRetrievalNodeType>> = ({
...
@@ -36,6 +37,7 @@ const Panel: FC<NodePanelProps<KnowledgeRetrievalNodeType>> = ({
handleStop
,
handleStop
,
query
,
query
,
setQuery
,
setQuery
,
runResult
,
}
=
useConfig
(
id
,
data
)
}
=
useConfig
(
id
,
data
)
return
(
return
(
...
@@ -139,6 +141,7 @@ const Panel: FC<NodePanelProps<KnowledgeRetrievalNodeType>> = ({
...
@@ -139,6 +141,7 @@ const Panel: FC<NodePanelProps<KnowledgeRetrievalNodeType>> = ({
runningStatus=
{
runningStatus
}
runningStatus=
{
runningStatus
}
onRun=
{
handleRun
}
onRun=
{
handleRun
}
onStop=
{
handleStop
}
onStop=
{
handleStop
}
result=
{
<
ResultPanel
{
...
runResult
}
showSteps=
{
false
}
/>
}
/>
/>
)
}
)
}
</
div
>
</
div
>
...
...
web/app/components/workflow/nodes/knowledge-retrieval/use-config.ts
View file @
ae9e7acd
...
@@ -64,6 +64,7 @@ const useConfig = (id: string, payload: KnowledgeRetrievalNodeType) => {
...
@@ -64,6 +64,7 @@ const useConfig = (id: string, payload: KnowledgeRetrievalNodeType) => {
handleStop
,
handleStop
,
runInputData
,
runInputData
,
setRunInputData
,
setRunInputData
,
runResult
,
}
=
useOneStepRun
<
KnowledgeRetrievalNodeType
>
({
}
=
useOneStepRun
<
KnowledgeRetrievalNodeType
>
({
id
,
id
,
data
:
inputs
,
data
:
inputs
,
...
@@ -94,6 +95,7 @@ const useConfig = (id: string, payload: KnowledgeRetrievalNodeType) => {
...
@@ -94,6 +95,7 @@ const useConfig = (id: string, payload: KnowledgeRetrievalNodeType) => {
handleStop
,
handleStop
,
query
,
query
,
setQuery
,
setQuery
,
runResult
,
}
}
}
}
...
...
web/app/components/workflow/nodes/llm/panel.tsx
View file @
ae9e7acd
...
@@ -17,6 +17,7 @@ import { Resolution } from '@/types/app'
...
@@ -17,6 +17,7 @@ import { Resolution } from '@/types/app'
import
{
InputVarType
,
type
NodePanelProps
}
from
'@/app/components/workflow/types'
import
{
InputVarType
,
type
NodePanelProps
}
from
'@/app/components/workflow/types'
import
BeforeRunForm
from
'@/app/components/workflow/nodes/_base/components/before-run-form'
import
BeforeRunForm
from
'@/app/components/workflow/nodes/_base/components/before-run-form'
import
type
{
Props
as
FormProps
}
from
'@/app/components/workflow/nodes/_base/components/before-run-form/form'
import
type
{
Props
as
FormProps
}
from
'@/app/components/workflow/nodes/_base/components/before-run-form/form'
import
ResultPanel
from
'@/app/components/workflow/run/result-panel'
const
i18nPrefix
=
'workflow.nodes.llm'
const
i18nPrefix
=
'workflow.nodes.llm'
...
@@ -52,6 +53,7 @@ const Panel: FC<NodePanelProps<LLMNodeType>> = ({
...
@@ -52,6 +53,7 @@ const Panel: FC<NodePanelProps<LLMNodeType>> = ({
handleRun
,
handleRun
,
handleStop
,
handleStop
,
varInputs
,
varInputs
,
runResult
,
}
=
useConfig
(
id
,
data
)
}
=
useConfig
(
id
,
data
)
const
isChatApp
=
true
// TODO: get from app context
const
isChatApp
=
true
// TODO: get from app context
...
@@ -221,6 +223,7 @@ const Panel: FC<NodePanelProps<LLMNodeType>> = ({
...
@@ -221,6 +223,7 @@ const Panel: FC<NodePanelProps<LLMNodeType>> = ({
runningStatus=
{
runningStatus
}
runningStatus=
{
runningStatus
}
onRun=
{
handleRun
}
onRun=
{
handleRun
}
onStop=
{
handleStop
}
onStop=
{
handleStop
}
result=
{
<
ResultPanel
{
...
runResult
}
showSteps=
{
false
}
/>
}
/>
/>
)
}
)
}
</
div
>
</
div
>
...
...
web/app/components/workflow/nodes/llm/use-config.ts
View file @
ae9e7acd
...
@@ -99,6 +99,7 @@ const useConfig = (id: string, payload: LLMNodeType) => {
...
@@ -99,6 +99,7 @@ const useConfig = (id: string, payload: LLMNodeType) => {
handleStop
,
handleStop
,
runInputData
,
runInputData
,
setRunInputData
,
setRunInputData
,
runResult
,
}
=
useOneStepRun
<
LLMNodeType
>
({
}
=
useOneStepRun
<
LLMNodeType
>
({
id
,
id
,
data
:
inputs
,
data
:
inputs
,
...
@@ -170,6 +171,7 @@ const useConfig = (id: string, payload: LLMNodeType) => {
...
@@ -170,6 +171,7 @@ const useConfig = (id: string, payload: LLMNodeType) => {
runningStatus
,
runningStatus
,
handleRun
,
handleRun
,
handleStop
,
handleStop
,
runResult
,
}
}
}
}
...
...
web/app/components/workflow/nodes/question-classifier/panel.tsx
View file @
ae9e7acd
...
@@ -10,6 +10,7 @@ import Field from '@/app/components/workflow/nodes/_base/components/field'
...
@@ -10,6 +10,7 @@ import Field from '@/app/components/workflow/nodes/_base/components/field'
import
ModelParameterModal
from
'@/app/components/header/account-setting/model-provider-page/model-parameter-modal'
import
ModelParameterModal
from
'@/app/components/header/account-setting/model-provider-page/model-parameter-modal'
import
{
InputVarType
,
type
NodePanelProps
}
from
'@/app/components/workflow/types'
import
{
InputVarType
,
type
NodePanelProps
}
from
'@/app/components/workflow/types'
import
BeforeRunForm
from
'@/app/components/workflow/nodes/_base/components/before-run-form'
import
BeforeRunForm
from
'@/app/components/workflow/nodes/_base/components/before-run-form'
import
ResultPanel
from
'@/app/components/workflow/run/result-panel'
const
i18nPrefix
=
'workflow.nodes.questionClassifiers'
const
i18nPrefix
=
'workflow.nodes.questionClassifiers'
...
@@ -35,6 +36,7 @@ const Panel: FC<NodePanelProps<QuestionClassifierNodeType>> = ({
...
@@ -35,6 +36,7 @@ const Panel: FC<NodePanelProps<QuestionClassifierNodeType>> = ({
handleStop
,
handleStop
,
query
,
query
,
setQuery
,
setQuery
,
runResult
,
}
=
useConfig
(
id
,
data
)
}
=
useConfig
(
id
,
data
)
const
model
=
inputs
.
model
const
model
=
inputs
.
model
...
@@ -108,6 +110,7 @@ const Panel: FC<NodePanelProps<QuestionClassifierNodeType>> = ({
...
@@ -108,6 +110,7 @@ const Panel: FC<NodePanelProps<QuestionClassifierNodeType>> = ({
runningStatus=
{
runningStatus
}
runningStatus=
{
runningStatus
}
onRun=
{
handleRun
}
onRun=
{
handleRun
}
onStop=
{
handleStop
}
onStop=
{
handleStop
}
result=
{
<
ResultPanel
{
...
runResult
}
showSteps=
{
false
}
/>
}
/>
/>
)
}
)
}
</
div
>
</
div
>
...
...
web/app/components/workflow/nodes/question-classifier/use-config.ts
View file @
ae9e7acd
...
@@ -63,6 +63,7 @@ const useConfig = (id: string, payload: QuestionClassifierNodeType) => {
...
@@ -63,6 +63,7 @@ const useConfig = (id: string, payload: QuestionClassifierNodeType) => {
handleStop
,
handleStop
,
runInputData
,
runInputData
,
setRunInputData
,
setRunInputData
,
runResult
,
}
=
useOneStepRun
<
QuestionClassifierNodeType
>
({
}
=
useOneStepRun
<
QuestionClassifierNodeType
>
({
id
,
id
,
data
:
inputs
,
data
:
inputs
,
...
@@ -94,6 +95,7 @@ const useConfig = (id: string, payload: QuestionClassifierNodeType) => {
...
@@ -94,6 +95,7 @@ const useConfig = (id: string, payload: QuestionClassifierNodeType) => {
handleStop
,
handleStop
,
query
,
query
,
setQuery
,
setQuery
,
runResult
,
}
}
}
}
...
...
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