From 721945b5ce583ab023f6cfa89f7efb5d948b21ce Mon Sep 17 00:00:00 2001 From: Denis Capkovic Date: Mon, 16 Dec 2024 10:50:37 +0100 Subject: [PATCH] Fix config cli type from Path -> str Config parameter in `dev` was typed as pathlib.Path, but it is actually a string. We need to manually create a Path from the string when parsing the config. --- libs/cli/langgraph_cli/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/cli/langgraph_cli/cli.py b/libs/cli/langgraph_cli/cli.py index 5ee4a788f..9c11c4b10 100644 --- a/libs/cli/langgraph_cli/cli.py +++ b/libs/cli/langgraph_cli/cli.py @@ -565,7 +565,7 @@ def dev( host: str, port: int, no_reload: bool, - config: pathlib.Path, + config: str, n_jobs_per_worker: Optional[int], no_browser: bool, debug_port: Optional[int], @@ -594,7 +594,7 @@ def dev( "Please ensure langgraph-cli is installed with the 'inmem' extra: pip install -U \"langgraph-cli[inmem]\"" ) from None - config_json = langgraph_cli.config.validate_config_file(config) + config_json = langgraph_cli.config.validate_config_file(pathlib.Path(config)) cwd = os.getcwd() sys.path.append(cwd) dependencies = config_json.get("dependencies", [])