Skip to content

Commit cb53d45

Browse files
committed
fix(notebooks): install langchain-coordinode from git pin; add health checks to 01_llama
- 02_langchain: replace PyPI langchain-coordinode with git+https install from the pinned repo commit so CoordinodeGraph(client=...) constructor is available in Colab (PyPI v0.5.0 lacks this parameter) - 01_llama: add client.health() guard after CoordinodeClient construction in both gRPC branches so the setup cell fails early when the server is unreachable rather than silently passing with a lazy client
1 parent 787ca58 commit cb53d45

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

demo/notebooks/01_llama_index_property_graph.ipynb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@
169169
" from coordinode import CoordinodeClient\n",
170170
"\n",
171171
" client = CoordinodeClient(COORDINODE_ADDR)\n",
172+
" if not client.health():\n",
173+
" client.close()\n",
174+
" raise RuntimeError(f\"CoordiNode at {COORDINODE_ADDR} is not serving health checks\")\n",
172175
" print(f\"Connected to {COORDINODE_ADDR}\")\n",
173176
"else:\n",
174177
" try:\n",
@@ -181,6 +184,9 @@
181184
" from coordinode import CoordinodeClient\n",
182185
"\n",
183186
" client = CoordinodeClient(COORDINODE_ADDR)\n",
187+
" if not client.health():\n",
188+
" client.close()\n",
189+
" raise RuntimeError(f\"CoordiNode at {COORDINODE_ADDR} is not serving health checks\")\n",
184190
" print(f\"Connected to {COORDINODE_ADDR}\")\n",
185191
" else:\n",
186192
" # No server available — use the embedded in-process engine.\n",
@@ -196,7 +202,7 @@
196202
"\n",
197203
" _lc = LocalClient(\":memory:\")\n",
198204
" client = _EmbeddedAdapter(_lc)\n",
199-
" print(\"Using embedded LocalClient (in-process)\")"
205+
" print(\"Using embedded LocalClient (in-process)\")\n"
200206
]
201207
},
202208
{

demo/notebooks/02_langchain_graph_chain.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
" \"-q\",\n",
100100
" \"coordinode\",\n",
101101
" \"langchain\",\n",
102-
" \"langchain-coordinode\",\n",
102+
" \"git+https://github.com/structured-world/coordinode-python.git@4efc7b287211f4cfcf203ce92c83773d7d72ff61#subdirectory=langchain-coordinode\",\n",
103103
" \"langchain-community\",\n",
104104
" \"langchain-openai\",\n",
105105
" ],\n",

0 commit comments

Comments
 (0)