From 5608b197f2b2d0d9587449402ad3c78bd632c645 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Fri, 4 Aug 2023 09:53:50 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20chore(component.py):=20add=20mis?= =?UTF-8?q?sing=20import=20for=20'Any'=20type=20in=20typing=20module=20to?= =?UTF-8?q?=20fix=20type=20hinting=20=F0=9F=9A=80=20feat(component.py):=20?= =?UTF-8?q?add=20'build'=20method=20to=20Component=20class=20to=20enforce?= =?UTF-8?q?=20implementation=20in=20subclasses?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/interface/custom/component.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/backend/langflow/interface/custom/component.py b/src/backend/langflow/interface/custom/component.py index 0ba90650f..d122eb6da 100644 --- a/src/backend/langflow/interface/custom/component.py +++ b/src/backend/langflow/interface/custom/component.py @@ -1,5 +1,5 @@ import ast -from typing import Optional +from typing import Any, Optional from pydantic import BaseModel from fastapi import HTTPException @@ -67,3 +67,6 @@ class Component(BaseModel): template_config["beta"] = ast.literal_eval(item_value) return template_config + + def build(self, *args: Any, **kwargs: Any) -> Any: + raise NotImplementedError