From a3417d047b14a92d7f6351616fdf472c25a5e9f3 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Tue, 25 Jul 2023 16:32:01 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20docs(config.yaml):=20add=20docum?= =?UTF-8?q?entation=20link=20for=20MotorheadMemory=20integration=20?= =?UTF-8?q?=F0=9F=90=9B=20fix(memories.py):=20hide=20and=20make=20chat=5Fm?= =?UTF-8?q?emory=20field=20optional=20for=20MotorheadMemory=20frontend=20n?= =?UTF-8?q?ode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/config.yaml | 2 ++ src/backend/langflow/template/frontend_node/memories.py | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/backend/langflow/config.yaml b/src/backend/langflow/config.yaml index 3116e74c7..7a75d8ff4 100644 --- a/src/backend/langflow/config.yaml +++ b/src/backend/langflow/config.yaml @@ -153,6 +153,8 @@ memories: documentation: "https://python.langchain.com/docs/modules/memory/how_to/vectorstore_retriever_memory" MongoDBChatMessageHistory: documentation: "https://python.langchain.com/docs/modules/memory/integrations/mongodb_chat_message_history" + MotorheadMemory: + documentation: "https://python.langchain.com/docs/integrations/memory/motorhead_memory" prompts: ChatMessagePromptTemplate: documentation: "https://python.langchain.com/docs/modules/model_io/prompts/prompt_templates/msg_prompt_templates" diff --git a/src/backend/langflow/template/frontend_node/memories.py b/src/backend/langflow/template/frontend_node/memories.py index 374d36ff0..78337e786 100644 --- a/src/backend/langflow/template/frontend_node/memories.py +++ b/src/backend/langflow/template/frontend_node/memories.py @@ -94,6 +94,10 @@ class MemoryFrontendNode(FrontendNode): field.show = False field.required = False + if name == "MotorheadMemory" and field.name == "chat_memory": + field.show = False + field.required = False + class PostgresChatMessageHistoryFrontendNode(MemoryFrontendNode): name: str = "PostgresChatMessageHistory"