소스 검색

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

tags/0.12.1
-LAN- 11 달 전
부모
커밋
cbb4e95928
No account linked to committer's email address
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…
취소
저장