langgraph-api 0.13.0.dev3__py3-none-any.whl → 0.13.0.dev4__py3-none-any.whl
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_api/__init__.py +1 -1
- langgraph_api/api/assistants.py +17 -16
- langgraph_api/graph.py +8 -1
- {langgraph_api-0.13.0.dev3.dist-info → langgraph_api-0.13.0.dev4.dist-info}/METADATA +1 -1
- {langgraph_api-0.13.0.dev3.dist-info → langgraph_api-0.13.0.dev4.dist-info}/RECORD +8 -8
- {langgraph_api-0.13.0.dev3.dist-info → langgraph_api-0.13.0.dev4.dist-info}/WHEEL +0 -0
- {langgraph_api-0.13.0.dev3.dist-info → langgraph_api-0.13.0.dev4.dist-info}/entry_points.txt +0 -0
- {langgraph_api-0.13.0.dev3.dist-info → langgraph_api-0.13.0.dev4.dist-info}/licenses/LICENSE +0 -0
langgraph_api/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.13.0.
|
|
1
|
+
__version__ = "0.13.0.dev4"
|
langgraph_api/api/assistants.py
CHANGED
|
@@ -311,29 +311,30 @@ async def get_assistant_graph(
|
|
|
311
311
|
configurable = config.setdefault("configurable", {})
|
|
312
312
|
configurable.update(get_configurable_headers(request.headers))
|
|
313
313
|
|
|
314
|
+
xray: bool | int = False
|
|
315
|
+
xray_query = request.query_params.get("xray")
|
|
316
|
+
if xray_query:
|
|
317
|
+
if xray_query in ("true", "True"):
|
|
318
|
+
xray = True
|
|
319
|
+
elif xray_query in ("false", "False"):
|
|
320
|
+
xray = False
|
|
321
|
+
else:
|
|
322
|
+
try:
|
|
323
|
+
xray = int(xray_query)
|
|
324
|
+
except ValueError:
|
|
325
|
+
raise HTTPException(422, detail="Invalid xray value") from None
|
|
326
|
+
|
|
327
|
+
if xray <= 0:
|
|
328
|
+
raise HTTPException(422, detail="Invalid xray value") from None
|
|
329
|
+
|
|
314
330
|
async with get_graph(
|
|
315
331
|
assistant["graph_id"],
|
|
316
332
|
config,
|
|
317
333
|
checkpointer=(await api_checkpointer.get_checkpointer()),
|
|
318
334
|
store=(await api_store.get_store()),
|
|
319
335
|
access_context="assistants.read",
|
|
336
|
+
use_langgraph_runtime=bool(xray),
|
|
320
337
|
) as graph:
|
|
321
|
-
xray: bool | int = False
|
|
322
|
-
xray_query = request.query_params.get("xray")
|
|
323
|
-
if xray_query:
|
|
324
|
-
if xray_query in ("true", "True"):
|
|
325
|
-
xray = True
|
|
326
|
-
elif xray_query in ("false", "False"):
|
|
327
|
-
xray = False
|
|
328
|
-
else:
|
|
329
|
-
try:
|
|
330
|
-
xray = int(xray_query)
|
|
331
|
-
except ValueError:
|
|
332
|
-
raise HTTPException(422, detail="Invalid xray value") from None
|
|
333
|
-
|
|
334
|
-
if xray <= 0:
|
|
335
|
-
raise HTTPException(422, detail="Invalid xray value") from None
|
|
336
|
-
|
|
337
338
|
if isinstance(graph, BaseRemotePregel):
|
|
338
339
|
drawable_graph = await graph.fetch_graph(xray=xray)
|
|
339
340
|
json_graph = drawable_graph.to_json()
|
langgraph_api/graph.py
CHANGED
|
@@ -357,6 +357,7 @@ async def get_graph(
|
|
|
357
357
|
access_context: AccessContext,
|
|
358
358
|
run_id: str | None = None,
|
|
359
359
|
context: Any | None = None,
|
|
360
|
+
use_langgraph_runtime: bool = False,
|
|
360
361
|
) -> AsyncIterator[Pregel]:
|
|
361
362
|
"""Return the runnable."""
|
|
362
363
|
from langgraph_api.utils import config as lg_config # noqa: PLC0415
|
|
@@ -373,7 +374,13 @@ async def get_graph(
|
|
|
373
374
|
CONFIG_KEY_RUNTIME,
|
|
374
375
|
)
|
|
375
376
|
|
|
376
|
-
|
|
377
|
+
if use_langgraph_runtime:
|
|
378
|
+
# xray draw calls runtime.override(), which the SDK ServerRuntime lacks (LSD-1713).
|
|
379
|
+
from langgraph.runtime import Runtime # noqa: PLC0415
|
|
380
|
+
|
|
381
|
+
config["configurable"][CONFIG_KEY_RUNTIME] = Runtime(store=store)
|
|
382
|
+
else:
|
|
383
|
+
config["configurable"][CONFIG_KEY_RUNTIME] = server_runtime
|
|
377
384
|
elif store is not None:
|
|
378
385
|
from langgraph.constants import CONFIG_KEY_STORE # noqa: PLC0415
|
|
379
386
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
langgraph_api/__init__.py,sha256=
|
|
1
|
+
langgraph_api/__init__.py,sha256=IJ6T00gqMUWJ3oiiXB2xJKESlJc2_Z4RdXtAjpbSYzI,28
|
|
2
2
|
langgraph_api/_factory_utils.py,sha256=_FqW0olMu2PGLsnRq0ylt3a4jDCe12YIFHExMXI6Nyo,5976
|
|
3
3
|
langgraph_api/asgi_transport.py,sha256=XApY3lIWBZTMbbsl8dDJzl0cLGirmAGE0SifqZUnXvs,11896
|
|
4
4
|
langgraph_api/asyncio.py,sha256=smqyAoO9nIyPPQRw1IVSCh85fwoZP4PEo-5dDhxGruc,10676
|
|
@@ -8,7 +8,7 @@ langgraph_api/command.py,sha256=d-k8h6H4ix1n7fSZ-Zb01NbSkEyqrD6cMKfDFXEIYEw,821
|
|
|
8
8
|
langgraph_api/cron_scheduler.py,sha256=OwFzCwD86pfMNpfm9Z8bBS_WY9bBfDxGnq8_7wXurdA,6016
|
|
9
9
|
langgraph_api/errors.py,sha256=zlMW99wAzNkz2xfik-HMkl_wMqmRFvs1j8V-_DZbAUc,2553
|
|
10
10
|
langgraph_api/feature_flags.py,sha256=P7yQ9jXMHO3dPWv51iWGAVrPg3LbR9m4aCT_7t1UtZw,2624
|
|
11
|
-
langgraph_api/graph.py,sha256=
|
|
11
|
+
langgraph_api/graph.py,sha256=o--PRRg986nR2HVii_tgbGba9neiNFQ0wu_y5M9joJA,38403
|
|
12
12
|
langgraph_api/http.py,sha256=7hPxKbj-xoAKcm7iucBpT5nM_hXOgGVCPbBsCD693Cw,6977
|
|
13
13
|
langgraph_api/http_metrics.py,sha256=etxbZNmYxdb58DVLNkHP7S-N6njXPTiQh2OWKMaIZi8,5336
|
|
14
14
|
langgraph_api/http_metrics_utils.py,sha256=sjxF7SYGTzY0Wz_G0dzatsYNnWr31S6ujej4JmBG2yo,866
|
|
@@ -41,7 +41,7 @@ langgraph_api/_checkpointer/_adapter.py,sha256=1jJi0vXoNKeCwNP26W8bmYrwe-fOWFqep
|
|
|
41
41
|
langgraph_api/_checkpointer/protocol.py,sha256=udgYKMNtKWG_eLDwYkHXV3b2bZLZg8Rsfm3fjkhU-rU,3635
|
|
42
42
|
langgraph_api/api/__init__.py,sha256=Zu1ew3dxYZu7cLRAjn-6HcYmtuQBdihlVFMKMJ77Y3c,9269
|
|
43
43
|
langgraph_api/api/a2a.py,sha256=9Ylvywxi-qRnwNx6pEg9davUJHEdzMifsSUI-il_jb4,98001
|
|
44
|
-
langgraph_api/api/assistants.py,sha256=
|
|
44
|
+
langgraph_api/api/assistants.py,sha256=y_39ur-5EADCNU4eCk9WwinPI1dvImcMQrC0tSkxdQg,20886
|
|
45
45
|
langgraph_api/api/event_streaming.py,sha256=jvoBp5qHI92JJHsx4f9LEpb0i0VE31G_qFhS5JQWtlA,17809
|
|
46
46
|
langgraph_api/api/meta.py,sha256=5s017GfMs-Ghq6Z5K6yW4UjbVFzCsmeXKn4UEJmfs98,4757
|
|
47
47
|
langgraph_api/api/openapi.py,sha256=Zkdlb9mjrQyHro1TtrDIWVuaBDovxx-uGWJ1fZMOg54,12604
|
|
@@ -236,8 +236,8 @@ langgraph_grpc_common/proto/store_pb2.py,sha256=uAYM7OcdEOK12iRcPYihC2suSeCo_Qdb
|
|
|
236
236
|
langgraph_grpc_common/proto/store_pb2.pyi,sha256=_dcxyxV8moR6H67qU42r2h2p_Ub-PZSHs3OoS9KMdSY,27782
|
|
237
237
|
langgraph_grpc_common/proto/store_pb2_grpc.py,sha256=wSD65QgFkYTkPTHcf7VhyI2FQ7UH_RgIf3vQW3VYlsM,3324
|
|
238
238
|
langgraph_grpc_common/proto/store_pb2_grpc.pyi,sha256=oS1h2cDoq2OjyM8xazcmc8LwRDC5oCAD0zto2QUmPQw,2027
|
|
239
|
-
langgraph_api-0.13.0.
|
|
240
|
-
langgraph_api-0.13.0.
|
|
241
|
-
langgraph_api-0.13.0.
|
|
242
|
-
langgraph_api-0.13.0.
|
|
243
|
-
langgraph_api-0.13.0.
|
|
239
|
+
langgraph_api-0.13.0.dev4.dist-info/METADATA,sha256=syKGu0adKu06xPM2VhtFeJKtPVwqWyMYbzj8ew8W9eY,4630
|
|
240
|
+
langgraph_api-0.13.0.dev4.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
|
|
241
|
+
langgraph_api-0.13.0.dev4.dist-info/entry_points.txt,sha256=hGedv8n7cgi41PypMfinwS_HfCwA7xJIfS0jAp8htV8,78
|
|
242
|
+
langgraph_api-0.13.0.dev4.dist-info/licenses/LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
|
|
243
|
+
langgraph_api-0.13.0.dev4.dist-info/RECORD,,
|
|
File without changes
|
{langgraph_api-0.13.0.dev3.dist-info → langgraph_api-0.13.0.dev4.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{langgraph_api-0.13.0.dev3.dist-info → langgraph_api-0.13.0.dev4.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|