瀏覽代碼

fix(llm_node): Ignore user query when memory is disabled. (#11106)

tags/0.12.1
-LAN- 11 月之前
父節點
當前提交
cbb4e95928
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 6 行新增6 行删除
  1. 6
    6
      api/core/workflow/nodes/llm/node.py

+ 6
- 6
api/core/workflow/nodes/llm/node.py 查看文件

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

prompt_messages, stop = self._fetch_prompt_messages(
user_query=query,

Loading…
取消
儲存