From 0eead8f3f74ab700d27b65281af2a9ef91b9b1ef Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Fri, 30 Jun 2023 11:23:19 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(loading.py):=20fix=20conditi?= =?UTF-8?q?on=20to=20check=20for=20"handle=5Fkeys"=20in=20format=5Fkwargs?= =?UTF-8?q?=20instead=20of=20params=20The=20condition=20to=20check=20for?= =?UTF-8?q?=20the=20presence=20of=20"handle=5Fkeys"=20has=20been=20fixed?= =?UTF-8?q?=20to=20correctly=20check=20for=20its=20existence=20in=20the=20?= =?UTF-8?q?format=5Fkwargs=20dictionary=20instead=20of=20the=20params=20di?= =?UTF-8?q?ctionary.=20This=20ensures=20that=20the=20"handle=5Fkeys"=20lis?= =?UTF-8?q?t=20is=20properly=20populated=20when=20necessary.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/interface/initialize/loading.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/langflow/interface/initialize/loading.py b/src/backend/langflow/interface/initialize/loading.py index bc8c7f0cf..e8d9cade4 100644 --- a/src/backend/langflow/interface/initialize/loading.py +++ b/src/backend/langflow/interface/initialize/loading.py @@ -157,7 +157,7 @@ def instantiate_prompt(node_type, class_object, params): isinstance(variable, BaseOutputParser) and hasattr(variable, "get_format_instructions") ): - if "handle_keys" not in params: + if "handle_keys" not in format_kwargs: format_kwargs["handle_keys"] = [] # Add the handle_keys to the list