Add BranchComponent to utilities package
This commit is contained in:
parent
603bca019c
commit
ef78b5eeb6
1 changed files with 14 additions and 0 deletions
14
src/backend/langflow/components/utilities/Branch.py
Normal file
14
src/backend/langflow/components/utilities/Branch.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
from langflow import CustomComponent
|
||||
from langflow.field_typing import Text
|
||||
|
||||
|
||||
class BranchComponent(CustomComponent):
|
||||
display_name: str = "Branch Component"
|
||||
documentation: str = "http://docs.langflow.org/components/custom"
|
||||
is_conditional = True
|
||||
|
||||
def build_config(self):
|
||||
return {"param": {"display_name": "Parameter"}}
|
||||
|
||||
def build(self, param: Text) -> Text:
|
||||
return {"path": True, "result": param}
|
||||
Loading…
Add table
Add a link
Reference in a new issue