From 33766eb2ffe4935f0c3c6f52a61bb3a6819ce22c Mon Sep 17 00:00:00 2001 From: Zapiron <125368863+DangerousPotential@users.noreply.github.com> Date: Wed, 2 Apr 2025 22:37:51 +0800 Subject: [PATCH] docs: add missing MemorySaver import for unexpanded example (#4133) Import `MemorySaver` for the code to run without expanding the example --------- Co-authored-by: Eugene Yurtsev --- docs/docs/concepts/functional_api.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/docs/concepts/functional_api.md b/docs/docs/concepts/functional_api.md index 1a44f249b..d6a3ebb1f 100644 --- a/docs/docs/concepts/functional_api.md +++ b/docs/docs/concepts/functional_api.md @@ -23,9 +23,11 @@ This provides a minimal abstraction for building workflows with state management Below we demonstrate a simple application that writes an essay and [interrupts](human_in_the_loop.md) to request human review. ```python +from langgraph.checkpoint.memory import MemorySaver from langgraph.func import entrypoint, task from langgraph.types import interrupt + @task def write_essay(topic: str) -> str: """Write an essay about the given topic."""