mirror of https://github.com/langgenius/dify.git
feat: other node run
This commit is contained in:
parent
149eb38e84
commit
ae9e7acd77
|
|
@ -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 { InputVarType, type NodePanelProps } from '@/app/components/workflow/types'
|
||||
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'
|
||||
|
||||
|
|
@ -36,6 +37,7 @@ const Panel: FC<NodePanelProps<KnowledgeRetrievalNodeType>> = ({
|
|||
handleStop,
|
||||
query,
|
||||
setQuery,
|
||||
runResult,
|
||||
} = useConfig(id, data)
|
||||
|
||||
return (
|
||||
|
|
@ -139,6 +141,7 @@ const Panel: FC<NodePanelProps<KnowledgeRetrievalNodeType>> = ({
|
|||
runningStatus={runningStatus}
|
||||
onRun={handleRun}
|
||||
onStop={handleStop}
|
||||
result={<ResultPanel {...runResult} showSteps={false} />}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ const useConfig = (id: string, payload: KnowledgeRetrievalNodeType) => {
|
|||
handleStop,
|
||||
runInputData,
|
||||
setRunInputData,
|
||||
runResult,
|
||||
} = useOneStepRun<KnowledgeRetrievalNodeType>({
|
||||
id,
|
||||
data: inputs,
|
||||
|
|
@ -94,6 +95,7 @@ const useConfig = (id: string, payload: KnowledgeRetrievalNodeType) => {
|
|||
handleStop,
|
||||
query,
|
||||
setQuery,
|
||||
runResult,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ import { Resolution } from '@/types/app'
|
|||
import { InputVarType, type NodePanelProps } from '@/app/components/workflow/types'
|
||||
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 ResultPanel from '@/app/components/workflow/run/result-panel'
|
||||
|
||||
const i18nPrefix = 'workflow.nodes.llm'
|
||||
|
||||
|
|
@ -52,6 +53,7 @@ const Panel: FC<NodePanelProps<LLMNodeType>> = ({
|
|||
handleRun,
|
||||
handleStop,
|
||||
varInputs,
|
||||
runResult,
|
||||
} = useConfig(id, data)
|
||||
|
||||
const isChatApp = true // TODO: get from app context
|
||||
|
|
@ -221,6 +223,7 @@ const Panel: FC<NodePanelProps<LLMNodeType>> = ({
|
|||
runningStatus={runningStatus}
|
||||
onRun={handleRun}
|
||||
onStop={handleStop}
|
||||
result={<ResultPanel {...runResult} showSteps={false} />}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ const useConfig = (id: string, payload: LLMNodeType) => {
|
|||
handleStop,
|
||||
runInputData,
|
||||
setRunInputData,
|
||||
runResult,
|
||||
} = useOneStepRun<LLMNodeType>({
|
||||
id,
|
||||
data: inputs,
|
||||
|
|
@ -170,6 +171,7 @@ const useConfig = (id: string, payload: LLMNodeType) => {
|
|||
runningStatus,
|
||||
handleRun,
|
||||
handleStop,
|
||||
runResult,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 { InputVarType, type NodePanelProps } from '@/app/components/workflow/types'
|
||||
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'
|
||||
|
||||
|
|
@ -35,6 +36,7 @@ const Panel: FC<NodePanelProps<QuestionClassifierNodeType>> = ({
|
|||
handleStop,
|
||||
query,
|
||||
setQuery,
|
||||
runResult,
|
||||
} = useConfig(id, data)
|
||||
|
||||
const model = inputs.model
|
||||
|
|
@ -108,6 +110,7 @@ const Panel: FC<NodePanelProps<QuestionClassifierNodeType>> = ({
|
|||
runningStatus={runningStatus}
|
||||
onRun={handleRun}
|
||||
onStop={handleStop}
|
||||
result={<ResultPanel {...runResult} showSteps={false} />}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ const useConfig = (id: string, payload: QuestionClassifierNodeType) => {
|
|||
handleStop,
|
||||
runInputData,
|
||||
setRunInputData,
|
||||
runResult,
|
||||
} = useOneStepRun<QuestionClassifierNodeType>({
|
||||
id,
|
||||
data: inputs,
|
||||
|
|
@ -94,6 +95,7 @@ const useConfig = (id: string, payload: QuestionClassifierNodeType) => {
|
|||
handleStop,
|
||||
query,
|
||||
setQuery,
|
||||
runResult,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue