Commit Graph
894 Commits
Author SHA1 Message Date
vbarda 0d4617817d Merge branch 'nc/11oct/checkpoint-task-result' of github.com:langchain-ai/langgraph into nc/11oct/checkpoint-task-result 2024-10-14 13:20:25 -04:00
Nuno Campos 5046ec4f43 Lint 2024-10-14 10:16:14 -07:00
Nuno Campos c26bb9e156 lib: Add result for each task in a checkpoint
- Note this requires disabling the optimization that avoids saving writes for the last task in a step
2024-10-14 10:16:14 -07:00
Nuno CamposandGitHub 3982090c6d Merge pull request #2088 from langchain-ai/nc/11oct/stream-interrupt
lib: Add interrupts to stream_mode=updates
2024-10-14 10:15:53 -07:00
vbarda b99734d157 langgraph: support copy without update in Pregel 2024-10-14 10:14:41 -04:00
Nuno Campos dc47c7b357 lib: Add result for each task in a checkpoint
- Note this requires disabling the optimization that avoids saving writes for the last task in a step
2024-10-11 16:08:00 -07:00
Nuno Campos 561aa3080e Lint 2024-10-11 14:28:16 -07:00
Nuno Campos c6a450b857 lib: Add interrupts to stream_mode=updates 2024-10-11 14:28:16 -07:00
Nuno Campos 0557fb03a4 format 2024-10-11 14:28:08 -07:00
Nuno CamposandGitHub c9adf995c2 Merge pull request #2087 from langchain-ai/nc/11oct/o-flag
fix: Work w python's O flag
2024-10-11 12:03:21 -07:00
Nuno Campos fc20de5bba Fix 2024-10-11 11:39:19 -07:00
Nuno Campos 0822a287e3 fix: Work w python's O flag
- assert statements are skipped in that case, so we need to move calls to apply_writes to outside assert statements
2024-10-11 11:24:56 -07:00
Andrew NguonlyandGitHub 66741ba071 Rename RemotePregel to RemoteGraph (#2085) 2024-10-11 10:55:04 -07:00
Andrew NguonlyandGitHub e72c25873f Implement PregelProtocol and RemotePregel class (attempt 2) (#2078)
### Summary
Redo of [this PR](https://github.com/langchain-ai/langgraph/pull/2034)
(branched from clean branch).
2024-10-11 09:23:12 -07:00
Nuno Campos d8954963b4 Update snapshots 2024-10-10 16:27:43 -07:00
Nuno Campos ea38ba9e29 Update uvloop 2024-10-10 16:22:34 -07:00
Nuno Campos 76229ade66 Update psycopg 2024-10-10 16:17:19 -07:00
Nuno Campos 4aad36947e Upgrade pydantic 2024-10-10 16:13:05 -07:00
Nuno Campos cb7b667e6f Update psycopg 2024-10-10 16:09:24 -07:00
Nuno Campos de355ee2d2 Update rpds-py 2024-10-10 16:05:43 -07:00
Tat Dat Duong be47752f0e Initialise to None 2024-10-10 11:15:54 +02:00
Tat Dat Duong 4d69331a52 Add async tests 2024-10-10 02:29:28 +02:00
Tat Dat Duong fb8c386958 fix(debug): address self-referencing 2024-10-10 02:21:32 +02:00
Tat Dat Duong ac8b51f1f2 fix(debug): add failing test for self-referencing 2024-10-10 02:21:17 +02:00
Tat Dat Duong 9360545659 Remove deprecated message 2024-10-09 20:41:18 +02:00
Tat Dat Duong 26e30ad6af Remove error warning 2024-10-09 20:40:24 +02:00
Tat Dat Duong 8df533b489 fix(sdk-js): allow passing checkpoint when creating a run 2024-10-09 20:34:19 +02:00
Tat Dat Duong a53a566730 Bump to 0.2.35 2024-10-09 14:33:14 +02:00
Andrew NguonlyandTat Dat Duong c4d251b05c sdk-py: Add Sequence[dict] type to values param type for update_state() (#2054)
### Summary
The LangGraph API supports a list of `dict` for the `values` field for
the `POST /threads/<thread_id>/state` endpoint.

Reference:
https://github.com/langchain-ai/langgraph-api/blob/main/api/openapi.json#L3005-L3021
2024-10-09 14:33:14 +02:00
Andrew NguonlyandTat Dat Duong 9a752e1563 sdk-py: Add "*" literal to interrupt_before and interrupt_after types (#2053)
### Summary
The LangGraph API supports the literal string `"*"` for
`interrupt_before` and `interrupt_after`.

Reference:
https://github.com/langchain-ai/langgraph-api/blob/main/api/openapi.json#L2425
2024-10-09 14:33:14 +02:00
Andrew NguonlyandTat Dat Duong 6d4a426059 sdk-py: Add custom stream mode to StreamMode type (#2051)
### Summary
The LangGraph API supports `custom` stream mode type.

Reference:
https://github.com/langchain-ai/langgraph/blob/main/docs/docs/cloud/reference/api/openapi.json#L2403
2024-10-09 14:33:14 +02:00
Andrew NguonlyandTat Dat Duong 598bb5a641 sdk-py: Update return type annotation for Thread.update_state() methods. (#2050)
### Summary
The response body of the endpoint `POST /threads/{thread_id}/state`
looks like this:
```
{
    "checkpoint": {
        "thread_id": "e2496803-ecd5-4e0c-a779-3226296181c2",
        "checkpoint_ns": "",
        "checkpoint_id": "1ef4a9b8-e6fb-67b1-8001-abd5184439d1",
        "checkpoint_map": {}
    }
}
```
2024-10-09 14:33:14 +02:00
Tat Dat Duong 0628c6402f Fix typo 2024-10-09 01:00:36 +02:00
Tat Dat Duong db61d294a6 Code review 2024-10-09 01:00:06 +02:00
Tat Dat Duong 7a282f82dc Tests? 2024-10-08 20:55:49 +02:00
Tat Dat Duong 45a12c938b Add more nested tests for nested subgraphs 2024-10-08 20:49:16 +02:00
Tat Dat Duong b51f5d6345 Fix optional types 2024-10-08 20:09:51 +02:00
Tat Dat Duong f9e900f39a Fix 3.9 2024-10-08 19:58:42 +02:00
Tat Dat Duong e564902753 Add async tests 2024-10-08 19:57:39 +02:00
Tat Dat Duong e3bee7d843 Add tests 2024-10-08 19:52:05 +02:00
Tat Dat Duong 4f61dd1aa6 Fix tests 2024-10-08 19:18:52 +02:00
Tat Dat Duong 7e9cf02922 Use casting instead 2024-10-08 17:08:08 +02:00
Tat Dat Duong 50b1a1e230 Cleanup, move instanceof checks to an util 2024-10-08 17:01:40 +02:00
Tat Dat Duong c1081af6bc Fix lint 2024-10-08 16:41:48 +02:00
Tat Dat Duong dfb265f296 feat(debug): send tasks info 2024-10-08 16:21:38 +02:00
William FHandGitHub 254b12a62d Use AsyncBatch for postgres store (#2020) 2024-10-08 06:58:26 +00:00
Riya SinhaandGitHub 61798d09d2 checkpoint: set CheckpointNS ConfigurableFieldSpec model default to empty string (#2019) 2024-10-07 18:38:18 +00:00
Nuno Campos e5b4cd2701 scheduler-kafka: Pass loop arg to default async consumer and producer
- Some forks of aiokafka make this a required arg
2024-10-07 10:16:36 -07:00
Tat Dat Duong 24f21a0ad8 feat(sdk-js): bump to 0.0.16 2024-10-07 18:10:32 +02:00
Tat Dat Duong 05f645b87c Make types more explicit 2024-10-07 17:47:36 +02:00