🐛 fix(memories.py): fix conditional statement for setting show and required properties of fields in MotorheadMemory class

✨ feat(memories.py): add conditional statement to show client_id field in MotorheadMemory class
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-07-25 16:45:00 -03:00
commit 41471b72a2

View file

@ -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):