🐛 fix(utils.py): simplify import_custom_component function by directly importing the CustomComponent class
This commit is contained in:
parent
e08d62e6e9
commit
e23e58f7f7
1 changed files with 1 additions and 3 deletions
|
|
@ -61,9 +61,7 @@ def import_by_type(_type: str, name: str) -> Any:
|
|||
|
||||
def import_custom_component(custom_component: str) -> CustomComponent:
|
||||
"""Import custom component from custom component name"""
|
||||
return import_class(
|
||||
f"langflow.interface.custom.custom_component.{custom_component}"
|
||||
)
|
||||
return import_class("langflow.interface.custom.custom_component.CustomComponent")
|
||||
|
||||
|
||||
def import_output_parser(output_parser: str) -> Any:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue