Add CustomComponent class to langflow components
This commit is contained in:
parent
d2966c37df
commit
c8404520fe
1 changed files with 14 additions and 0 deletions
|
|
@ -0,0 +1,14 @@
|
|||
from langflow import CustomComponent
|
||||
from langflow.field_typing import Data
|
||||
|
||||
|
||||
class Component(CustomComponent):
|
||||
display_name: str = "Custom Component"
|
||||
description: str = "Create any custom component you want!"
|
||||
documentation: str = "http://docs.langflow.org/components/custom"
|
||||
|
||||
def build_config(self):
|
||||
return {"param": {"display_name": "Parameter"}}
|
||||
|
||||
def build(self, param: Data) -> Data:
|
||||
return param
|
||||
Loading…
Add table
Add a link
Reference in a new issue