langgraph-cli 0.1.3__tar.gz → 0.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {langgraph_cli-0.1.3 → langgraph_cli-0.1.4}/PKG-INFO +1 -1
- {langgraph_cli-0.1.3 → langgraph_cli-0.1.4}/langgraph_cli/cli.py +11 -1
- {langgraph_cli-0.1.3 → langgraph_cli-0.1.4}/langgraph_cli/config.py +1 -4
- {langgraph_cli-0.1.3 → langgraph_cli-0.1.4}/langgraph_cli/docker.py +15 -0
- {langgraph_cli-0.1.3 → langgraph_cli-0.1.4}/pyproject.toml +1 -1
- {langgraph_cli-0.1.3 → langgraph_cli-0.1.4}/README.md +0 -0
- {langgraph_cli-0.1.3 → langgraph_cli-0.1.4}/langgraph_cli/__init__.py +0 -0
- {langgraph_cli-0.1.3 → langgraph_cli-0.1.4}/langgraph_cli/initdb/init.sql +0 -0
|
@@ -109,6 +109,14 @@ OPT_C = click.option(
|
|
|
109
109
|
OPT_PORT = click.option(
|
|
110
110
|
"--port", "-p", type=int, default=8123, show_default=True, help="Port to expose"
|
|
111
111
|
)
|
|
112
|
+
OPT_DEBUGGER_PORT = click.option(
|
|
113
|
+
"--debugger-port",
|
|
114
|
+
"-dp",
|
|
115
|
+
type=int,
|
|
116
|
+
default=8124,
|
|
117
|
+
show_default=True,
|
|
118
|
+
help="Port to expose debug UI on",
|
|
119
|
+
)
|
|
112
120
|
|
|
113
121
|
|
|
114
122
|
@click.group()
|
|
@@ -125,6 +133,7 @@ def cli():
|
|
|
125
133
|
@click.option(
|
|
126
134
|
"--pull/--no-pull", default=True, show_default=True, help="Pull latest images"
|
|
127
135
|
)
|
|
136
|
+
@OPT_DEBUGGER_PORT
|
|
128
137
|
@OPT_PORT
|
|
129
138
|
@OPT_O
|
|
130
139
|
@OPT_C
|
|
@@ -135,6 +144,7 @@ def up(
|
|
|
135
144
|
port: int,
|
|
136
145
|
recreate: bool,
|
|
137
146
|
pull: bool,
|
|
147
|
+
debugger_port: Optional[int],
|
|
138
148
|
):
|
|
139
149
|
with asyncio.Runner() as runner:
|
|
140
150
|
# check docker available
|
|
@@ -148,7 +158,7 @@ def up(
|
|
|
148
158
|
if pull:
|
|
149
159
|
runner.run(exec("docker", "pull", "langchain/langserve"))
|
|
150
160
|
# prepare args
|
|
151
|
-
stdin = langgraph_cli.docker.compose(port=port)
|
|
161
|
+
stdin = langgraph_cli.docker.compose(port=port, debugger_port=debugger_port)
|
|
152
162
|
args = [
|
|
153
163
|
"--project-directory",
|
|
154
164
|
config.parent,
|
|
@@ -83,10 +83,7 @@ def config_to_compose(config_path: pathlib.Path, config: Config):
|
|
|
83
83
|
f"ADD {relpath} /tmp/{fullpath.name}/{fullpath.name}\n RUN touch /tmp/{fullpath.name}/pyproject.toml"
|
|
84
84
|
for fullpath, relpath in faux_pkgs.items()
|
|
85
85
|
)
|
|
86
|
-
local_pkgs_str = "
|
|
87
|
-
f"ADD {relpath} /tmp/{fullpath.name}"
|
|
88
|
-
for fullpath, relpath in local_pkgs.items()
|
|
89
|
-
)
|
|
86
|
+
local_pkgs_str = f"ADD {' '.join(local_pkgs.values())} /tmp/" if local_pkgs else ""
|
|
90
87
|
env_vars_str = (
|
|
91
88
|
"\n".join(f" {k}: {v}" for k, v in config["env"].items())
|
|
92
89
|
if isinstance(config["env"], dict)
|
|
@@ -26,12 +26,26 @@ DB = f"""
|
|
|
26
26
|
- {ROOT}/initdb:/docker-entrypoint-initdb.d
|
|
27
27
|
"""
|
|
28
28
|
|
|
29
|
+
DEBUGGER = """
|
|
30
|
+
debugger:
|
|
31
|
+
image: langchain/langserve-debugger
|
|
32
|
+
restart: on-failure:3
|
|
33
|
+
ports:
|
|
34
|
+
- "{debugger_port}:5173"
|
|
35
|
+
depends_on:
|
|
36
|
+
langserve:
|
|
37
|
+
condition: service_healthy
|
|
38
|
+
environment:
|
|
39
|
+
VITE_API_BASE_URL: http://localhost:{port}
|
|
40
|
+
"""
|
|
41
|
+
|
|
29
42
|
|
|
30
43
|
def compose(
|
|
31
44
|
*,
|
|
32
45
|
# postgres://user:password@host:port/database?option=value
|
|
33
46
|
postgres_uri: Optional[str] = None,
|
|
34
47
|
port: int,
|
|
48
|
+
debugger_port: Optional[int] = None,
|
|
35
49
|
) -> str:
|
|
36
50
|
if postgres_uri is None:
|
|
37
51
|
include_db = True
|
|
@@ -42,6 +56,7 @@ def compose(
|
|
|
42
56
|
return f"""
|
|
43
57
|
services:
|
|
44
58
|
{DB if include_db else ""}
|
|
59
|
+
{DEBUGGER.format(port=port, debugger_port=debugger_port) if debugger_port else ""}
|
|
45
60
|
migrate:
|
|
46
61
|
image: langchain/langserve-migrate
|
|
47
62
|
pull_policy: always
|
|
File without changes
|
|
File without changes
|
|
File without changes
|