Nuno Campos
d713f849f4
Lint
2024-05-30 08:42:07 -07:00
Nuno Campos
e4c32248aa
Support returning non-dict objects as state updates from nodes
2024-05-30 08:38:40 -07:00
Nuno Campos
e47a7adb3c
Fix
2024-05-29 16:53:58 -07:00
Nuno Campos
c3f68a6d7e
Use the last annotation as the reducer
2024-05-29 16:47:39 -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
Nuno Campos
d4b3364bba
Raise error if cond edge returns None
2024-05-20 12:00:17 -07:00
William Fu-Hinthorn
70c5a22e4b
Warn invalid state
2024-05-20 09:33:19 -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
3cd20efcbc
Export START ( #467 )
2024-05-15 18:08:06 -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 and GitHub
6b5b653c2f
Merge pull request #442 from langchain-ai/nc/13may/small-fixes
...
Small fixes while migrating JS
2024-05-14 10:13:28 -07:00
William FH and GitHub
f335105853
Update Refs to clean up syntax highlighting ( #443 )
2024-05-13 18:32:42 -07:00
Nuno Campos
a885b1ca53
Small fixes while migrating JS
2024-05-13 17:28:06 -07:00
Harrison Chase
c48d5a6160
add messages state
2024-05-10 16:53:22 -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
William FH and GitHub
3e5ea31cdc
Add Spellcheck and import hogwarts ( #419 )
2024-05-08 10:25:11 -07:00
Nuno Campos
e892c95194
Export all exceptions from langgraph.errors
2024-05-07 08:07:26 -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
William FH and GitHub
21b8cbfd33
Deprecate Chat agent executor & Function Calling Executor in Docs ( #392 )
2024-05-04 00:17:54 -07:00
Nuno Campos
0e30723684
Lint
2024-05-03 11:01:34 -07:00
Nuno Campos
2ab84d1562
StateGraph: use state schema as input/output schema if already a pydantic model
2024-05-03 10:59:00 -07:00
Nuno Campos
467f42d799
Optional 2nd arg to StateGraph with config schema
2024-05-03 10:05:14 -07:00
Nuno Campos
afa6a91934
Implement interrupt_before=* and interrupt_after=*
...
- This interrupts execution before/after all nodes
2024-04-30 10:05:53 -07:00
Nuno Campos
ca2c93e0a1
Lint
2024-04-29 17:41:36 -07:00
Nuno Campos
a3c867d688
Remove add_condition_nodes
2024-04-29 11:13:16 -07:00
Nuno Campos
3a59fb2247
Pass add_condition_node
2024-04-29 11:04:15 -07:00
Nuno Campos
4a28f19922
Remove labels if redundant
2024-04-29 10:44:45 -07:00
Nuno Campos
a83fd19b29
For cond edges support specifying list of possible destinations as a list or typing annotation
2024-04-29 10:38:06 -07:00
Nuno Campos
fd9d30f144
Improve tracing output for function nodes
...
- remove double entry in tracing tree when using functions as nodes
2024-04-29 08:59:56 -07:00
Nuno Campos
42b13ef576
Improvements to get_graph(xray=)
...
- Support xray: int, to control depth, eg xray=1 only exposes one level deep
- In mermaid draw a containing box around subgraphs created from xray
2024-04-25 11:27:13 -07:00
Nuno Campos
3571a893f2
Fix bug where saving a runnable or function in state object would misbehave
...
- the function/runnable would be called when processing the state update
2024-04-24 15:35:02 -07:00
Nuno Campos
79bff13a47
Add then= arg for add_conditional_edge and set_conditional_entry_point
...
- This makes it easy to implement graphs where you want to decide among N possible nodes, and then visit another node after whichever one you chose
2024-04-24 14:06:07 -07:00
Nuno Campos
9ee5699f9a
Fix
2024-04-24 11:22:53 -07:00
Nuno Campos
9f9c08bab9
Lint
2024-04-24 11:22:36 -07:00
Nuno Campos
f2803372ec
Improve graph validation
...
- Move all validation to compile() This allows adding edges before nodes
- Detect more cases of missing edges with shorthand branches
2024-04-24 11:19:40 -07:00
Nuno Campos
85bdc8bdfa
Fix issue when drawing graphs w repeat conditions
2024-04-22 09:53:14 -07:00
Angel Igareta
7f826abaa2
Fix linting
2024-04-18 12:20:31 +02:00
Angel Igareta
6570fd0ccb
Fix get_graph method to define conditional edges
2024-04-18 12:19:07 +02:00
Angel Igareta
4e8e51126d
Fix formatting in graph
2024-04-17 18:03:22 +02:00
Ángel Igareta and GitHub
35fe16b615
Merge branch 'main' into add_condition_nodes_as_optional
2024-04-17 17:53:51 +02:00
Nuno Campos
012bbb961f
Lint
2024-04-16 15:07:51 -07:00
Nuno Campos
bdf0def798
Resolve type annotation forward refs when parsing StateGraph schema type
2024-04-16 15:05:04 -07:00
William FH and GitHub
85f48da84e
Docs Draft ( #286 )
2024-04-15 22:44:12 -07:00
Angel Igareta
0f667cd9eb
Add add_condition_nodes parameter to offer possibility of not including conditional nodes
2024-04-15 10:56:19 +02:00
Nuno Campos
f3ae555b91
Shorten conditional edge names
2024-04-12 09:29:27 -07:00
Nuno Campos
0015cb5f3a
Fix non str values in cond edges
2024-04-11 11:52:20 -07:00
Nuno Campos
641def6fdb
Fix null output for node with conditional edge returning END
2024-04-10 16:10:08 -07:00
Nuno Campos
fd6f44a7e4
feat: Return multiple destinations from conditional edge
2024-04-08 17:05:16 -07:00
Nuno Campos
db3219f77c
Ensure node tracing output is exactly what was returned from node
2024-04-03 13:13:04 -07:00
Nuno Campos
e3a9760bb2
Improve tracing output of state graph
2024-04-02 12:14:08 -07:00