From 5a76d36cd43dfde4762b803ef920b9064daa43a5 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Wed, 28 Jun 2023 11:44:07 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20chore(utils.py):=20refactor=20bu?= =?UTF-8?q?ild=5Finput=5Fkeys=5Fresponse=20function=20to=20return=20an=20e?= =?UTF-8?q?mpty=20string=20for=20each=20input=20key=20The=20build=5Finput?= =?UTF-8?q?=5Fkeys=5Fresponse=20function=20has=20been=20refactored=20to=20?= =?UTF-8?q?return=20an=20empty=20string=20for=20each=20input=20key=20in=20?= =?UTF-8?q?the=20langchain=5Fobject.=20This=20change=20ensures=20consisten?= =?UTF-8?q?cy=20in=20the=20response=20structure=20and=20provides=20a=20def?= =?UTF-8?q?ault=20value=20for=20each=20input=20key.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/api/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backend/langflow/api/utils.py b/src/backend/langflow/api/utils.py index 12cd3d76b..bd566896d 100644 --- a/src/backend/langflow/api/utils.py +++ b/src/backend/langflow/api/utils.py @@ -26,8 +26,9 @@ def remove_api_keys(flow: dict): def build_input_keys_response(langchain_object): """Build the input keys response.""" + input_keys_response = { - "input_keys": langchain_object.input_keys, + "input_keys": {key: "" for key in langchain_object.input_keys}, "memory_keys": [], } # If the object has memory, that memory will have a memory_variables attribute