🐛 fix(__main__.py): fix default value of components_path option to point to the correct directory

 feat(__main__.py): add support for LANGFLOW_COMPONENTS_PATH environment variable to specify the directory containing custom components
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-08-01 18:12:02 -03:00
commit 9f97ecba25

View file

@ -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",
),