Explorar o código

fix: user query be ignored if query_prompt_template is an empty string (#11103)

-LAN- hai 4 meses
pai
achega
20c091a5e7
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      api/core/workflow/nodes/llm/node.py

+ 1 - 1
api/core/workflow/nodes/llm/node.py

@@ -137,7 +137,7 @@ class LLMNode(BaseNode[LLMNodeData]):
             query = None
             if self.node_data.memory:
                 query = self.node_data.memory.query_prompt_template
-            if query is None and (
+            if not query and (
                 query_variable := self.graph_runtime_state.variable_pool.get(
                     (SYSTEM_VARIABLE_NODE_ID, SystemVariableKey.QUERY)
                 )