Nuno Campos
2bf66b8834
Add some more docstrings around multi edges
...
- prompted by some github issues
2024-04-01 12:29:00 -07:00
Nuno Campos
4e373b8af2
Remove noisy frames from stack traces
...
- The less frames in library code the less confused the user is
- This doesn't remove all library frames (not possible), but it's a start
2024-03-31 20:19:10 -07:00
Nuno Campos
a20bf12da9
Lint
2024-03-31 19:18:47 -07:00
Nuno Campos
0d2bbe85c6
Fix default condition name
2024-03-31 18:56:38 -07:00
Nuno Campos
b668bf8eab
Rewrite Graph/StateGraph.compile()
...
- Each iteration of the graph is one single iteration in Pregel (ie. no more "{node}:edges" nodes)
- .update_state() now acts exactly as one of the nodes in the graph (which can be chosen), which makes human-in-the-loop scenarios where you want to override the actions of a specific node a lot easier to build
- Graph/StateGraph.compile() now delegate adding nodes/edges/etc to dedicated methods that operate on the Pregel object, which is 90% of the way towards dynamic graphs where nodes and edges can be added during execution
2024-03-31 17:17:18 -07:00
Nuno Campos
4fd90f8ad6
Rename BaseChannel.empty() to BaseChannel.from_checkpoint()
...
- clearer name
- channels with complex data structures in checkpoint (eg a set or list) now copy the checkpointed data structures before creating the new channel
2024-03-31 09:25:08 -07:00
Nuno Campos
03b7d6fe0d
Remove __end__ node from state graph
...
No longer necessary with stream output modes
2024-03-30 22:04:27 -07:00
Nuno Campos
1ad017781d
Add stream_mode=updates or values
...
- stream(stream_mode="values") yields thre current channel values whenever a channel is updated
- stream(stream_mode="updates") yields the update sent to each channel by each node
- this removes the __end__ value present at the end of each call to Graph/StateGraph/MessageGraph.stream(). To access the __end__ value either call .invoke() or stream(stream_mode="values")
2024-03-30 21:24:39 -07:00
Nuno Campos
0baaf5cd96
Remove private api to mutate values during call to stream()
2024-03-30 19:41:50 -07:00
Nuno Campos
5aa036639b
Update
2024-03-26 15:42:16 -07:00
jacoblee93
a6a9def91a
Adds async conditional edge support
2024-03-26 12:46:15 -07:00
Nuno Campos and GitHub
458d71e694
Merge pull request #226 from langchain-ai/nc/21mar/add-message-graph-test
...
Add one more test for message graph
2024-03-21 18:00:00 -07:00
Nuno Campos
db2ec5b2de
Rename to add_edge(string[], string)
2024-03-21 17:56:35 -07:00
Nuno Campos
e11153cf09
Fix graph repr
2024-03-21 16:53:59 -07:00
Nuno Campos
319d72952c
Add one more test for message graph
2024-03-21 16:35:26 -07:00
Nuno Campos
ccea395002
Fox
2024-03-21 16:06:23 -07:00
Nuno Campos
01c32c2464
Finish
2024-03-21 15:54:03 -07:00
Nuno Campos
6cb5062c1a
Lol
2024-03-21 14:30:51 -07:00
Nuno Campos
158f84c826
WIP Waiting edge
2024-03-21 14:29:40 -07:00
Nuno Campos
3bfac1f490
Track parent relationships for checkpoints
...
- This enables building "branching" views of checkpoint history
2024-03-20 12:08:22 -07:00
Nuno Campos
7548f412fb
Support updating existing messages in messagegraph
2024-03-15 12:13:58 -07:00
Nuno Campos
0d13c6b159
Add history tracking to in-memory, sqlite and aiosqlite checkpointers
...
- Add Pregel.get_state_history and .aget_state_history methods to get history iterator
- Update checkpointer base class with new list and get_tuple methods
- Rewrite in-memory checkpointer class to track history
- Rewrite sqlite and aiosqlite checkpointers to track history
- Add new tests for history tracking
2024-03-13 17:22:39 -07:00
Nuno Campos
f5c3c7ac7d
Remove subscribe_to_each() method in pregel api
...
- can be replaced by piping to batch method instead
2024-03-13 11:17:49 -07:00
Nuno Campos
c90a6b14b9
Fix human in the loop notebook
2024-03-12 10:40:47 -07:00
Nuno Campos
a33acb6d8a
Implement xray mode for graph draw
2024-02-29 19:07:58 -08:00
Nuno Campos
359340dbc8
One more
2024-02-29 19:03:42 -08:00
Nuno Campos
971e15873e
Fix core version mismatch in snapshot tests
2024-02-29 19:01:44 -08:00
Nuno Campos
d75792f6e8
Fix
2024-02-29 18:48:21 -08:00
Nuno Campos
5c2afc9418
Fix behaviour of interrupt_before
...
- checkpoints are now copied before being mutated
- compiled graph and compiled state graph no longer need to override get_state/update_state
- pregel class now natively supports interrupt before/after
2024-02-24 19:43:30 -08:00
Nuno Campos and Nuno Campos
fdb273b0f4
Add get_state() and update_state() methods to get and update checkpoint in between runs
2024-02-24 16:58:18 -08:00
Nuno Campos
debd9a8d9c
Add support for conditional entry points in Graph, StateGraph, MessageGraph
2024-02-22 15:19:03 -08:00
Nuno Campos
c3cbececcf
Update snapshots
2024-02-20 09:51:33 -08:00
Nuno Campos
4f1980df7c
Add missing input and output types for state graph
2024-02-19 13:14:24 -08:00
Nuno Campos
27464c0f46
Implement input_schema, output_schema, get_graph for Graph, StateGraph, MessageGraph
2024-02-19 13:07:34 -08:00
Nuno Campos and GitHub
50b1a455bd
Merge pull request #41 from langchain-ai/nc/fan-out
...
StateGraph/MessageGraph: Add support for multiple incoming edges
2024-02-19 13:06:14 -08:00
Nuno Campos
e4bfa8603d
Support multiple tool calls, Lint
2024-02-19 09:12:08 -08:00
midas8181919
794cc71254
fixed
2024-02-13 22:42:37 +00:00
midas8181919
41ff4c8c43
fix some errors
2024-02-13 15:41:27 +00:00
midas8181919
b4269f6453
finish test
2024-02-11 02:04:09 +00:00
midas8181919
acaa4567e1
fix test
2024-02-10 23:25:17 +00:00
midas8181919
38ef3d5218
replace function_call with tool_call
2024-02-10 23:10:32 +00:00
Nuno Campos
979b735256
Allow fan-in in stategraph
2024-02-10 12:01:52 -08:00
Nuno Campos
c4f87cdccd
Close the connection
2024-02-07 20:02:36 -08:00
Nuno Campos
f2ad930cd4
Add AsyncSqliteSaver
2024-02-07 19:31:24 -08:00
Nuno Campos
afa9592f6a
Only execute tasks leftover from previous checkpoint when resuming with no new input
2024-02-04 14:12:10 -08:00
Nuno Campos
083178d2a6
Add SqliteSaver
2024-02-01 18:12:52 -08:00
Nuno Campos
150583bd40
py3.9 compat
2024-01-21 09:12:18 -08:00
Nuno Campos
07f0eca65f
Add MessageGraph
2024-01-20 17:17:01 -08:00
Nuno Campos
b328a46f73
Change chat executor back
2024-01-20 17:05:47 -08:00
Nuno Campos
ee66e11eae
Add support for single key state, eg just list of messages
2024-01-20 15:04:35 -08:00