From 0ecb5317492c3f768a3d433b814f252867866f45 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Wed, 28 Jun 2023 11:33:42 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20fix(base.py):=20add=20input=5Fty?= =?UTF-8?q?pes=20property=20to=20TemplateFieldCreator=20class=20?= =?UTF-8?q?=F0=9F=94=A7=20fix(index.ts):=20add=20input=5Ftypes=20property?= =?UTF-8?q?=20to=20TemplateVariableType=20interface=20The=20`input=5Ftypes?= =?UTF-8?q?`=20property=20is=20added=20to=20the=20`TemplateFieldCreator`?= =?UTF-8?q?=20class=20in=20`base.py`=20and=20the=20`TemplateVariableType`?= =?UTF-8?q?=20interface=20in=20`index.ts`.=20This=20change=20allows=20for?= =?UTF-8?q?=20specifying=20the=20input=20types=20for=20template=20fields?= =?UTF-8?q?=20and=20template=20variables,=20respectively.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/template/field/base.py | 1 + src/frontend/src/types/api/index.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/backend/langflow/template/field/base.py b/src/backend/langflow/template/field/base.py index a9c18ff63..b73a516b4 100644 --- a/src/backend/langflow/template/field/base.py +++ b/src/backend/langflow/template/field/base.py @@ -21,6 +21,7 @@ class TemplateFieldCreator(BaseModel, ABC): name: str = "" display_name: Optional[str] = None advanced: bool = False + input_types: list[str] = [] def to_dict(self): result = self.dict() diff --git a/src/frontend/src/types/api/index.ts b/src/frontend/src/types/api/index.ts index 7fc10f309..ecd79240e 100644 --- a/src/frontend/src/types/api/index.ts +++ b/src/frontend/src/types/api/index.ts @@ -23,6 +23,7 @@ export type TemplateVariableType = { show: boolean; multiline?: boolean; value?: any; + input_types?: Array; [key: string]: any; }; export type sendAllProps = {