mirror of https://github.com/langgenius/dify.git
llm mode
This commit is contained in:
parent
b5c212f575
commit
d0ef9e672f
|
|
@ -2,6 +2,7 @@ import {
|
|||
useCallback,
|
||||
useEffect,
|
||||
} from 'react'
|
||||
import { uniqBy } from 'lodash-es'
|
||||
import useSWR from 'swr'
|
||||
import produce from 'immer'
|
||||
import {
|
||||
|
|
@ -100,7 +101,7 @@ export const useWorkflow = () => {
|
|||
|
||||
list.push(...incomers)
|
||||
|
||||
return list.filter((item) => {
|
||||
return uniqBy(list, 'id').filter((item) => {
|
||||
return SUPPORT_OUTPUT_VARS_NODE.includes(item.data.type)
|
||||
})
|
||||
}, [store])
|
||||
|
|
@ -135,7 +136,7 @@ export const useWorkflow = () => {
|
|||
|
||||
const length = list.length
|
||||
if (length) {
|
||||
return list.reverse().filter((item) => {
|
||||
return uniqBy(list, 'id').reverse().filter((item) => {
|
||||
return SUPPORT_OUTPUT_VARS_NODE.includes(item.data.type)
|
||||
})
|
||||
}
|
||||
|
|
@ -171,7 +172,7 @@ export const useWorkflow = () => {
|
|||
list.push(node)
|
||||
})
|
||||
|
||||
return list
|
||||
return uniqBy(list, 'id')
|
||||
}, [store])
|
||||
|
||||
const isValidConnection = useCallback(({ source, target }: Connection) => {
|
||||
|
|
|
|||
|
|
@ -118,6 +118,7 @@ const Panel: FC<NodePanelProps<LLMNodeType>> = ({
|
|||
handleModelChanged({
|
||||
provider: currentProvider?.provider,
|
||||
modelId: currentModel?.model,
|
||||
mode: currentModel?.model_properties?.mode as string,
|
||||
})
|
||||
}
|
||||
}, [model.provider, currentProvider, currentModel, handleModelChanged])
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ const Panel: FC<NodePanelProps<QuestionClassifierNodeType>> = ({
|
|||
handleModelChanged({
|
||||
provider: currentProvider?.provider,
|
||||
modelId: currentModel?.model,
|
||||
mode: currentModel?.model_properties?.mode as string,
|
||||
})
|
||||
}
|
||||
}, [model.provider, currentProvider, currentModel, handleModelChanged])
|
||||
|
|
|
|||
Loading…
Reference in New Issue