diff --git a/src/backend/langflow/__main__.py b/src/backend/langflow/__main__.py index b20a2a902..58789908a 100644 --- a/src/backend/langflow/__main__.py +++ b/src/backend/langflow/__main__.py @@ -127,7 +127,7 @@ def serve( timeout: int = typer.Option(300, help="Worker timeout in seconds."), port: int = typer.Option(7860, help="Port to listen on.", envvar="LANGFLOW_PORT"), components_path: Optional[Path] = typer.Option( - Path(__file__).parent, + Path(__file__).parent / "components", help="Path to the directory containing custom components.", envvar="LANGFLOW_COMPONENTS_PATH", ), diff --git a/src/backend/langflow/components/custom_components/custom.py b/src/backend/langflow/components/custom_components/custom.py index 3ebc5bda8..cec2c7acd 100644 --- a/src/backend/langflow/components/custom_components/custom.py +++ b/src/backend/langflow/components/custom_components/custom.py @@ -7,12 +7,13 @@ from langchain.schema import Document import requests + class YourComponent(CustomComponent): display_name: str = "Custom Component" - description: str = "My description" + description: str = "Create any custom component you want!" def build_config(self): - return { "url": { "multiline": True, "required": True } } + return {"url": {"multiline": True, "required": True}} def build(self, url: str, llm: BaseLLM, prompt: PromptTemplate) -> Document: response = requests.get(url)