Commit Graph
721 Commits
Author SHA1 Message Date
isaac hershenson 75ef1e790e fmt 2024-09-20 17:02:15 -07:00
isaac hershenson 4eaa1bb8ca set_latest -> latest 2024-09-20 16:57:43 -07:00
Nuno Campos e3d2f233a7 sdk: Update thread state methods for subgraphs 2024-09-20 16:52:41 -07:00
Isaac FranciscoandGitHub 8b95adb1bd sdk-py: add versioning for assistants (#1665)
* add get_versions to python sdk

* fml

* add change_version to sdk

* add assistant name to create

* document assistant name

* change method

* version in payload

* fml

* add js methods and types

* name -> assistant_name

* export onconflictbehavior

* add assistant name to create

* add metadata/limit/offset to sdk

* add assistant_name to update

* assistantversion schema

* export assistnatversion

* add metadata/limit/offset to sdk

* assistantversion schema

* fmt

* fmt

* change version -> set version

* fmt

* assistant_name -> name

* naming
2024-09-20 16:48:19 -07:00
Nuno Campos 41cb54722d Add stream_subgraphs param 2024-09-20 16:13:44 -07:00
Nuno Campos 265003dda0 langgraph 0.2.23 2024-09-20 14:40:46 -07:00
Nuno Campos 9121a1e14f sdk: Add support for scheduled runs
- after_seconds param to Runs.wait/stream/create
2024-09-20 12:45:13 -07:00
William FHandGitHub 10a66acc44 Add return_direct support (#1780) 2024-09-20 18:59:37 +00:00
Nuno CamposandGitHub 7b94f1e326 Update __init__.py 2024-09-20 10:50:40 -07:00
Nuno CamposandGitHub bf289dbee4 Merge pull request #1772 from langchain-ai/jacob/nit
fix: Use imported constant for namespace end
2024-09-20 09:21:18 -07:00
Nuno CamposandGitHub 531890e35a Update types.py 2024-09-20 08:49:00 -07:00
Nuno Campos 1cf117ed9d Lint 2024-09-19 17:09:04 -07:00
Nuno Campos 3b0f27c777 Add stream_mode=custom
- adds the ability for nodes (including in subgraphs) to emit chunks directly to the output stream, emitted chunks can have any type
- when stream_mode=custom isnt requested by the caller emitted chunks are ignored
2024-09-19 17:03:30 -07:00
Nuno Campos 94e64f87b1 Allow chaning add_node/add_edge/etc calls 2024-09-19 16:54:00 -07:00
Nuno CamposandGitHub 0bbe461785 Merge pull request #1771 from langchain-ai/nc/19sep/mypy-langgraph-partial
Enable mypy for langgraph lib
2024-09-19 16:53:42 -07:00
Nuno Campos 7643c1171f Lint 2024-09-19 16:49:05 -07:00
Nuno CamposandGitHub ed27e54761 Update graph.py 2024-09-19 16:41:46 -07:00
Jacob LeeandGitHub ec1f425632 Update algo.py 2024-09-19 15:53:50 -07:00
jacoblee93 093af1a893 Use imported constant for namespace end 2024-09-19 15:07:30 -07:00
Nuno CamposandGitHub e96934533e Update graph.py 2024-09-19 15:06:39 -07:00
a47dc2b634 Apply suggestions from code review
Co-authored-by: William FH <13333726+hinthornw@users.noreply.github.com>
2024-09-19 14:37:32 -07:00
Nuno Campos 95c1ca3adc Fix 2024-09-19 13:20:45 -07:00
Nuno Campos 5de9b35416 Finish 2024-09-19 13:01:54 -07:00
Nuno Campos 4f767cd2ca Fix 2024-09-19 11:46:21 -07:00
Nuno Campos cc318b1156 Fix 2024-09-19 11:43:30 -07:00
Nuno Campos 9a8cc75ea2 Fix some typing issues in langgraph lib 2024-09-19 11:38:41 -07:00
Nuno CamposandGitHub 4065ac33d3 Merge pull request #1768 from langchain-ai/nc/19sep/mypy-sqlite
ci: Enable mypy checks for checkpoint-sqlite lib
2024-09-19 10:38:34 -07:00
Nuno Campos b529365f5b Remove ignore for 3.9 2024-09-19 09:19:26 -07:00
Nuno Campos fdf7bad988 Remove ignore for 3.9 2024-09-19 09:19:00 -07:00
Nuno Campos 95304d658a Fix 3.9 2024-09-19 08:51:15 -07:00
Nuno Campos 495d258322 Fix 3.9 2024-09-19 08:50:17 -07:00
Nuno Campos 6c0339ca4b ci: Enable mypy checks for checkpoint-sqlite lib 2024-09-19 08:46:44 -07:00
Nuno Campos b8a8651c23 ci: Enable mypy checks for checkpoint-postgres lib 2024-09-19 08:40:31 -07:00
Nuno Campos c793a9e36d Use type var default 2024-09-19 08:28:59 -07:00
Nuno Campos 333c5f5501 Fix type issues in tests 2024-09-18 18:16:51 -07:00
Nuno Campos 4d26c3599f ci: Enable mypy checks for checkpoint lib 2024-09-18 18:12:11 -07:00
Nuno CamposandGitHub 4ba803b415 Merge pull request #1751 from langchain-ai/nc/17sep/stream-messages
Add stream_mode=messages
2024-09-18 14:01:12 -07:00
Nuno Campos 9235178c88 Finish 2024-09-18 13:56:04 -07:00
William Fu-HinthornandNuno Campos 2d98024487 Assert invariants 2024-09-18 13:37:38 -07:00
William Fu-HinthornandNuno Campos f7d440ec5f Add tracing propagation test 2024-09-18 13:37:33 -07:00
Nuno Campos efb572f15b Add missing branch 2024-09-18 13:18:37 -07:00
Nuno CamposandGitHub d46fd258bf Merge pull request #1753 from Etelis/bugfix-retry-nodes-exception-handling
[Bug Fix] retry_on handling and add support for lists in RetryPolicy
2024-09-18 13:01:38 -07:00
Nuno CamposandGitHub e40aabb1c1 Update retry.py 2024-09-18 10:36:40 -07:00
Nuno CamposandGitHub 0bfeb7f4e1 Update types.py 2024-09-18 10:24:28 -07:00
Nuno CamposandGitHub fd0b52f4ff Update retry.py 2024-09-18 10:23:52 -07:00
Nuno CamposandGitHub f4962479d8 Merge pull request #1757 from langchain-ai/nc/18sep/unit-test-cancelled
Add one more unit test for exception propagation
2024-09-18 09:01:31 -07:00
Nuno CamposandGitHub 94fa06e5f7 Merge pull request #1749 from langchain-ai/nc/17sep/stream-subgraph-sync
Stream output from subgraphs while in-progress for sync stream
2024-09-18 09:01:15 -07:00
Nuno Campos 680fa3c226 Add one more unit test for exception propagation
- we already have plenty of tests for this, but adding one more with a slight variation
2024-09-18 08:53:47 -07:00
Itay Etelis adf5cb0ff1 Fix retry_on handling in run_with_retry
- Correctly distinguish between exception classes, lists/tuples of exception classes, and callables.
- Add support for lists in `retry_on`, alongside tuples.
- Prevent exception classes from being incorrectly treated as callables.
- Raise a `TypeError` if `retry_on` is of an unsupported type.
2024-09-18 13:41:22 +03:00
Itay Etelis 6873229bbf Support lists in retry_on for RetryPolicy
Previously, `retry_on` in `RetryPolicy` accepted only exception classes, tuples of exception classes, or callables.
Update the `retry_on` type annotation to include `List[Type[Exception]]`

Changes:
- Updated `retry_on` in `RetryPolicy` to accept `List[Type[Exception]]`.
2024-09-18 13:39:04 +03:00