fix: enable memory add sys query var input

This commit is contained in:
Joel
2024-04-03 17:42:21 +08:00
parent 2a2f4cd4d5
commit ab56e6b6af

View File

@@ -263,7 +263,15 @@ const useConfig = (id: string, payload: LLMNodeType) => {
})
}, [runInputData, setRunInputData])
const varInputs = getInputVars(isChatModel ? (inputs.prompt_template as PromptItem[]).map(item => item.text) : [(inputs.prompt_template as PromptItem).text])
const allVarStrArr = (() => {
const arr = isChatModel ? (inputs.prompt_template as PromptItem[]).map(item => item.text) : [(inputs.prompt_template as PromptItem).text]
if (isChatMode && isChatModel && !!inputs.memory)
arr.push('{{#sys.query#}}')
return arr
})()
const varInputs = getInputVars(allVarStrArr)
return {
readOnly,