mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-08 02:37:52 +02:00
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 <eugene@langchain.dev>
This commit is contained in:
co-authored by
Eugene Yurtsev
parent
3878addbe0
commit
33766eb2ff
@@ -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."""
|
||||
|
||||
Reference in New Issue
Block a user