langgraph-api 0.2.7__tar.gz → 0.2.9__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.
Potentially problematic release.
This version of langgraph-api might be problematic. Click here for more details.
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/PKG-INFO +2 -2
- langgraph_api-0.2.9/langgraph_api/__init__.py +1 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/api/assistants.py +7 -2
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/package.json +1 -1
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/tests/api.test.mts +59 -11
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/yarn.lock +4 -4
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/worker.py +21 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/openapi.json +21 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/pyproject.toml +2 -2
- langgraph_api-0.2.7/langgraph_api/__init__.py +0 -1
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/LICENSE +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/README.md +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/api/__init__.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/api/mcp.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/api/meta.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/api/openapi.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/api/runs.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/api/store.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/api/threads.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/api/ui.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/asyncio.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/auth/__init__.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/auth/custom.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/auth/langsmith/__init__.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/auth/langsmith/backend.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/auth/langsmith/client.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/auth/middleware.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/auth/noop.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/auth/studio_user.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/cli.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/command.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/config.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/cron_scheduler.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/errors.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/graph.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/http.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/.gitignore +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/.prettierrc +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/__init__.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/base.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/build.mts +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/client.http.mts +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/client.mts +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/errors.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/global.d.ts +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/remote.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/schema.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/src/graph.mts +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/src/load.hooks.mjs +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/src/parser/parser.mts +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/src/parser/parser.worker.mjs +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/src/parser/schema/types.mts +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/src/parser/schema/types.template.mts +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/src/preload.mjs +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/src/utils/files.mts +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/src/utils/importMap.mts +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/src/utils/pythonSchemas.mts +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/src/utils/serde.mts +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/sse.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/tests/auth.test.mts +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/tests/compose-postgres.auth.yml +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/tests/compose-postgres.yml +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/tests/graphs/.gitignore +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/tests/graphs/agent.css +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/tests/graphs/agent.mts +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/tests/graphs/agent.ui.tsx +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/tests/graphs/agent_simple.mts +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/tests/graphs/auth.mts +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/tests/graphs/command.mts +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/tests/graphs/delay.mts +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/tests/graphs/dynamic.mts +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/tests/graphs/error.mts +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/tests/graphs/http.mts +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/tests/graphs/langgraph.json +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/tests/graphs/nested.mts +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/tests/graphs/package.json +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/tests/graphs/weather.mts +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/tests/graphs/yarn.lock +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/tests/parser.test.mts +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/tests/utils.mts +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/tsconfig.json +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/ui.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/logging.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/metadata.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/middleware/__init__.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/middleware/http_logger.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/middleware/private_network.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/models/__init__.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/models/run.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/patch.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/queue_entrypoint.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/route.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/schema.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/serde.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/server.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/sse.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/state.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/stream.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/thread_ttl.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/tunneling/cloudflare.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/utils.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/validation.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/webhook.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_license/__init__.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_license/validation.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_runtime/__init__.py +0 -0
- {langgraph_api-0.2.7 → langgraph_api-0.2.9}/logging.json +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: langgraph-api
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.9
|
|
4
4
|
Summary:
|
|
5
5
|
License: Elastic-2.0
|
|
6
6
|
Author: Nuno Campos
|
|
@@ -18,7 +18,7 @@ Requires-Dist: jsonschema-rs (>=0.20.0,<0.30)
|
|
|
18
18
|
Requires-Dist: langchain-core (>=0.2.38) ; python_version < "4.0"
|
|
19
19
|
Requires-Dist: langgraph (>=0.3.27) ; python_version < "4.0"
|
|
20
20
|
Requires-Dist: langgraph-checkpoint (>=2.0.23) ; python_version < "4.0"
|
|
21
|
-
Requires-Dist: langgraph-runtime-inmem (>=0.0.
|
|
21
|
+
Requires-Dist: langgraph-runtime-inmem (>=0.0.9,<0.1)
|
|
22
22
|
Requires-Dist: langgraph-sdk (>=0.1.66,<0.2.0) ; python_version < "4.0"
|
|
23
23
|
Requires-Dist: langsmith (>=0.1.63)
|
|
24
24
|
Requires-Dist: orjson (>=3.9.7)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.9"
|
|
@@ -138,14 +138,19 @@ async def search_assistants(
|
|
|
138
138
|
"""List assistants."""
|
|
139
139
|
payload = await request.json(AssistantSearchRequest)
|
|
140
140
|
async with connect() as conn:
|
|
141
|
-
assistants_iter = await Assistants.search(
|
|
141
|
+
assistants_iter, total = await Assistants.search(
|
|
142
142
|
conn,
|
|
143
143
|
graph_id=payload.get("graph_id"),
|
|
144
144
|
metadata=payload.get("metadata"),
|
|
145
145
|
limit=int(payload.get("limit") or 10),
|
|
146
146
|
offset=int(payload.get("offset") or 0),
|
|
147
|
+
sort_by=payload.get("sort_by"),
|
|
148
|
+
sort_order=payload.get("sort_order"),
|
|
147
149
|
)
|
|
148
|
-
return ApiResponse(
|
|
150
|
+
return ApiResponse(
|
|
151
|
+
[assistant async for assistant in assistants_iter],
|
|
152
|
+
headers={"X-Pagination-Total": str(total)},
|
|
153
|
+
)
|
|
149
154
|
|
|
150
155
|
|
|
151
156
|
@retry_db
|
|
@@ -37,6 +37,8 @@ interface AgentState {
|
|
|
37
37
|
sharedStateValue?: string | null;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
// the way this test is set up, it instantiates the client
|
|
41
|
+
// with 6 graphs.
|
|
40
42
|
beforeAll(async () => {
|
|
41
43
|
await sql`DELETE FROM thread`;
|
|
42
44
|
await sql`DELETE FROM store`;
|
|
@@ -44,12 +46,24 @@ beforeAll(async () => {
|
|
|
44
46
|
});
|
|
45
47
|
|
|
46
48
|
describe("assistants", () => {
|
|
49
|
+
beforeEach(async () => {
|
|
50
|
+
await sql`DELETE FROM assistant WHERE metadata->>'created_by' is null OR metadata->>'created_by' != 'system'`;
|
|
51
|
+
});
|
|
52
|
+
|
|
47
53
|
it("create read update delete", async () => {
|
|
48
54
|
const graphId = "agent";
|
|
49
55
|
const config = { configurable: { model_name: "gpt" } };
|
|
50
56
|
|
|
51
|
-
let res = await client.assistants.create({
|
|
52
|
-
|
|
57
|
+
let res = await client.assistants.create({
|
|
58
|
+
graphId,
|
|
59
|
+
config,
|
|
60
|
+
name: "assistant1",
|
|
61
|
+
});
|
|
62
|
+
expect(res).toMatchObject({
|
|
63
|
+
graph_id: graphId,
|
|
64
|
+
config,
|
|
65
|
+
name: "assistant1",
|
|
66
|
+
});
|
|
53
67
|
|
|
54
68
|
const metadata = { name: "woof" };
|
|
55
69
|
await client.assistants.update(res.assistant_id, { graphId, metadata });
|
|
@@ -57,6 +71,36 @@ describe("assistants", () => {
|
|
|
57
71
|
res = await client.assistants.get(res.assistant_id);
|
|
58
72
|
expect(res).toMatchObject({ graph_id: graphId, config, metadata });
|
|
59
73
|
|
|
74
|
+
const secondAssistant = await client.assistants.create({
|
|
75
|
+
graphId,
|
|
76
|
+
config,
|
|
77
|
+
name: "assistant2",
|
|
78
|
+
});
|
|
79
|
+
expect(secondAssistant).toMatchObject({
|
|
80
|
+
graph_id: graphId,
|
|
81
|
+
config,
|
|
82
|
+
name: "assistant2",
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
const search = await client.assistants.search();
|
|
86
|
+
const customAssistants = search.filter(
|
|
87
|
+
(a) => a.metadata?.created_by !== "system",
|
|
88
|
+
);
|
|
89
|
+
expect(customAssistants.length).toBe(2);
|
|
90
|
+
expect(customAssistants[0].name).toBe("assistant2");
|
|
91
|
+
expect(customAssistants[1].name).toBe("assistant1");
|
|
92
|
+
|
|
93
|
+
const search2 = await client.assistants.search({
|
|
94
|
+
sortBy: "name",
|
|
95
|
+
sortOrder: "desc",
|
|
96
|
+
});
|
|
97
|
+
const customAssistants2 = search2.filter(
|
|
98
|
+
(a) => a.metadata?.created_by !== "system",
|
|
99
|
+
);
|
|
100
|
+
expect(customAssistants2.length).toBe(2);
|
|
101
|
+
expect(customAssistants2[0].name).toBe("assistant2");
|
|
102
|
+
expect(customAssistants2[1].name).toBe("assistant1");
|
|
103
|
+
|
|
60
104
|
await client.assistants.delete(res.assistant_id);
|
|
61
105
|
await expect(() => client.assistants.get(res.assistant_id)).rejects.toThrow(
|
|
62
106
|
"HTTP 404: Not Found",
|
|
@@ -134,23 +178,27 @@ describe("assistants", () => {
|
|
|
134
178
|
|
|
135
179
|
it("list assistants", async () => {
|
|
136
180
|
let search = await client.assistants.search();
|
|
137
|
-
|
|
138
|
-
|
|
181
|
+
const numAssistants = search.length;
|
|
182
|
+
|
|
183
|
+
const customAssistants = search.filter(
|
|
184
|
+
(a) => a.metadata?.created_by !== "system",
|
|
185
|
+
);
|
|
186
|
+
expect(customAssistants.length).toBe(0);
|
|
139
187
|
|
|
140
188
|
const graphid = "agent";
|
|
141
189
|
const create = await client.assistants.create({ graphId: "agent" });
|
|
142
190
|
|
|
143
191
|
search = await client.assistants.search();
|
|
144
|
-
expect(search.length).
|
|
192
|
+
expect(search.length).toBe(numAssistants + 1);
|
|
145
193
|
|
|
146
194
|
search = await client.assistants.search({ graphId: graphid });
|
|
147
|
-
expect(search.length).
|
|
195
|
+
expect(search.length).toBe(2);
|
|
148
196
|
expect(search.every((i) => i.graph_id === graphid)).toBe(true);
|
|
149
197
|
|
|
150
198
|
search = await client.assistants.search({
|
|
151
199
|
metadata: { created_by: "system" },
|
|
152
200
|
});
|
|
153
|
-
expect(search.length).
|
|
201
|
+
expect(search.length).toBe(numAssistants);
|
|
154
202
|
expect(search.every((i) => i.assistant_id !== create.assistant_id)).toBe(
|
|
155
203
|
true,
|
|
156
204
|
);
|
|
@@ -255,7 +303,7 @@ describe("threads crud", () => {
|
|
|
255
303
|
});
|
|
256
304
|
|
|
257
305
|
describe("threads copy", () => {
|
|
258
|
-
it.concurrent("copy", async () => {
|
|
306
|
+
it.concurrent("copy", { retry: 3 }, async () => {
|
|
259
307
|
const assistantId = "agent";
|
|
260
308
|
const thread = await client.threads.create();
|
|
261
309
|
const input = { messages: [{ type: "human", content: "foo" }] };
|
|
@@ -329,7 +377,7 @@ describe("threads copy", () => {
|
|
|
329
377
|
}
|
|
330
378
|
});
|
|
331
379
|
|
|
332
|
-
it.concurrent("copy runs", async () => {
|
|
380
|
+
it.concurrent("copy runs", { retry: 3 }, async () => {
|
|
333
381
|
const assistantId = "agent";
|
|
334
382
|
const thread = await client.threads.create();
|
|
335
383
|
|
|
@@ -375,7 +423,7 @@ describe("threads copy", () => {
|
|
|
375
423
|
expect(currentOriginalThreadState).toEqual(originalThreadState);
|
|
376
424
|
});
|
|
377
425
|
|
|
378
|
-
it.concurrent("get thread history", async () => {
|
|
426
|
+
it.concurrent("get thread history", { retry: 3 }, async () => {
|
|
379
427
|
const assistant = await client.assistants.create({ graphId: "agent" });
|
|
380
428
|
const thread = await client.threads.create();
|
|
381
429
|
const input = { messages: [{ type: "human", content: "foo" }] };
|
|
@@ -419,7 +467,7 @@ describe("threads copy", () => {
|
|
|
419
467
|
expect(filteredHistory.at(-1)?.values.messages.length).toBe(4);
|
|
420
468
|
});
|
|
421
469
|
|
|
422
|
-
it.concurrent("copy update", async () => {
|
|
470
|
+
it.concurrent("copy update", { retry: 3 }, async () => {
|
|
423
471
|
const assistantId = "agent";
|
|
424
472
|
const thread = await client.threads.create();
|
|
425
473
|
const input = {
|
|
@@ -236,10 +236,10 @@
|
|
|
236
236
|
dependencies:
|
|
237
237
|
uuid "^10.0.0"
|
|
238
238
|
|
|
239
|
-
"@langchain/langgraph-sdk@^0.0.
|
|
240
|
-
version "0.0.
|
|
241
|
-
resolved "https://registry.yarnpkg.com/@langchain/langgraph-sdk/-/langgraph-sdk-0.0.
|
|
242
|
-
integrity sha512-
|
|
239
|
+
"@langchain/langgraph-sdk@^0.0.73":
|
|
240
|
+
version "0.0.73"
|
|
241
|
+
resolved "https://registry.yarnpkg.com/@langchain/langgraph-sdk/-/langgraph-sdk-0.0.73.tgz#6f5cb44fb306461182df55be4cf1d263c5ce3e16"
|
|
242
|
+
integrity sha512-V3E7Bd1KNcTpnEglZqKpnQtth62WHf+Dxq5V+0CqMxbzPHnW9I4eynCO4c1/HSY/rHgEtvgj7fMvCAb6I5R+lQ==
|
|
243
243
|
dependencies:
|
|
244
244
|
"@types/json-schema" "^7.0.15"
|
|
245
245
|
p-queue "^6.6.2"
|
|
@@ -275,6 +275,27 @@ async def worker(
|
|
|
275
275
|
# let it bubble up and rollback db transaction, thus marking the run
|
|
276
276
|
# as available to be picked up by another worker
|
|
277
277
|
|
|
278
|
+
# If a stateful run succeeded but no checkoint was returned, it's likely because
|
|
279
|
+
# there was a retriable exception that resumed right at the end
|
|
280
|
+
if checkpoint is None and (not temporary) and webhook and status == "success":
|
|
281
|
+
await logger.ainfo(
|
|
282
|
+
"Fetching missing checkpoint for webhook",
|
|
283
|
+
run_id=str(run_id),
|
|
284
|
+
run_attempt=attempt,
|
|
285
|
+
)
|
|
286
|
+
try:
|
|
287
|
+
state_snapshot = await Threads.State.get(
|
|
288
|
+
conn, run["kwargs"]["config"], subgraphs=True
|
|
289
|
+
)
|
|
290
|
+
checkpoint = {"values": state_snapshot.values}
|
|
291
|
+
except Exception:
|
|
292
|
+
await logger.aerror(
|
|
293
|
+
"Failed to fetch missing checkpoint for webhook. Continuing...",
|
|
294
|
+
exc_info=True,
|
|
295
|
+
run_id=str(run_id),
|
|
296
|
+
run_attempt=attempt,
|
|
297
|
+
)
|
|
298
|
+
|
|
278
299
|
return WorkerResult(
|
|
279
300
|
checkpoint=checkpoint,
|
|
280
301
|
status=status,
|
|
@@ -3904,6 +3904,27 @@
|
|
|
3904
3904
|
"description": "The number of results to skip.",
|
|
3905
3905
|
"default": 0,
|
|
3906
3906
|
"minimum": 0
|
|
3907
|
+
},
|
|
3908
|
+
"sort_by": {
|
|
3909
|
+
"type": "string",
|
|
3910
|
+
"enum": [
|
|
3911
|
+
"assistant_id",
|
|
3912
|
+
"created_at",
|
|
3913
|
+
"updated_at",
|
|
3914
|
+
"name",
|
|
3915
|
+
"graph_id"
|
|
3916
|
+
],
|
|
3917
|
+
"title": "Sort By",
|
|
3918
|
+
"description": "The field to sort by."
|
|
3919
|
+
},
|
|
3920
|
+
"sort_order": {
|
|
3921
|
+
"type": "string",
|
|
3922
|
+
"enum": [
|
|
3923
|
+
"asc",
|
|
3924
|
+
"desc"
|
|
3925
|
+
],
|
|
3926
|
+
"title": "Sort Order",
|
|
3927
|
+
"description": "The order to sort by."
|
|
3907
3928
|
}
|
|
3908
3929
|
},
|
|
3909
3930
|
"type": "object",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "langgraph-api"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.9"
|
|
4
4
|
description = ""
|
|
5
5
|
authors = [
|
|
6
6
|
"Nuno Campos <nuno@langchain.dev>",
|
|
@@ -50,7 +50,7 @@ pyjwt = "^2.9.0"
|
|
|
50
50
|
cryptography = ">=42.0.0,<45.0"
|
|
51
51
|
langgraph-sdk = { version = "^0.1.66", python = "<4.0" }
|
|
52
52
|
cloudpickle = "^3.0.0"
|
|
53
|
-
langgraph-runtime-inmem = ">=0.0.
|
|
53
|
+
langgraph-runtime-inmem = ">=0.0.9,<0.1"
|
|
54
54
|
|
|
55
55
|
[tool.poetry.group.dev.dependencies]
|
|
56
56
|
ruff = "^0.11.7"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.2.7"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/src/parser/schema/types.template.mts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langgraph_api-0.2.7 → langgraph_api-0.2.9}/langgraph_api/js/tests/compose-postgres.auth.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|