docs (examples): replace SqliteSaver with MemorySaver (#1271)

This commit is contained in:
Vadym Barda
2024-08-08 10:30:43 -04:00
committed by GitHub
parent a2f4d57bf2
commit cd92f19858
15 changed files with 2717 additions and 126 deletions
+2 -2
View File
@@ -574,7 +574,7 @@
}
],
"source": [
"from langgraph.checkpoint.sqlite import SqliteSaver\n",
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.graph import START, END, StateGraph\n",
"from langgraph.prebuilt import tools_condition\n",
"from IPython.display import Image, display\n",
@@ -597,7 +597,7 @@
"builder.add_edge(\"tools\", \"assistant\")\n",
"\n",
"# The checkpointer lets the graph persist its state\n",
"memory = SqliteSaver.from_conn_string(\":memory:\")\n",
"memory = MemorySaver()\n",
"react_graph = builder.compile(checkpointer=memory)\n",
"\n",
"# Show\n",
@@ -253,7 +253,7 @@
"\n",
"\n",
"from IPython.display import Image, display\n",
"from langgraph.checkpoint.sqlite import SqliteSaver\n",
"from langgraph.checkpoint.memory import MemorySaver\n",
"from langgraph.graph import END, START, StateGraph\n",
"from langgraph.prebuilt import tools_condition\n",
"\n",
@@ -275,7 +275,7 @@
"builder.add_edge(\"tools\", \"assistant\")\n",
"\n",
"# The checkpointer lets the graph persist its state\n",
"memory = SqliteSaver.from_conn_string(\":memory:\")\n",
"memory = MemorySaver()\n",
"react_graph = builder.compile(checkpointer=memory)\n",
"\n",
"# Show\n",