Commit Graph
669 Commits
Author SHA1 Message Date
Nuno Campos 2f8ae4fdb4 Simplify tool executor 2024-04-02 14:46:14 -07:00
Nuno Campos e3a9760bb2 Improve tracing output of state graph 2024-04-02 12:14:08 -07:00
Nuno Campos 2a299d070e Optimize tracing output of Graph/StateGraph/MessageGraph
- control selection of relevant runs (needs langsmith release)
- see output of conditional edge function
- fix issue with conditional entry point not getting full state values as input
2024-04-02 10:32:47 -07:00
Nuno CamposandGitHub 041ca2f784 Merge pull request #263 from langchain-ai/nc/1apr/rename-channel-invoke
Rename ChannelInvoke to PregelNode
2024-04-01 19:37:12 -07:00
Nuno Campos 8b8171724c Rename ChannelInvoke to PregelNode
- ChannelInvoke is a legacy name from when we had ChannelBatch
2024-04-01 19:34:13 -07:00
Nuno CamposandGitHub 8bdc66a867 Merge pull request #262 from langchain-ai/nc/1apr/message-graph-coerce
MessageGraph now accepts same shorthand message formats as langchain-core
2024-04-01 18:47:10 -07:00
Nuno Campos a184600915 MessageGraph now accepts same shorthand message formats as langchain-core 2024-04-01 18:44:06 -07:00
Nuno CamposandGitHub b1584a3980 Merge pull request #261 from langchain-ai/nc/1apr/test-state-custom-class
Add test and notebook for using pydantic base model as state object
2024-04-01 18:20:05 -07:00
Nuno Campos 694343c5b5 Update test 2024-04-01 18:03:52 -07:00
Nuno Campos cbd2024dec Add async test, add test for validation error 2024-04-01 17:56:18 -07:00
Nuno CamposandGitHub 2d042ed385 Merge pull request #260 from langchain-ai/nc/1apr/test-both-checkpoint-at
Add tests for both values of CheckpointAt
2024-04-01 17:51:38 -07:00
Nuno Campos 961ddd49ed Add test and notebook for using pydantic base model as state object 2024-04-01 17:40:55 -07:00
Nuno Campos f88ef74002 Add tests for both values of CheckpointAt
- fix bug when using at=END_OF_RUN together with interrupt_before
- fix bug when calling update_state after only node has run
- update some notebooks to new streaming format (ie. no __end__ node)
2024-04-01 17:17:39 -07:00
Nuno CamposandGitHub 1276547233 Merge pull request #258 from langchain-ai/nc/1apr/optimize-tracing-tree
Optimize tracing run tree
2024-04-01 16:16:54 -07:00
Nuno CamposandGitHub dec8a53070 Merge pull request #257 from langchain-ai/nc/1apr/add-test-waiting-edge-via-branch
Add test for waiting edge triggered via conditional edge
2024-04-01 16:16:25 -07:00
Nuno CamposandGitHub 1632c045b1 Merge pull request #256 from langchain-ai/nc/1apr/docstrings-multi-edges
Add some more docstrings around multi edges
2024-04-01 16:16:17 -07:00
Nuno CamposandGitHub a95d50c057 Merge pull request #254 from langchain-ai/nc/31mar/shorten-stack-traces
Remove some noisy frames from stack traces
2024-04-01 16:16:07 -07:00
Nuno CamposandGitHub 83b77824f0 Merge pull request #253 from langchain-ai/nc/31mar/rewrite-graph-compile
Rewrite Graph/StateGraph.compile()
2024-04-01 16:15:56 -07:00
Nuno CamposandGitHub 18112b4df8 Merge pull request #252 from langchain-ai/nc/31mar/channel-from-checkpoint-copy
Rename BaseChannel.empty() to BaseChannel.from_checkpoint()
2024-04-01 16:15:41 -07:00
Nuno Campos 008301cf02 Lint 2024-04-01 16:15:30 -07:00
Nuno CamposandGitHub 2d351e8752 Merge pull request #247 from langchain-ai/nc/30mar/state-graph-elim-end-node
Remove __end__ node from state graph
2024-04-01 16:14:49 -07:00
Nuno CamposandGitHub e15ba64e1b Merge pull request #245 from langchain-ai/nc/30mar/stream-mode
Add stream_mode=updates or values
2024-04-01 16:14:20 -07:00
Nuno CamposandGitHub 6de5a6de28 Merge pull request #244 from langchain-ai/nc/30mar/pending-writes-by-channel
Collect pending writes for each node separately
2024-04-01 16:13:32 -07:00
Nuno CamposandGitHub 90e39a6cc8 Merge pull request #243 from langchain-ai/nc/30mar/rm-mutate-in-stream
Remove private api to mutate values during call to stream()
2024-04-01 16:13:11 -07:00
Nuno Campos 2736d72989 Remove __start__ node from stream output 2024-04-01 16:05:12 -07:00
Nuno Campos 3e4c94289a Manage run_manager directly
- allows us to set run output different from streamed values: here the run output should always be final value of all channels
- removes 1-2 more frames from stack traces
2024-04-01 15:08:35 -07:00
Lance MartinandGitHub 379345a39c Merge pull request #259 from langchain-ai/rlm/clean-rag-ntbks
Clean and normalize all langgraph RAG ntbks
2024-04-01 14:59:37 -07:00
Lance Martin 736b307647 Clean, update all ntbks 2024-04-01 14:48:42 -07:00
Nuno Campos b6848c5fdf Optimize tracing run tree
- Do not run node if it's a passthrough
- Do not run writers that wouldn't affect any channels
- Combine consecutive writers when it doesn't change semantics
2024-04-01 13:43:23 -07:00
Lance Martin 3a9387e53f Update, clean, normalize langgraph RAG ntbks 2024-04-01 13:12:21 -07:00
Nuno Campos 3451e04b7d Add test for waiting edge triggered via conditional edge 2024-04-01 12:36:55 -07:00
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 03bef445c6 Lint 2024-03-31 20:16:50 -07:00
Nuno Campos a20bf12da9 Lint 2024-03-31 19:18:47 -07:00
Nuno Campos 02a25d890f Lint 2024-03-31 19:16:20 -07:00
Nuno Campos 7bc95d311c Lint 2024-03-31 19:15:18 -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 885e5884c5 Collect pending writes for each node separately
- ensures that order of updates sent to channels is independent of timing differences when parallel executing multiple nodes
- enables future features
2024-03-30 20:02:17 -07:00
Nuno Campos 0baaf5cd96 Remove private api to mutate values during call to stream() 2024-03-30 19:41:50 -07:00
Mohamed A. FouadandGitHub 4182538b0a Update lats.ipynb (#227)
Fixes a typo.
2024-03-29 16:42:24 -07:00
Nuno CamposandGitHub 15908adcd0 Merge pull request #236 from langchain-ai/jacob/async_edges
Adds async conditional edge support
2024-03-28 15:42:34 -07:00
Lance MartinandGitHub 8f2356b590 Merge pull request #237 from langchain-ai/rlm/adaptive-rag
Add adaptive RAG
2024-03-28 12:07:56 -07:00
Lance Martin cb66b31286 Finalize ntbk 2024-03-28 12:03:52 -07:00
Lance Martin cf7f6243d7 Add set_conditional_entry_point 2024-03-26 16:59:24 -07:00
Lance Martin aefea04d31 Add adaptive RAG 2024-03-26 16:33:31 -07:00