langgraph-api 0.2.110__py3-none-any.whl → 0.2.113__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.
Potentially problematic release.
This version of langgraph-api might be problematic. Click here for more details.
- langgraph_api/__init__.py +1 -1
- langgraph_api/api/threads.py +15 -6
- langgraph_api/js/client.mts +4 -4
- langgraph_api/js/remote.py +5 -2
- {langgraph_api-0.2.110.dist-info → langgraph_api-0.2.113.dist-info}/METADATA +2 -2
- {langgraph_api-0.2.110.dist-info → langgraph_api-0.2.113.dist-info}/RECORD +9 -9
- {langgraph_api-0.2.110.dist-info → langgraph_api-0.2.113.dist-info}/WHEEL +0 -0
- {langgraph_api-0.2.110.dist-info → langgraph_api-0.2.113.dist-info}/entry_points.txt +0 -0
- {langgraph_api-0.2.110.dist-info → langgraph_api-0.2.113.dist-info}/licenses/LICENSE +0 -0
langgraph_api/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.2.
|
|
1
|
+
__version__ = "0.2.113"
|
langgraph_api/api/threads.py
CHANGED
|
@@ -58,20 +58,29 @@ async def search_threads(
|
|
|
58
58
|
):
|
|
59
59
|
"""List threads."""
|
|
60
60
|
payload = await request.json(ThreadSearchRequest)
|
|
61
|
+
limit = int(payload.get("limit") or 10)
|
|
62
|
+
offset = int(payload.get("offset") or 0)
|
|
61
63
|
async with connect() as conn:
|
|
62
|
-
iter,
|
|
64
|
+
iter, next_offset = await Threads.search(
|
|
63
65
|
conn,
|
|
64
66
|
status=payload.get("status"),
|
|
65
67
|
values=payload.get("values"),
|
|
66
68
|
metadata=payload.get("metadata"),
|
|
67
|
-
limit=
|
|
68
|
-
offset=
|
|
69
|
+
limit=limit,
|
|
70
|
+
offset=offset,
|
|
69
71
|
sort_by=payload.get("sort_by"),
|
|
70
72
|
sort_order=payload.get("sort_order"),
|
|
71
73
|
)
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
74
|
+
threads = [thread async for thread in iter]
|
|
75
|
+
if next_offset is None:
|
|
76
|
+
response_headers = {"X-Pagination-Total": str(len(threads) + offset)}
|
|
77
|
+
else:
|
|
78
|
+
cur = str(next_offset)
|
|
79
|
+
response_headers = {
|
|
80
|
+
"X-Pagination-Total": cur,
|
|
81
|
+
"X-Pagination-Next": cur,
|
|
82
|
+
}
|
|
83
|
+
return ApiResponse(threads, headers=response_headers)
|
|
75
84
|
|
|
76
85
|
|
|
77
86
|
@retry_db
|
langgraph_api/js/client.mts
CHANGED
|
@@ -344,6 +344,7 @@ const handleStream = <T extends z.ZodType<any>>(
|
|
|
344
344
|
};
|
|
345
345
|
|
|
346
346
|
try {
|
|
347
|
+
timer = setTimeout(sendHeartbeat, HEARTBEAT_MS);
|
|
347
348
|
for await (const data of handler({ graph_id: graphId, ...body })) {
|
|
348
349
|
await sendSSE(name, data);
|
|
349
350
|
}
|
|
@@ -1094,14 +1095,13 @@ async function main() {
|
|
|
1094
1095
|
}
|
|
1095
1096
|
|
|
1096
1097
|
app.get("/ok", (c) => c.json({ ok: true }));
|
|
1097
|
-
|
|
1098
|
+
|
|
1098
1099
|
app.get("/debug/heapdump", async (c) => {
|
|
1099
1100
|
try {
|
|
1100
|
-
const target =
|
|
1101
|
-
`/tmp/heapdump-${Date.now()}.heapsnapshot`;
|
|
1101
|
+
const target = `/tmp/heapdump-${Date.now()}.heapsnapshot`;
|
|
1102
1102
|
await fs.mkdir(path.dirname(target), { recursive: true });
|
|
1103
1103
|
const written = writeHeapSnapshot(target);
|
|
1104
|
-
return c.json({ ok: true, written });
|
|
1104
|
+
return c.json({ ok: true, written }); // 200
|
|
1105
1105
|
} catch (error) {
|
|
1106
1106
|
if (error instanceof HTTPException) {
|
|
1107
1107
|
return c.json(serializeError(error), error.status);
|
langgraph_api/js/remote.py
CHANGED
|
@@ -239,6 +239,7 @@ class RemotePregel(BaseRemotePregel):
|
|
|
239
239
|
task.get("error"),
|
|
240
240
|
tuple(interrupts),
|
|
241
241
|
state,
|
|
242
|
+
task.get("result"),
|
|
242
243
|
)
|
|
243
244
|
)
|
|
244
245
|
return tuple(result)
|
|
@@ -699,10 +700,12 @@ async def run_remote_checkpointer():
|
|
|
699
700
|
payload = orjson.loads(await request.body())
|
|
700
701
|
return ApiResponse(await cb(payload))
|
|
701
702
|
except ValueError as exc:
|
|
702
|
-
await logger.
|
|
703
|
+
await logger.aexception(
|
|
704
|
+
"ValueError calling remote handler", exc_info=exc
|
|
705
|
+
)
|
|
703
706
|
return ApiResponse({"error": str(exc)}, status_code=400)
|
|
704
707
|
except Exception as exc:
|
|
705
|
-
await logger.
|
|
708
|
+
await logger.aexception("Error calling remote handler", exc_info=exc)
|
|
706
709
|
return ApiResponse({"error": str(exc)}, status_code=500)
|
|
707
710
|
|
|
708
711
|
return wrapped
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: langgraph-api
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.113
|
|
4
4
|
Author-email: Nuno Campos <nuno@langchain.dev>, Will Fu-Hinthorn <will@langchain.dev>
|
|
5
5
|
License: Elastic-2.0
|
|
6
6
|
License-File: LICENSE
|
|
@@ -11,7 +11,7 @@ Requires-Dist: httpx>=0.25.0
|
|
|
11
11
|
Requires-Dist: jsonschema-rs<0.30,>=0.20.0
|
|
12
12
|
Requires-Dist: langchain-core>=0.3.64
|
|
13
13
|
Requires-Dist: langgraph-checkpoint>=2.0.23
|
|
14
|
-
Requires-Dist: langgraph-runtime-inmem<0.7,>=0.6.
|
|
14
|
+
Requires-Dist: langgraph-runtime-inmem<0.7,>=0.6.7
|
|
15
15
|
Requires-Dist: langgraph-sdk>=0.2.0
|
|
16
16
|
Requires-Dist: langgraph>=0.4.0
|
|
17
17
|
Requires-Dist: langsmith>=0.3.45
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
langgraph_api/__init__.py,sha256=
|
|
1
|
+
langgraph_api/__init__.py,sha256=YuoNAr2ZnhYxr-DSsTTZheKFrr_w-5RjlSY_cdQOZ2A,24
|
|
2
2
|
langgraph_api/asgi_transport.py,sha256=eqifhHxNnxvI7jJqrY1_8RjL4Fp9NdN4prEub2FWBt8,5091
|
|
3
3
|
langgraph_api/asyncio.py,sha256=Wv4Rwm-a-Cf6JpfgJmVuVlXQ7SlwrjbTn0eq1ux8I2Q,9652
|
|
4
4
|
langgraph_api/cli.py,sha256=xQojITwmmKSJw48Lr2regcnRPRq2FJqWlPpeyr5TgbU,16158
|
|
@@ -35,7 +35,7 @@ langgraph_api/api/meta.py,sha256=fmc7btbtl5KVlU_vQ3Bj4J861IjlqmjBKNtnxSV-S-Q,419
|
|
|
35
35
|
langgraph_api/api/openapi.py,sha256=KToI2glOEsvrhDpwdScdBnL9xoLOqkTxx5zKq2pMuKQ,11957
|
|
36
36
|
langgraph_api/api/runs.py,sha256=whjpK5Kn3nQy9g9qQK94F_rTlX4oG65WODUyj5TSOwM,20877
|
|
37
37
|
langgraph_api/api/store.py,sha256=TSeMiuMfrifmEnEbL0aObC2DPeseLlmZvAMaMzPgG3Y,5535
|
|
38
|
-
langgraph_api/api/threads.py,sha256=
|
|
38
|
+
langgraph_api/api/threads.py,sha256=NvWQ7j9XMJjOnist2XpNg3rheUhHCiqacC7MsSXFpEQ,9895
|
|
39
39
|
langgraph_api/api/ui.py,sha256=17QrRy2XVzP7x_0RdRw7pmSv-n1lmnb54byHCGGeNhM,2490
|
|
40
40
|
langgraph_api/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
41
41
|
langgraph_api/auth/custom.py,sha256=ZtNSQ4hIldbd2HvRsilwKzN_hjCWIiIOHClmYyPi8FM,22206
|
|
@@ -51,11 +51,11 @@ langgraph_api/js/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,
|
|
|
51
51
|
langgraph_api/js/base.py,sha256=GORqRDbGAOQX2ygT6dMcqBDCA9tdAp8EpG4bfqUPMg4,1198
|
|
52
52
|
langgraph_api/js/build.mts,sha256=bRQo11cglDFXlLN7Y48CQPTSMLenp7MqIWuP1DkSIo0,3139
|
|
53
53
|
langgraph_api/js/client.http.mts,sha256=AGA-p8J85IcNh2oXZjDxHQ4PnQdJmt-LPcpZp6j0Cws,4687
|
|
54
|
-
langgraph_api/js/client.mts,sha256=
|
|
54
|
+
langgraph_api/js/client.mts,sha256=CEz5oOtI_mwqsvsC33S_2TQbxD6mW-AKl6shsRI5G18,32000
|
|
55
55
|
langgraph_api/js/errors.py,sha256=Cm1TKWlUCwZReDC5AQ6SgNIVGD27Qov2xcgHyf8-GXo,361
|
|
56
56
|
langgraph_api/js/global.d.ts,sha256=j4GhgtQSZ5_cHzjSPcHgMJ8tfBThxrH-pUOrrJGteOU,196
|
|
57
57
|
langgraph_api/js/package.json,sha256=BpNAO88mbE-Gv4WzQfj1TLktCWGqm6XBqI892ObuOUw,1333
|
|
58
|
-
langgraph_api/js/remote.py,sha256=
|
|
58
|
+
langgraph_api/js/remote.py,sha256=TkjOnxuvExFwKEg1f1WWPWSKyhVGO2_cTlHngYs4xjo,38011
|
|
59
59
|
langgraph_api/js/schema.py,sha256=M4fLtr50O1jck8H1hm_0W4cZOGYGdkrB7riLyCes4oY,438
|
|
60
60
|
langgraph_api/js/sse.py,sha256=lsfp4nyJyA1COmlKG9e2gJnTttf_HGCB5wyH8OZBER8,4105
|
|
61
61
|
langgraph_api/js/traceblock.mts,sha256=QtGSN5VpzmGqDfbArrGXkMiONY94pMQ5CgzetT_bKYg,761
|
|
@@ -94,8 +94,8 @@ langgraph_runtime/store.py,sha256=7mowndlsIroGHv3NpTSOZDJR0lCuaYMBoTnTrewjslw,11
|
|
|
94
94
|
LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
|
|
95
95
|
logging.json,sha256=3RNjSADZmDq38eHePMm1CbP6qZ71AmpBtLwCmKU9Zgo,379
|
|
96
96
|
openapi.json,sha256=jyQZW5U4V15zWciiIvaDPasYZd3k1iMiQ2vkPxf3zb4,145614
|
|
97
|
-
langgraph_api-0.2.
|
|
98
|
-
langgraph_api-0.2.
|
|
99
|
-
langgraph_api-0.2.
|
|
100
|
-
langgraph_api-0.2.
|
|
101
|
-
langgraph_api-0.2.
|
|
97
|
+
langgraph_api-0.2.113.dist-info/METADATA,sha256=KYzCdutNJiyluoAZUY-ff1_tokxpTsMK-fK_KzDdkHA,3890
|
|
98
|
+
langgraph_api-0.2.113.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
99
|
+
langgraph_api-0.2.113.dist-info/entry_points.txt,sha256=hGedv8n7cgi41PypMfinwS_HfCwA7xJIfS0jAp8htV8,78
|
|
100
|
+
langgraph_api-0.2.113.dist-info/licenses/LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
|
|
101
|
+
langgraph_api-0.2.113.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|