langgraph-api 0.1.12__py3-none-any.whl → 0.1.14__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 +6 -2
- langgraph_api/js/package.json +1 -1
- langgraph_api/js/tests/api.test.mts +16 -3
- langgraph_api/js/yarn.lock +11 -1
- {langgraph_api-0.1.12.dist-info → langgraph_api-0.1.14.dist-info}/METADATA +3 -2
- {langgraph_api-0.1.12.dist-info → langgraph_api-0.1.14.dist-info}/RECORD +11 -11
- openapi.json +20 -0
- {langgraph_api-0.1.12.dist-info → langgraph_api-0.1.14.dist-info}/LICENSE +0 -0
- {langgraph_api-0.1.12.dist-info → langgraph_api-0.1.14.dist-info}/WHEEL +0 -0
- {langgraph_api-0.1.12.dist-info → langgraph_api-0.1.14.dist-info}/entry_points.txt +0 -0
langgraph_api/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.1.
|
|
1
|
+
__version__ = "0.1.14"
|
langgraph_api/api/threads.py
CHANGED
|
@@ -55,15 +55,19 @@ async def search_threads(
|
|
|
55
55
|
"""List threads."""
|
|
56
56
|
payload = await request.json(ThreadSearchRequest)
|
|
57
57
|
async with connect() as conn:
|
|
58
|
-
iter = await Threads.search(
|
|
58
|
+
iter, total = await Threads.search(
|
|
59
59
|
conn,
|
|
60
60
|
status=payload.get("status"),
|
|
61
61
|
values=payload.get("values"),
|
|
62
62
|
metadata=payload.get("metadata"),
|
|
63
63
|
limit=payload.get("limit") or 10,
|
|
64
64
|
offset=payload.get("offset") or 0,
|
|
65
|
+
sort_by=payload.get("sort_by"),
|
|
66
|
+
sort_order=payload.get("sort_order"),
|
|
65
67
|
)
|
|
66
|
-
return ApiResponse(
|
|
68
|
+
return ApiResponse(
|
|
69
|
+
[thread async for thread in iter], headers={"X-Pagination-Total": str(total)}
|
|
70
|
+
)
|
|
67
71
|
|
|
68
72
|
|
|
69
73
|
@retry_db
|
langgraph_api/js/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { describe, expect, it, beforeEach, beforeAll } from "vitest";
|
|
2
1
|
import { Client, FeedbackStreamEvent } from "@langchain/langgraph-sdk";
|
|
2
|
+
import { beforeAll, beforeEach, describe, expect, it } from "vitest";
|
|
3
3
|
|
|
4
|
-
import postgres from "postgres";
|
|
5
|
-
import { findLast, gatherIterator } from "./utils.mts";
|
|
6
4
|
import {
|
|
7
5
|
BaseMessageFields,
|
|
8
6
|
BaseMessageLike,
|
|
9
7
|
MessageType,
|
|
10
8
|
} from "@langchain/core/messages";
|
|
11
9
|
import { randomUUID } from "crypto";
|
|
10
|
+
import postgres from "postgres";
|
|
11
|
+
import { findLast, gatherIterator } from "./utils.mts";
|
|
12
12
|
|
|
13
13
|
const sql = postgres(
|
|
14
14
|
process.env.POSTGRES_URI ??
|
|
@@ -238,6 +238,19 @@ describe("threads crud", () => {
|
|
|
238
238
|
search = await client.threads.search({ offset: 1, limit: 1 });
|
|
239
239
|
expect(search.length).toBe(1);
|
|
240
240
|
expect(createThreadResponse.thread_id).toBe(search[0].thread_id);
|
|
241
|
+
|
|
242
|
+
// test sorting
|
|
243
|
+
search = await client.threads.search({
|
|
244
|
+
sortBy: "created_at",
|
|
245
|
+
sortOrder: "asc",
|
|
246
|
+
});
|
|
247
|
+
expect(search[0].thread_id).toBe(createThreadResponse.thread_id);
|
|
248
|
+
|
|
249
|
+
search = await client.threads.search({
|
|
250
|
+
sortBy: "created_at",
|
|
251
|
+
sortOrder: "desc",
|
|
252
|
+
});
|
|
253
|
+
expect(search[1].thread_id).toBe(createThreadResponse.thread_id);
|
|
241
254
|
});
|
|
242
255
|
});
|
|
243
256
|
|
langgraph_api/js/yarn.lock
CHANGED
|
@@ -235,7 +235,17 @@
|
|
|
235
235
|
dependencies:
|
|
236
236
|
uuid "^10.0.0"
|
|
237
237
|
|
|
238
|
-
"@langchain/langgraph-sdk@^0.0.
|
|
238
|
+
"@langchain/langgraph-sdk@^0.0.70":
|
|
239
|
+
version "0.0.70"
|
|
240
|
+
resolved "https://registry.yarnpkg.com/@langchain/langgraph-sdk/-/langgraph-sdk-0.0.70.tgz#9589f984b47de5e4a669b6008cbf01427a3d41d0"
|
|
241
|
+
integrity sha512-O8I12bfeMVz5fOrXnIcK4IdRf50IqyJTO458V56wAIHLNoi4H8/JHM+2M+Y4H2PtslXIGnvomWqlBd0eY5z/Og==
|
|
242
|
+
dependencies:
|
|
243
|
+
"@types/json-schema" "^7.0.15"
|
|
244
|
+
p-queue "^6.6.2"
|
|
245
|
+
p-retry "4"
|
|
246
|
+
uuid "^9.0.0"
|
|
247
|
+
|
|
248
|
+
"@langchain/langgraph-sdk@~0.0.32":
|
|
239
249
|
version "0.0.67"
|
|
240
250
|
resolved "https://registry.yarnpkg.com/@langchain/langgraph-sdk/-/langgraph-sdk-0.0.67.tgz#d856110727669f59cf9367cea99d88479de164d4"
|
|
241
251
|
integrity sha512-JWa0OuiXPoFztmBleUj6N00snuZt80Df6BSMUEjBfMSRNVPn7yiyyz/QTkzuW1LqqVZKPI4O8Bpimnw2xIg3BA==
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: langgraph-api
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.14
|
|
4
4
|
Summary:
|
|
5
5
|
License: Elastic-2.0
|
|
6
6
|
Author: Nuno Campos
|
|
@@ -18,7 +18,8 @@ Requires-Dist: jsonschema-rs (>=0.20.0,<0.30)
|
|
|
18
18
|
Requires-Dist: langchain-core (>=0.2.38,<0.4.0)
|
|
19
19
|
Requires-Dist: langgraph (>=0.2.56,<0.4.0)
|
|
20
20
|
Requires-Dist: langgraph-checkpoint (>=2.0.23,<3.0)
|
|
21
|
-
Requires-Dist: langgraph-
|
|
21
|
+
Requires-Dist: langgraph-runtime-inmem (>=0.0.5)
|
|
22
|
+
Requires-Dist: langgraph-sdk (>=0.1.63,<0.2.0)
|
|
22
23
|
Requires-Dist: langsmith (>=0.1.63,<0.4.0)
|
|
23
24
|
Requires-Dist: orjson (>=3.9.7)
|
|
24
25
|
Requires-Dist: pyjwt (>=2.9.0,<3.0.0)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
|
|
2
|
-
langgraph_api/__init__.py,sha256=
|
|
2
|
+
langgraph_api/__init__.py,sha256=PIBqEOI-nqKFL9oJAWQQwlHuujG9Cd7EmdxDrThNQto,23
|
|
3
3
|
langgraph_api/api/__init__.py,sha256=IKKMrC5gCHTzjprbg8jgZDrAJRuqJfSUgEkZAgh3l-M,5771
|
|
4
4
|
langgraph_api/api/assistants.py,sha256=i-nxkScUB2g8bTVGtQIp1psABXlaY1aVx9pkB_UiRH8,14353
|
|
5
5
|
langgraph_api/api/mcp.py,sha256=KbR19dtFCpJEiKYj3IfepAuJij8YZVELuVp7JY_yu_o,13754
|
|
@@ -7,7 +7,7 @@ langgraph_api/api/meta.py,sha256=sTgkhE-DaFWpERG6F7KelZfDsmJAiVc4j5dg50tDkSo,295
|
|
|
7
7
|
langgraph_api/api/openapi.py,sha256=OGwzPpYO4e98iqtgL7UEfzI6jP4zXahJ1R-7VgOSZeg,11046
|
|
8
8
|
langgraph_api/api/runs.py,sha256=dhHZ3xu7V0anftqzXaOYnhVEryJpVeqzu60MFiUw4u8,18010
|
|
9
9
|
langgraph_api/api/store.py,sha256=G4Fm8hgFLlJUW5_ekLS_IOgCfpFy-TK9uq5r9QTOELQ,5447
|
|
10
|
-
langgraph_api/api/threads.py,sha256=
|
|
10
|
+
langgraph_api/api/threads.py,sha256=ogMKmEoiycuaV3fa5kpupDohJ7fwUOfVczt6-WSK4FE,9322
|
|
11
11
|
langgraph_api/api/ui.py,sha256=kdCQ-p0voxAqIFc72aqqzdPGH2v-yEBKzjRE6cUPvpU,2201
|
|
12
12
|
langgraph_api/asyncio.py,sha256=h0eZ7aoDGnJpoxnHLZABVlj1jQ78UxjgiHntTmAEWek,8613
|
|
13
13
|
langgraph_api/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -34,7 +34,7 @@ langgraph_api/js/client.http.mts,sha256=AGA-p8J85IcNh2oXZjDxHQ4PnQdJmt-LPcpZp6j0
|
|
|
34
34
|
langgraph_api/js/client.mts,sha256=7v5BcWsR5w6wGCsxhm6xryBgI-5vfu2Or1YmT-GdKyY,28766
|
|
35
35
|
langgraph_api/js/errors.py,sha256=Cm1TKWlUCwZReDC5AQ6SgNIVGD27Qov2xcgHyf8-GXo,361
|
|
36
36
|
langgraph_api/js/global.d.ts,sha256=j4GhgtQSZ5_cHzjSPcHgMJ8tfBThxrH-pUOrrJGteOU,196
|
|
37
|
-
langgraph_api/js/package.json,sha256=
|
|
37
|
+
langgraph_api/js/package.json,sha256=2TAUHkfqY3VV5NUnkYaCVgN3Z9EvUAD32eOLUyASUFk,1289
|
|
38
38
|
langgraph_api/js/remote.py,sha256=pnyq3oGtMX3kGaBLU-lhMf_kKvc1a1324Z3e_KIKAD0,35117
|
|
39
39
|
langgraph_api/js/schema.py,sha256=7idnv7URlYUdSNMBXQcw7E4SxaPxCq_Oxwnlml8q5ik,408
|
|
40
40
|
langgraph_api/js/src/graph.mts,sha256=g86jOvbHj1B0o1jatBc2X5_JEZW2DSNwgUJ_kw1k8Cw,3569
|
|
@@ -48,7 +48,7 @@ langgraph_api/js/src/utils/importMap.mts,sha256=pX4TGOyUpuuWF82kXcxcv3-8mgusRezO
|
|
|
48
48
|
langgraph_api/js/src/utils/pythonSchemas.mts,sha256=98IW7Z_VP7L_CHNRMb3_MsiV3BgLE2JsWQY_PQcRR3o,685
|
|
49
49
|
langgraph_api/js/src/utils/serde.mts,sha256=OuyyO9btvwWd55rU_H4x91dFEJiaPxL-lL9O6Zgo908,742
|
|
50
50
|
langgraph_api/js/sse.py,sha256=lsfp4nyJyA1COmlKG9e2gJnTttf_HGCB5wyH8OZBER8,4105
|
|
51
|
-
langgraph_api/js/tests/api.test.mts,sha256=
|
|
51
|
+
langgraph_api/js/tests/api.test.mts,sha256=yn1pH7F5_cgVQAdIjflJsdxaSIPxYe2y74-7fEFr3C4,68064
|
|
52
52
|
langgraph_api/js/tests/auth.test.mts,sha256=A8JXfEep6S4jzduoSZeRQkqq9WsFbVE8Bvi3Hj_zx2w,21600
|
|
53
53
|
langgraph_api/js/tests/compose-postgres.auth.yml,sha256=iPfJbCeYZdV6GiRLiDn_f7qgpG4TyyGaQ4lV-ZXr6Qk,1768
|
|
54
54
|
langgraph_api/js/tests/compose-postgres.yml,sha256=w4B3YRS0QEnTcZH2-MY0DYvR_c5GcER0uDa1Ga_knf8,1960
|
|
@@ -71,7 +71,7 @@ langgraph_api/js/tests/graphs/yarn.lock,sha256=GwbaZr7inRbWzuuvrQKLHT72zYDKwteng
|
|
|
71
71
|
langgraph_api/js/tests/parser.test.mts,sha256=dEC8KTqKygeb1u39ZvpPqCT4HtfPD947nLmITt2buxA,27883
|
|
72
72
|
langgraph_api/js/tests/utils.mts,sha256=q1V9gvT63v95onlfK9W4iv3n9ZJO3h-0RD9TdDYuRyY,439
|
|
73
73
|
langgraph_api/js/ui.py,sha256=XNT8iBcyT8XmbIqSQUWd-j_00HsaWB2vRTVabwFBkik,2439
|
|
74
|
-
langgraph_api/js/yarn.lock,sha256=
|
|
74
|
+
langgraph_api/js/yarn.lock,sha256=9QYAsy6t__oFZ0dZFexfyxC9iZwORT6AIZwtt8Qm4mM,83748
|
|
75
75
|
langgraph_api/logging.py,sha256=JJIzbNIgLCN6ClQ3tA-Mm5ffuBGvpRDSZsEvnIlsuu4,3693
|
|
76
76
|
langgraph_api/metadata.py,sha256=ptaxwmzdx2bUBSc1KRhqgF-Xnm-Zh2gqwSiHpl8LD9c,4482
|
|
77
77
|
langgraph_api/middleware/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -98,9 +98,9 @@ langgraph_license/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
|
|
|
98
98
|
langgraph_license/validation.py,sha256=ZKraAVJArAABKqrmHN-EN18ncoNUmRm500Yt1Sc7tUA,537
|
|
99
99
|
langgraph_runtime/__init__.py,sha256=O4GgSmu33c-Pr8Xzxj_brcK5vkm70iNTcyxEjICFZxA,1075
|
|
100
100
|
logging.json,sha256=3RNjSADZmDq38eHePMm1CbP6qZ71AmpBtLwCmKU9Zgo,379
|
|
101
|
-
openapi.json,sha256=
|
|
102
|
-
langgraph_api-0.1.
|
|
103
|
-
langgraph_api-0.1.
|
|
104
|
-
langgraph_api-0.1.
|
|
105
|
-
langgraph_api-0.1.
|
|
106
|
-
langgraph_api-0.1.
|
|
101
|
+
openapi.json,sha256=cjlQFtrH7TwXQ9GNe1jy2iBRhae_F6inFZhsaCQidBc,132770
|
|
102
|
+
langgraph_api-0.1.14.dist-info/LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
|
|
103
|
+
langgraph_api-0.1.14.dist-info/METADATA,sha256=6kSMyVnx6Rau8ahYh8tR20tv-VcQIaMvcsMhjCMz3fA,4169
|
|
104
|
+
langgraph_api-0.1.14.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
|
105
|
+
langgraph_api-0.1.14.dist-info/entry_points.txt,sha256=3EYLgj89DfzqJHHYGxPH4A_fEtClvlRbWRUHaXO7hj4,77
|
|
106
|
+
langgraph_api-0.1.14.dist-info/RECORD,,
|
openapi.json
CHANGED
|
@@ -3962,6 +3962,26 @@
|
|
|
3962
3962
|
"description": "Offset to start from.",
|
|
3963
3963
|
"default": 0,
|
|
3964
3964
|
"minimum": 0
|
|
3965
|
+
},
|
|
3966
|
+
"sort_by": {
|
|
3967
|
+
"type": "string",
|
|
3968
|
+
"enum": [
|
|
3969
|
+
"thread_id",
|
|
3970
|
+
"status",
|
|
3971
|
+
"created_at",
|
|
3972
|
+
"updated_at"
|
|
3973
|
+
],
|
|
3974
|
+
"title": "Sort By",
|
|
3975
|
+
"description": "Sort by field."
|
|
3976
|
+
},
|
|
3977
|
+
"sort_order": {
|
|
3978
|
+
"type": "string",
|
|
3979
|
+
"enum": [
|
|
3980
|
+
"asc",
|
|
3981
|
+
"desc"
|
|
3982
|
+
],
|
|
3983
|
+
"title": "Sort Order",
|
|
3984
|
+
"description": "Sort order."
|
|
3965
3985
|
}
|
|
3966
3986
|
},
|
|
3967
3987
|
"type": "object",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|