🔧 fix(custom_component.py): fix import statement for CUSTOM_COMPONENT_SUPPORTED_TYPES
🔧 fix(custom_component.py): fix argument type in return statement of CustomComponent.get_args() 🔧 fix(custom_components.py): make description attribute optional in CustomComponentFrontendNode class
This commit is contained in:
parent
846a15f9fd
commit
8f20105b4b
2 changed files with 4 additions and 2 deletions
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Any, Callable, List, Optional, Union
|
||||
from uuid import UUID
|
||||
from fastapi import HTTPException
|
||||
from langflow.interface.custom.constants import CUSTOM_COMPONENT_SUPPORTED_TYPES
|
||||
from langflow.field_typing.constants import CUSTOM_COMPONENT_SUPPORTED_TYPES
|
||||
from langflow.interface.custom.component import Component
|
||||
from langflow.interface.custom.directory_reader import DirectoryReader
|
||||
from langflow.services.getters import get_db_service
|
||||
|
|
@ -108,6 +108,7 @@ class CustomComponent(Component, extra=Extra.allow):
|
|||
),
|
||||
},
|
||||
)
|
||||
# TODO arg type should be Data if it is None
|
||||
return args
|
||||
|
||||
@property
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ from langflow.template.field.base import TemplateField
|
|||
from langflow.template.frontend_node.base import FrontendNode
|
||||
from langflow.template.template.base import Template
|
||||
from langflow.interface.custom.constants import DEFAULT_CUSTOM_COMPONENT_CODE
|
||||
from typing import Optional
|
||||
|
||||
|
||||
class CustomComponentFrontendNode(FrontendNode):
|
||||
|
|
@ -24,7 +25,7 @@ class CustomComponentFrontendNode(FrontendNode):
|
|||
)
|
||||
],
|
||||
)
|
||||
description: str = "Create any custom component you want!"
|
||||
description: Optional[str] = None
|
||||
base_classes: list[str] = []
|
||||
|
||||
def to_dict(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue