From 57dd75b3f5eb49b76c359826573c9c7944748730 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Wed, 26 Jul 2023 07:43:49 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20chore(component.py):=20add=20Opt?= =?UTF-8?q?ional=20type=20hint=20to=20the=20'code'=20field=20in=20the=20Co?= =?UTF-8?q?mponent=20model=20to=20indicate=20that=20it=20is=20an=20optiona?= =?UTF-8?q?l=20field=20=F0=9F=94=A7=20chore(component.py):=20update=20the?= =?UTF-8?q?=20error=20message=20in=20the=20validate=5Fentrypoint=5Fname=20?= =?UTF-8?q?function=20to=20provide=20more=20clarity=20on=20the=20required?= =?UTF-8?q?=20field?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/interface/custom/component.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backend/langflow/interface/custom/component.py b/src/backend/langflow/interface/custom/component.py index 3db2a2516..a9dc0f323 100644 --- a/src/backend/langflow/interface/custom/component.py +++ b/src/backend/langflow/interface/custom/component.py @@ -1,4 +1,5 @@ import ast +from typing import Optional from pydantic import BaseModel from fastapi import HTTPException @@ -20,7 +21,7 @@ class Component(BaseModel): "The name of the entrypoint function must be provided." ) - code: str + code: Optional[str] function_entrypoint_name = "build" field_config: dict = {}