Commit Graph
688 Commits
Author SHA1 Message Date
Lance MartinandGitHub ca1c936d72 Merge pull request #284 from langchain-ai/rlm/adaptive_rag_local
Update local adaptive RAG ntbk
2024-04-06 17:30:06 -07:00
Lance Martin 5f8add89c3 Clean / test 2024-04-06 13:31:48 -07:00
MisraaksandGitHub 217321127f Issue #274: Fix LLMCompiler Bugs (#275)
* Update LLMCompiler.ipynb

The code didn't actually handle when there's more than one dependency listed in an argument. The example of multi-step math used in the code doesn't work because the third step has more than one dependency in its args and the code only handles one:
```
User query: "What's ((3*(4+5)/0.5)+3245) + 8? What's 32/4.23? What's the sum of those two values?"
1. math(problem="((3*(4+5)/0.5)+3245) + 8")
2. math(problem="32/4.23")
3. math(problem="${1}+${2}")
4. join()<END_OFPLAN>
```
Step 3 fails, and does so silently too. It correctly parses strings that are "${1}", but not multi-argument strings like "${1}+${2}"

This fixes it to handle any number of dependencies listed in one arg. It uses the regex pattern already defined in output_parser.py.

* Fix looping function calls because no arg context

Task Fetching Unit, when it inserts the tool_messages, the function args don't get logged with function calls, this causes the replanner to loop and use the same function parameters and never corrects itself.

* Fix tool index count and range

In the planner prompt formatting, the 'num_tools' variable needs to have a +1 added to it because we're appending the join() function, without +1 it says there's one less available tools than there actually is because it only counts the passed in functions and not the join() function. And add +1 for listing otherwise it starts at a 0 offset.

* Fix unhandled empty iterator exception

Task fetching unit: When it calls the tools it doesn't handle when there's no tasks. next() is called and fails. This fixes it by wrapping in a try/except. On exception we set tasks to an empty list since next() failed, there's no tasks.
2024-04-05 10:37:11 -07:00
Nuno CamposandGitHub 70c1c996a4 Merge pull request #279 from langchain-ai/eugene/document_using_nuno_bot
Document Checkpoint
2024-04-04 15:02:48 -07:00
Nuno Campos f21cc3f282 0.0.32 2024-04-04 13:22:08 -07:00
Eugene Yurtsev 21ce575739 x 2024-04-04 15:01:03 -04:00
Eugene Yurtsev 75ce4474e5 x 2024-04-04 14:57:52 -04:00
Lance MartinandGitHub 657bd7d8c3 Merge pull request #271 from langchain-ai/rlm/cohere
Cohere adaptive RAG
2024-04-03 21:44:06 -07:00
Lance Martin c43de8637c Finalize 2024-04-03 21:39:56 -07:00
Nuno CamposandGitHub 322763436b Merge pull request #276 from langchain-ai/nc/3apr/node-tracing-output
Ensure node tracing output is exactly what was returned from node
2024-04-03 17:39:04 -07:00
Nuno Campos db3219f77c Ensure node tracing output is exactly what was returned from node 2024-04-03 13:13:04 -07:00
Lance Martin 1257518789 Cohere adaptive RAG 2024-04-02 21:56:10 -07:00
Nuno CamposandGitHub e30d5f13bf Merge pull request #270 from langchain-ai/nc/2apr/update-rag-notebook
Update adaptive rag notebook to use invoke
2024-04-02 17:25:11 -07:00
Nuno Campos 05009d8068 Update adaptive rag notebook to use invoke 2024-04-02 16:53:56 -07:00
Nuno CamposandGitHub 1961482e2b Merge pull request #269 from langchain-ai/nc/2apr/add-langsmith-urls-time-travel
Add LangSmith run urls in time travel notebook
2024-04-02 16:14:17 -07:00
Nuno Campos f269db4d58 Add LangSmith run urls in time travel notebook 2024-04-02 16:11:48 -07:00
Nuno Campos d00d8913ca 0.0.31 2024-04-02 15:56:33 -07:00
Nuno CamposandGitHub 6fbb58c89f Merge pull request #267 from langchain-ai/nc/2apr/optimize-tracing-output
Optimize tracing output of Graph/StateGraph/MessageGraph
2024-04-02 15:32:24 -07:00
Nuno Campos 617591ad42 Update time travel notebook 2024-04-02 14:51:14 -07:00
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