diff --git a/web/app/components/workflow/nodes/llm/use-config.ts b/web/app/components/workflow/nodes/llm/use-config.ts index 3b594b426f..72cd22f764 100644 --- a/web/app/components/workflow/nodes/llm/use-config.ts +++ b/web/app/components/workflow/nodes/llm/use-config.ts @@ -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,