Commit Graph
3873 Commits
Author SHA1 Message Date
Chester CurmeandNuno Campos 31578cbe0e move code block 2025-01-17 16:07:16 -08:00
Chester CurmeandNuno Campos 44970640d5 cr 2025-01-17 16:07:16 -08:00
Chester CurmeandNuno Campos 0f4e42474f cr 2025-01-17 16:07:16 -08:00
Chester CurmeandNuno Campos 832f9ad64e copy changes to libs/langgraph/README.md 2025-01-17 16:07:16 -08:00
Chester CurmeandNuno Campos 318de5bb81 update readme 2025-01-17 16:07:16 -08:00
William FHandGitHub a11f9b3535 Fix docstring in pg store init (#3094) 2025-01-18 00:03:51 +00:00
Nuno CamposandGitHub 29db5a8672 Implement get_graph for imperative api (#3076) 2025-01-17 15:53:50 -08:00
Nuno CamposandGitHub 444faec6e6 Fix two issues with task/stream timing (#3095)
- both issues are related to the fact that waiters for futures are
notified of completion before "done" callbacks are called
- 1st issue manifested as interrupt stream event being emitted before
the result of a task that logically finished first (it's in the line
above in body of the entrypoint function) -> this is solved by always
returning to use code a fresh future chained on the original future,
because chaining is done via done callbacks (therefore the chained
future will only resolve after done callbacks of the original feature
are called)
- 2nd issue mainfested as sometimes (very rarely) the last stream event
not being printed before stream() finishes. this is solved by ensuring
we only return out of PregelRunner.tick() once all "done" callbacks are
called, previously we were approximating this through use of
asyncio.sleep(0) / time.sleep(0). The new solution instead waits on a
threading/asyncio.Event which will only be set by the last "done"
callback to fire
- this PR also disables incomplete support for calling sync tasks from
async entrypoints
2025-01-17 15:44:52 -08:00
Nuno Campos e4a5c8fd28 Fix two issues with task/stream timing
- both issues are related to the fact that waiters for futures are notified of completion before "done" callbacks are called
- 1st issue manifested as interrupt stream event being emitted before the result of a task that logically finished first (it's in the line above in body of the entrypoint function) -> this is solved by always returning to use code a fresh future chained on the original future, because chaining is done via done callbacks (therefore the chained future will only resolve after done callbacks of the original feature are called)
- 2nd issue mainfested as sometimes (very rarely) the last stream event not being printed before stream() finishes. this is solved by ensuring we only return out of PregelRunner.tick() once all "done" callbacks are called, previously we were approximating this through use of asyncio.sleep(0) / time.sleep(0). The new solution instead waits on a threading/asyncio.Event which will only be set by the last "done" callback to fire
2025-01-17 15:35:08 -08:00
Eugene YurtsevandGitHub 71e6002a3c docs: update broken api reference (#3093) 2025-01-17 17:04:54 -05:00
Andrew NguonlyandGitHub 26e3ded701 docs: Add note about cron jobs not available in LangGraph Platform Self-Hosted Lite (#3091) 2025-01-17 12:52:46 -08:00
Eugene YurtsevandGitHub 4fcd1690f9 docs: expose functional api reference (#3089)
The API reference is marked as experimental right now, so this is OK to expose to make it easier to share w/ beta users.
2025-01-17 15:18:43 -05:00
Vadym BardaandGitHub eb33a873c8 langgraph: release 0.2.64 (#3090) 0.2.64 2025-01-17 15:18:34 -05:00
91aa66f4cf tests: add tests for calling multiple subgraphs in a parent node (#3070)
Co-authored-by: Nuno Campos <nuno@langchain.dev>
2025-01-17 15:16:01 -05:00
Eugene Yurtsev 4476640702 x 2025-01-17 15:08:32 -05:00
Eugene YurtsevandGitHub 727e3f1730 functional api: first pass at api reference (#3083)
First pass at the API reference for the functional API
2025-01-17 14:46:22 -05:00
Vadym BardaandGitHub 943dd28863 docs: update state to include 'next' for supervisor notebooks (#3087) 2025-01-17 14:32:15 -05:00
ccurmeandGitHub aa9d253978 docs: highlight lines in troubleshooting doc (#3084)
![Screenshot 2025-01-17 at 1 44
07 PM](https://github.com/user-attachments/assets/b7009c77-cb2e-43e0-92a7-3978884b7f3e)
2025-01-17 18:53:21 +00:00
Eugene YurtsevandGitHub a11c6cfe6b Update docs/mkdocs.yml 2025-01-17 13:36:44 -05:00
Eugene Yurtsev 15c79dc3c3 x 2025-01-17 13:34:49 -05:00
Eugene Yurtsev a65c9f1e04 x 2025-01-17 13:11:23 -05:00
9912ae1053 docs: add high level example into the readme, make examples collapsible (#3052)
Co-authored-by: Chester Curme <chester.curme@gmail.com>
2025-01-17 17:10:22 +00:00
ccurmeandGitHub 7db29042b4 docs[patch]: update quickstart tutorial to use interrupt() (#3053)
Need to update cassettes
2025-01-17 11:24:40 -05:00
Chester Curme f8033a20c1 update cassettes 2025-01-17 11:15:33 -05:00
Chester Curme 5e3aa495d9 update 2025-01-17 11:05:55 -05:00
Chester Curme a54689affd ruff 2025-01-17 11:02:58 -05:00
Chester Curme 02ea523897 udpate 2025-01-17 11:02:25 -05:00
Chester Curme 18c6637e6c use message dicts instead of tuples 2025-01-17 10:34:21 -05:00
Chester Curme 4c02a4c501 Revert "disable parallel tool use"
This reverts commit 784b6afa11.
2025-01-17 10:19:17 -05:00
Chester Curme 784b6afa11 disable parallel tool use 2025-01-17 10:15:06 -05:00
Chester Curme b35b892d74 Merge branch 'main' into cc/update_quickstart 2025-01-17 10:02:29 -05:00
Chester Curme e7aaf21121 update 2025-01-17 10:02:18 -05:00
Eugene Yurtsev 54115ac796 x 2025-01-17 09:58:06 -05:00
ccurmeandGitHub 76be64adcb docs[patch]: fix builds (#3074) 2025-01-17 02:41:47 +00:00
Nuno Campos 2cf98725c4 Lint 2025-01-16 16:32:39 -08:00
Nuno Campos a33c59626a Lint 2025-01-16 16:01:57 -08:00
Nuno Campos 56d3b759c7 Add one more test 2025-01-16 15:46:25 -08:00
Nuno Campos 32bf81c559 Lint 2025-01-16 14:10:16 -08:00
Eugene Yurtsev de332ec31c x 2025-01-16 17:08:12 -05:00
Eugene YurtsevandGitHub ce30965df4 functional api: Add ability to request previous output (#3025)
1. The inputs into foo do not affect any state behavior
2. `previous` always reflects the previous return value from the
function
3. Anything can be returned and that will be the new state for the
function on the next iteration
4. This API is not meant to support reducers in the inputs/state

```python
  from langgraph.func import entrypoint

  states = []

  # In this version reducers do not work
  @entrypoint(checkpointer=MemorySaver())
  def foo(inputs, *, previous: Any) -> Any:
      states.append(previous)
      return {"previous": previous, "current": inputs}

  config = {"configurable": {"thread_id": "1"}}

  foo.invoke({"a": "1"}, config)
  foo.invoke({"a": "2"}, config)
  foo.invoke({"a": "3"}, config)
  assert states == [
      None,
      {"current": {"a": "1"}, "previous": None},
      {"current": {"a": "2"}, "previous": {"current": {"a": "1"}, "previous": None}},
  ]
```
2025-01-16 17:02:41 -05:00
Nuno Campos b98a7b09a3 Update 2025-01-16 13:44:19 -08:00
Nuno Campos 86b6afc982 Implement get_graph for imperative api 2025-01-16 13:44:18 -08:00
Nuno CamposandGitHub 47122ce88b docs: Add status field to Project object for Control Plane API (#3075) 2025-01-16 13:42:48 -08:00
Andrew Nguonly 002b048674 Add status field to Project object. 2025-01-16 13:27:23 -08:00
Eugene Yurtsev a58f5dacca x 2025-01-16 16:26:54 -05:00
Chester Curme cc397b1629 update cassettes 2025-01-16 16:24:05 -05:00
Eugene Yurtsev 3a48049194 x 2025-01-16 16:19:23 -05:00
Eugene Yurtsev e5f0db0af3 x 2025-01-16 16:09:11 -05:00
Chester Curme 93854ed721 fix link 2025-01-16 15:12:53 -05:00
Eugene Yurtsev 83a7acc57c Merge branch 'main' into eugene/expose_previous_state 2025-01-16 14:56:46 -05:00