From 41471b72a29591884a98af0768d1403ad6d02669 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Tue, 25 Jul 2023 16:45:00 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(memories.py):=20fix=20condit?= =?UTF-8?q?ional=20statement=20for=20setting=20show=20and=20required=20pro?= =?UTF-8?q?perties=20of=20fields=20in=20MotorheadMemory=20class=20?= =?UTF-8?q?=E2=9C=A8=20feat(memories.py):=20add=20conditional=20statement?= =?UTF-8?q?=20to=20show=20client=5Fid=20field=20in=20MotorheadMemory=20cla?= =?UTF-8?q?ss?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../langflow/template/frontend_node/memories.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/backend/langflow/template/frontend_node/memories.py b/src/backend/langflow/template/frontend_node/memories.py index 78337e786..019dc0fa8 100644 --- a/src/backend/langflow/template/frontend_node/memories.py +++ b/src/backend/langflow/template/frontend_node/memories.py @@ -94,9 +94,13 @@ class MemoryFrontendNode(FrontendNode): field.show = False field.required = False - if name == "MotorheadMemory" and field.name == "chat_memory": - field.show = False - field.required = False + if name == "MotorheadMemory": + if field.name == "chat_memory": + field.show = False + field.required = False + elif field.name == "client_id": + field.show = True + field.advanced = False class PostgresChatMessageHistoryFrontendNode(MemoryFrontendNode):