Nuno Campos
86bc774b3d
Lint
2024-05-30 08:08:21 -07:00
Nuno Campos
6e74415ec8
Add test for node decorated with traceable decorator
2024-05-30 08:04:48 -07:00
Nuno Campos
24d130d407
Add support for requesting multiple stream modes in same stream/astream call
2024-05-22 12:25:28 -07:00
Nuno Campos
8b946af20f
Add support and tests for using messagegraph checkpoints on a stategraph with 1 __root__ key other keys
2024-05-21 14:01:23 -07:00
Andrew Nguonly and GitHub
08b505e017
Merge configurable fields with previous checkpoint config before each run ( #510 )
...
* Merge configurable fields with previous checkpoint config.
* Update update_state() and aupdate_state() to merge configurable fields with previous checkpoint config.
* Update tests to verify that all checkpoint metadata contain the expected configurable field keys. This assertion is needed because a run can have an arbitrary number of steps based on the construction of the graph.
2024-05-21 11:03:25 -07:00
Nuno Campos
de71709fdc
Expose checkpoint timestamp in get/update/list state methods
2024-05-20 16:23:46 -07:00
Nuno Campos and GitHub
e33e4a64f9
Merge pull request #499 from langchain-ai/wfh/warn
2024-05-20 09:46:43 -07:00
William Fu-Hinthorn
70c5a22e4b
Warn invalid state
2024-05-20 09:33:19 -07:00
Andrew Nguonly
f5454715df
Merge main branch.
2024-05-17 19:32:14 -07:00
Andrew Nguonly
09bae3022d
Add checkpoint config to checkpoint metadata?
2024-05-17 19:25:02 -07:00
Andrew Nguonly
18addb52aa
Add support for passing Callable metadata filter to FewShotExamples managed value.
2024-05-17 18:41:57 -07:00
Nuno Campos
695503a4d3
Update to langchain-core 0.2.0
...
- Use stream_events(version=v2) in tests
2024-05-17 14:38:51 -07:00
Nuno Campos and GitHub
920978c4ab
Merge pull request #484 from langchain-ai/nc/16may/retry-policy
...
Add retry_policy for graphs
2024-05-16 18:10:32 -07:00
Nuno Campos
a4e88e930f
Disable retries by default
2024-05-16 15:59:45 -07:00
Nuno Campos
2414e0ab5e
Add retry_policy for graphs
...
- default is to retry, fully configurable
- configuration options follow temporal https://docs.temporal.io/retry-policies#properties
2024-05-16 15:44:30 -07:00
Nuno Campos and GitHub
f03930ad36
Merge pull request #454 from langchain-ai/nc/add-node-single-arg
...
Add single arg overload for add_node, which takes function/runnable's…
2024-05-16 10:59:23 -07:00
William FH and GitHub
4209508556
Tool Validator Node ( #468 )
2024-05-15 20:02:38 -07:00
William FH and GitHub
d8c3e70900
Accept raw functions ( #466 )
2024-05-15 17:03:51 -07:00
William FH and GitHub
4f8346df35
Handle Async Callable ( #457 )
2024-05-15 10:54:53 -07:00
Nuno Campos
6f888b6206
Add single arg overload for add_node, which takes function/runnable's name as the node name
2024-05-14 17:51:25 -07:00
Nuno Campos
52b2c755d7
Use uuid6 as the id for checkpoints
...
- this avoids conflicts if multiple processes creating checkpoints in same thread at same time
- uuid6 with a monotically increasing clock_seq is sortable by creation time at ms precision (plus clock_seq for ties, plus 48 bits of randomness for further ties)
2024-05-14 16:56:25 -07:00
Nuno Campos
a909d90b08
More small fixes following JS impl
2024-05-14 15:36:38 -07:00
Nuno Campos and GitHub
a694aaa2bb
Merge pull request #444 from langchain-ai/an/10may/few-shot-clone
...
Add `FewShotExamples` managed value (redo)
2024-05-14 15:35:48 -07:00
Andrew Nguonly
78e3a240f1
Update implementation for constructing WHERE clause for SqliteSaver so that parameter values are not hardcoded, but bound instead.
2024-05-14 14:44:59 -07:00
Nuno Campos
273a836fc4
debug: Include task index in task id
2024-05-14 13:35:56 -07:00
Andrew Nguonly
28e5d8f699
Update FewShotExamples class to support setting filter and limit params.
2024-05-14 12:41:55 -07:00
Nuno Campos and GitHub
d8af81312a
Merge pull request #447 from langchain-ai/nc/14may/small-fixes
...
Fix memory checkpointer list/alist
2024-05-14 11:24:04 -07:00
Andrew Nguonly
d6d33f9551
Fix bug with WHERE clause being incorrect when passing before param.
2024-05-14 10:38:26 -07:00
Nuno Campos
0c37a17172
Fix memory checkpointer list/alist
...
- add tests for memory checkpointer list and alist
- fix async step counting
2024-05-14 10:37:01 -07:00
William FH and GitHub
f146668735
Rename "action" to "tools" in tools_condition w/in docs ( #445 )
2024-05-13 23:41:33 -07:00
Andrew Nguonly
065e0ff360
Remove unused imports.
2024-05-13 18:34:54 -07:00
William FH and GitHub
f335105853
Update Refs to clean up syntax highlighting ( #443 )
2024-05-13 18:32:42 -07:00
Andrew Nguonly
aae05407f4
Lint code.
2024-05-13 18:22:07 -07:00
Andrew Nguonly
7a8cbe18f9
Implement asearch() in AsyncSqliteSaver.
2024-05-13 17:21:17 -07:00
Andrew Nguonly
9b1efe9698
Implement search() for SqliteSaver.
2024-05-13 16:59:59 -07:00
Andrew Nguonly
dcb7278c56
Add search and asearch APIs to BaseCheckpointerSaver class. Implement search and asearch in MemorySaver.
2024-05-13 15:55:38 -07:00
445a110917
Add managed values and IsLastStep ( #330 )
...
* Add managed values and IsLastStep
- managed values are read-only state keys whose values are managed by langgraph
- this PR implements one: IsLastValue, a boolean which is True in the last iteration, eg to allow you to return a nice "ran out of iterations" message to user
* Fix
* Fix some issues
* py39
* Break ref
* Fix types
* Fix
* Fix
* Update state.py
* Don't mutate dictionary while using it in for loop.
---------
Co-authored-by: Andrew Nguonly <andrewnguonly@gmail.com >
2024-05-10 13:44:20 -07:00
Nuno Campos
227f409611
Add writes property in checkpoint metadata
...
- This adds a historic view of the actions taken by nodes inside a thread, supporting rendering a richer history of a thread (eg in debug ui)
2024-05-09 14:30:29 -07:00
Nuno Campos
a6c6b8211f
Add tests for calling update on an empty thread
...
- this would eg be what you'd do in an api like openai assistants api
2024-05-08 10:43:31 -07:00
William FH and GitHub
3e5ea31cdc
Add Spellcheck and import hogwarts ( #419 )
2024-05-08 10:25:11 -07:00
William FH and GitHub
dbe10a8c99
Migrate Tool Executor to ReAct Agent ( #409 )
2024-05-07 12:23:04 -07:00
Nuno Campos
e892c95194
Export all exceptions from langgraph.errors
2024-05-07 08:07:26 -07:00
Nuno Campos and GitHub
5bee63c7d5
Merge pull request #387 from langchain-ai/nc/3may/checkpoint-metadata
...
Add metadata to checkpoints, checkpoint inputs before first step
2024-05-06 14:41:29 -07:00
Nuno Campos
52852cb226
Update langchain-core
2024-05-06 12:20:20 -07:00
Nuno Campos
48865daf02
Fix checkpoint lineage for updates/resumes
2024-05-06 11:53:20 -07:00
Nuno Campos
611ecdb1cd
Checkpoint inputs before starting the first step for easier error recovery
...
- this enables easier retrying, for any error just do .invoke(None, config) no matter which step the error happened on
2024-05-06 11:53:20 -07:00
Nuno Campos
f160f82912
Add checkpoint metadata fields
...
- source: input, update or loop
- step: int
- make step counter continue from previous last step
2024-05-06 11:52:49 -07:00
Nuno Campos
3ff3def62b
Remove option to only checkpoint at end of run
...
- Now that checkpoint at end of each step adds no latency there is not point to keep this
- This will make it easier to add future features
2024-05-06 11:52:49 -07:00
Nuno Campos
f304908102
Add metadata to checkpoints
...
- not yet used in this PR
2024-05-06 11:52:49 -07:00
Nuno Campos
04fe48f661
Add (failing) test for drawing cyclic edge
...
- fix waiting for new release of langchain-core
2024-05-03 15:17:20 -07:00