From 8a4f1406decb4d7ad37a9c917b5f085fc5288a08 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Tue, 4 Jul 2023 09:49:00 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(validate.py):=20fix=20input?= =?UTF-8?q?=5Ftypes=20in=20add=5Fnew=5Fvariables=5Fto=5Ftemplate=20functio?= =?UTF-8?q?n=20to=20use=20correct=20input=20types=20The=20input=5Ftypes=20?= =?UTF-8?q?in=20the=20add=5Fnew=5Fvariables=5Fto=5Ftemplate=20function=20w?= =?UTF-8?q?ere=20incorrect.=20They=20were=20set=20to=20["BaseLoader",=20"B?= =?UTF-8?q?aseOutputParser"]=20instead=20of=20["Document",=20"BaseOutputPa?= =?UTF-8?q?rser"].=20This=20fix=20ensures=20that=20the=20correct=20input?= =?UTF-8?q?=20types=20are=20used=20for=20the=20template=20field.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/api/v1/validate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/langflow/api/v1/validate.py b/src/backend/langflow/api/v1/validate.py index 36870af35..9878376c7 100644 --- a/src/backend/langflow/api/v1/validate.py +++ b/src/backend/langflow/api/v1/validate.py @@ -71,7 +71,7 @@ def add_new_variables_to_template(input_variables, prompt_request): field_type="str", show=True, advanced=False, - input_types=["BaseLoader", "BaseOutputParser"], + input_types=["Document", "BaseOutputParser"], ) prompt_request.frontend_node.template[variable] = template_field.to_dict()