mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-17 10:05:59 +08:00
chore: prompt support array string number
This commit is contained in:
parent
691a7f727a
commit
a5c1132087
@ -99,7 +99,7 @@ const useConfig = (id: string, payload: LLMNodeType) => {
|
|||||||
})
|
})
|
||||||
setInputs(newInputs)
|
setInputs(newInputs)
|
||||||
}
|
}
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [defaultConfig, isChatModel])
|
}, [defaultConfig, isChatModel])
|
||||||
|
|
||||||
const [modelChanged, setModelChanged] = useState(false)
|
const [modelChanged, setModelChanged] = useState(false)
|
||||||
@ -159,7 +159,7 @@ const useConfig = (id: string, payload: LLMNodeType) => {
|
|||||||
return
|
return
|
||||||
setModelChanged(false)
|
setModelChanged(false)
|
||||||
handleVisionConfigAfterModelChanged()
|
handleVisionConfigAfterModelChanged()
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [isVisionModel, modelChanged])
|
}, [isVisionModel, modelChanged])
|
||||||
|
|
||||||
// variables
|
// variables
|
||||||
@ -278,7 +278,7 @@ const useConfig = (id: string, payload: LLMNodeType) => {
|
|||||||
}, [inputs, setInputs])
|
}, [inputs, setInputs])
|
||||||
|
|
||||||
const filterInputVar = useCallback((varPayload: Var) => {
|
const filterInputVar = useCallback((varPayload: Var) => {
|
||||||
return [VarType.number, VarType.string, VarType.secret].includes(varPayload.type)
|
return [VarType.number, VarType.string, VarType.secret, VarType.arrayString, VarType.arrayNumber].includes(varPayload.type)
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
const filterVar = useCallback((varPayload: Var) => {
|
const filterVar = useCallback((varPayload: Var) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user