docs: how-to guides batch 3 (#1979)

Updates the following how to guides:

docs/docs/how-tos/persistence.ipynb
docs/docs/how-tos/persistence_mongodb.ipynb
docs/docs/how-tos/persistence_postgres.ipynb
docs/docs/how-tos/persistence_redis.ipynb
docs/docs/how-tos/react-agent-from-scratch.ipynb
docs/docs/how-tos/react-agent-structured-output.ipynb
docs/docs/how-tos/recursion-limit.ipynb
docs/docs/how-tos/return-when-recursion-limit-hits.ipynb
docs/docs/how-tos/run-id-langsmith.ipynb
docs/docs/how-tos/state-model.ipynb
This commit is contained in:
Eugene Yurtsev
2024-10-02 17:29:01 -04:00
committed by GitHub
parent 6c0da426c6
commit 1a4f375226
10 changed files with 559 additions and 424 deletions
+33 -2
View File
@@ -7,6 +7,36 @@
"source": [
"# How to add persistence (\"memory\") to your graph\n",
"\n",
"<div class=\"admonition tip\">\n",
" <p class=\"admonition-title\">Prerequisites</p>\n",
" <p>\n",
" This guide assumes familiarity with the following:\n",
" <ul>\n",
" <li>\n",
" <a href=\"https://langchain-ai.github.io/langgraph/concepts/persistence/\">\n",
" Persistence\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://langchain-ai.github.io/langgraph/concepts/memory/\">\n",
" Memory\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://python.langchain.com/docs/concepts/#chat-models/\">\n",
" Chat Models\n",
" </a>\n",
" </li> \n",
" <li>\n",
" <a href=\"https://langchain-ai.github.io/langgraph/concepts/agentic_concepts/#tool-calling-agent\">\n",
" Tool calling agent\n",
" </a>\n",
" </li> \n",
" </ul>\n",
" </p>\n",
"</div> \n",
"\n",
"\n",
"Many AI applications need memory to share context across multiple interactions. In LangGraph, memory is provided for any [StateGraph](https://langchain-ai.github.io/langgraph/reference/graphs/#langgraph.graph.StateGraph) through [Checkpointers](https://github.com/langchain-ai/langgraph/tree/e4ca7ab69c599fd77dd4f0d47280849d715392cc/libs/checkpoint).\n",
"\n",
"When creating any LangGraph workflow, you can set them up to persist their state by doing using the following:\n",
@@ -20,7 +50,8 @@
"2. [SqliteSaver](https://langchain-ai.github.io/langgraph/reference/checkpoints/#sqlitesaver) allows you to save to a Sqlite db locally or in memory.\n",
"3. There are various external databases that can be used for persistence, such as [Postgres](https://langchain-ai.github.io/langgraph/how-tos/persistence_postgres/), [MongoDB](https://langchain-ai.github.io/langgraph/how-tos/persistence_mongodb/), and [Redis](https://langchain-ai.github.io/langgraph/how-tos/persistence_redis/).\n",
" \n",
"Here is an example using [MemorySaver](https://langchain-ai.github.io/langgraph/reference/checkpoints/#memorysaver) in memory:\n",
"Here is an example using the built-in [MemorySaver](https://langchain-ai.github.io/langgraph/reference/checkpoints/#memorysaver) checkpointer:\n",
"\n",
"```python\n",
"from langgraph.graph import StateGraph\n",
"from langgraph.checkpoint.memory import MemorySaver\n",
@@ -584,7 +615,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
"version": "3.11.4"
}
},
"nbformat": 4,
+33 -2
View File
@@ -7,11 +7,42 @@
"source": [
"# How to create a custom checkpointer using MongoDB\n",
"\n",
"<div class=\"admonition tip\">\n",
" <p class=\"admonition-title\">Prerequisites</p>\n",
" <p>\n",
" This guide assumes familiarity with the following:\n",
" <ul>\n",
" <li>\n",
" <a href=\"https://langchain-ai.github.io/langgraph/concepts/persistence/\">\n",
" Persistence\n",
" </a>\n",
" </li> \n",
" <li>\n",
" <a href=\"https://www.mongodb.com/\">\n",
" MongoDB\n",
" </a>\n",
" </li> \n",
" </ul>\n",
" </p>\n",
"</div> \n",
"\n",
"When creating LangGraph agents, you can also set them up so that they persist their state. This allows you to do things like interact with an agent multiple times and have it remember previous interactions. \n",
"\n",
"This reference implementation shows how to use MongoDB as the backend for persisting checkpoint state. Make sure that you have MongoDB running on port `27017` for going through this guide.\n",
"\n",
"NOTE: this is just an reference implementation. You can implement your own checkpointer using a different database or modify this one as long as it conforms to the `BaseCheckpointSaver` interface."
"NOTE: this is just an reference implementation. You can implement your own checkpointer using a different database or modify this one as long as it conforms to the `BaseCheckpointSaver` interface.\n",
"\n",
"For demonstration purposes we add persistence to the [pre-built create react agent](https://langchain-ai.github.io/langgraph/reference/prebuilt/#langgraph.prebuilt.chat_agent_executor.create_react_agent), but you can add a checkpointer to any custom graph that you build.\n",
" \n",
"```python\n",
"from langgraph.graph import StateGraph\n",
"\n",
"builder = StateGraph(....)\n",
"# ... define the graph\n",
"checkpointer = # mongodb checkpointer (see examples below)\n",
"graph = builder.compile(checkpointer=checkpointer)\n",
"...\n",
"```"
]
},
{
@@ -922,7 +953,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
"version": "3.11.4"
}
},
"nbformat": 4,
+36 -8
View File
@@ -7,15 +7,40 @@
"source": [
"# How to use Postgres checkpointer for persistence\n",
"\n",
"<div class=\"admonition tip\">\n",
" <p class=\"admonition-title\">Prerequisites</p>\n",
" <p>\n",
" This guide assumes familiarity with the following:\n",
" <ul>\n",
" <li>\n",
" <a href=\"https://langchain-ai.github.io/langgraph/concepts/persistence/\">\n",
" Persistence\n",
" </a>\n",
" </li> \n",
" <li>\n",
" <a href=\"https://www.postgresql.org/about/\">\n",
" Postgresql\n",
" </a>\n",
" </li> \n",
" </ul>\n",
" </p>\n",
"</div> \n",
"\n",
"When creating LangGraph agents, you can also set them up so that they persist their state. This allows you to do things like interact with an agent multiple times and have it remember previous interactions.\n",
"\n",
"This example shows how to use `Postgres` as the backend for persisting checkpoint state using [`langgraph-checkpoint-postgres`](https://github.com/langchain-ai/langgraph/tree/main/libs/checkpoint-postgres) library.\n",
"This how-to guide shows how to use `Postgres` as the backend for persisting checkpoint state using the [`langgraph-checkpoint-postgres`](https://github.com/langchain-ai/langgraph/tree/main/libs/checkpoint-postgres) library.\n",
"\n",
"To start a Postgres database to work with you can do the following:\n",
"For demonstration purposes we add persistence to the [pre-built create react agent](https://langchain-ai.github.io/langgraph/reference/prebuilt/#langgraph.prebuilt.chat_agent_executor.create_react_agent), but you can add a checkpointer to any custom graph that you build.\n",
"\n",
"```\n",
"$ cd libs/langgraph\n",
"$ make start-postgres"
"```python\n",
"from langgraph.graph import StateGraph\n",
"\n",
"builder = StateGraph(....)\n",
"# ... define the graph\n",
"checkpointer = # postgres checkpointer (see examples below)\n",
"graph = builder.compile(checkpointer=checkpointer)\n",
"...\n",
"```"
]
},
{
@@ -25,7 +50,10 @@
"source": [
"## Setup\n",
"\n",
"First, let's install the required packages and set our API keys"
"You will need access to a postgres instance. There are many resources online that can help\n",
"you set up a postgres instance.\n",
"\n",
"Next, let's install the required packages and set our API keys"
]
},
{
@@ -41,7 +69,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"id": "eca9aafb-a155-407a-8036-682a2f1297d7",
"metadata": {},
"outputs": [],
@@ -558,7 +586,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
"version": "3.11.4"
}
},
"nbformat": 4,
+34 -1
View File
@@ -7,11 +7,44 @@
"source": [
"# How to create a custom checkpointer using Redis\n",
"\n",
"<div class=\"admonition tip\">\n",
" <p class=\"admonition-title\">Prerequisites</p>\n",
" <p>\n",
" This guide assumes familiarity with the following:\n",
" <ul>\n",
" <li>\n",
" <a href=\"https://langchain-ai.github.io/langgraph/concepts/persistence/\">\n",
" Persistence\n",
" </a>\n",
" </li> \n",
" <li>\n",
" <a href=\"https://redis.io/\">\n",
" Redis\n",
" </a>\n",
" </li> \n",
" </ul>\n",
" </p>\n",
"</div> \n",
"\n",
"When creating LangGraph agents, you can also set them up so that they persist their state. This allows you to do things like interact with an agent multiple times and have it remember previous interactions.\n",
"\n",
"This reference implementation shows how to use Redis as the backend for persisting checkpoint state. Make sure that you have Redis running on port `6379` for going through this guide.\n",
"\n",
"NOTE: this is just an reference implementation. You can implement your own checkpointer using a different database or modify this one as long as it conforms to the `BaseCheckpointSaver` interface."
"NOTE: this is just an reference implementation. You can implement your own checkpointer using a different database or modify this one as long as it conforms to the `BaseCheckpointSaver` interface.\n",
"\n",
"\n",
"For demonstration purposes we add persistence to the [pre-built create react agent](https://langchain-ai.github.io/langgraph/reference/prebuilt/#langgraph.prebuilt.chat_agent_executor.create_react_agent), but you can add a checkpointer to any custom graph that you build.\n",
"\n",
"\n",
"```python\n",
"from langgraph.graph import StateGraph\n",
"\n",
"builder = StateGraph(....)\n",
"# ... define the graph\n",
"checkpointer = # mongodb checkpointer (see examples below)\n",
"graph = builder.compile(checkpointer=checkpointer)\n",
"...\n",
"```"
]
},
{
@@ -6,16 +6,46 @@
"source": [
"# How to create a ReAct agent from scratch\n",
"\n",
"Using the prebuilt ReAct agent (`create_react_agent`) is a great way to get started, but sometimes you might want more control and customization. In those cases, you can create a custom ReAct agent. This guide shows how to implement ReAct agent from scratch using LangGraph.\n",
"<div class=\"admonition tip\">\n",
" <p class=\"admonition-title\">Prerequisites</p>\n",
" <p>\n",
" This guide assumes familiarity with the following:\n",
" <ul>\n",
" <li>\n",
" <a href=\"https://langchain-ai.github.io/langgraph/concepts/agentic_concepts/#tool-calling-agent\">\n",
" Tool calling agent\n",
" </a>\n",
" </li> \n",
" <li>\n",
" <a href=\"https://python.langchain.com/docs/concepts/#chat-models\">\n",
" Chat Models\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://python.langchain.com/docs/concepts/#messages\">\n",
" Messages\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://langchain-ai.github.io/langgraph/concepts/low_level/\">\n",
" LangGraph Glossary\n",
" </a>\n",
" </li>\n",
" </ul>\n",
" </p>\n",
"</div> \n",
"\n",
"\n",
"Using the prebuilt ReAct agent ([create_react_agent](https://langchain-ai.github.io/langgraph/reference/prebuilt/#langgraph.prebuilt.chat_agent_executor.create_react_agent)) is a great way to get started, but sometimes you might want more control and customization. In those cases, you can create a custom ReAct agent. This guide shows how to implement ReAct agent from scratch using LangGraph.\n",
"\n",
"## Setup\n",
"\n",
"First, let's install the required packages and set our API keys"
"First, let's install the required packages and set our API keys:"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
@@ -25,7 +55,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +100,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
@@ -86,6 +116,8 @@
"class AgentState(TypedDict):\n",
" \"\"\"The state of the agent.\"\"\"\n",
"\n",
" # add_messages is a reducer\n",
" # See https://langchain-ai.github.io/langgraph/concepts/low_level/#reducers\n",
" messages: Annotated[Sequence[BaseMessage], add_messages]"
]
},
@@ -100,7 +132,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
@@ -139,7 +171,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
@@ -202,7 +234,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 7,
"metadata": {},
"outputs": [
{
@@ -279,7 +311,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 8,
"metadata": {},
"outputs": [
{
@@ -291,8 +323,8 @@
"what is the weather in sf\n",
"==================================\u001b[1m Ai Message \u001b[0m==================================\n",
"Tool Calls:\n",
" get_weather (call_iXNCfcUUc7rkgLYbDBYkPZYM)\n",
" Call ID: call_iXNCfcUUc7rkgLYbDBYkPZYM\n",
" get_weather (call_azW0cQ4XjWWj0IAkWAxq9nLB)\n",
" Call ID: call_azW0cQ4XjWWj0IAkWAxq9nLB\n",
" Args:\n",
" location: San Francisco\n",
"=================================\u001b[1m Tool Message \u001b[0m=================================\n",
@@ -301,7 +333,7 @@
"\"It's sunny in San Francisco, but you better look out if you're a Gemini \\ud83d\\ude08.\"\n",
"==================================\u001b[1m Ai Message \u001b[0m==================================\n",
"\n",
"The weather in San Francisco is sunny. However, it seems there's a playful warning for Geminis—so keep an eye out!\n"
"The weather in San Francisco is sunny! However, it seems there's a playful warning for Geminis. Enjoy the sunshine!\n"
]
}
],
@@ -330,7 +362,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
@@ -344,9 +376,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
"version": "3.11.4"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
@@ -17,9 +17,43 @@
"source": [
"# How to return structured output with a ReAct style agent\n",
"\n",
"<div class=\"admonition tip\">\n",
" <p class=\"admonition-title\">Prerequisites</p>\n",
" <p>\n",
" This guide assumes familiarity with the following:\n",
" <ul>\n",
" <li>\n",
" <a href=\"https://python.langchain.com/docs/concepts/#structured-output\">\n",
" Structured Output\n",
" </a>\n",
" </li> \n",
" <li>\n",
" <a href=\"https://langchain-ai.github.io/langgraph/concepts/agentic_concepts/#tool-calling-agent\">\n",
" Tool calling agent\n",
" </a>\n",
" </li> \n",
" <li>\n",
" <a href=\"https://python.langchain.com/docs/concepts/#chat-models\">\n",
" Chat Models\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://python.langchain.com/docs/concepts/#messages\">\n",
" Messages\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://langchain-ai.github.io/langgraph/concepts/low_level/\">\n",
" LangGraph Glossary\n",
" </a>\n",
" </li>\n",
" </ul>\n",
" </p>\n",
"</div> \n",
"\n",
"You might want your agent to return its output in a structured format. For example, if the output of the agent is used by some other downstream software, you may want the output to be in the same structured format every time the agent is invoked to ensure consistency.\n",
"\n",
"This notebook will walk through two different options for forcing a function calling agent to structure its output. We will be using a basic [ReAct agent](https://langchain-ai.github.io/langgraph/how-tos/create-react-agent/) (a model node and a tool-calling node) together with a third node at the end that will format response for the user. Both of the options will use the same graph structure as shown in the diagram below, but will have different mechanisms under the hood.\n",
"This notebook will walk through two different options for forcing a tool calling agent to structure its output. We will be using a basic [ReAct agent](https://langchain-ai.github.io/langgraph/how-tos/create-react-agent/) (a model node and a tool-calling node) together with a third node at the end that will format response for the user. Both of the options will use the same graph structure as shown in the diagram below, but will have different mechanisms under the hood.\n",
"\n",
"![react_diagrams.png](attachment:59e8ed35-f2b4-421e-8d21-880e7ab31e5f.png)\n",
"\n",
@@ -432,7 +466,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
"version": "3.11.4"
}
},
"nbformat": 4,
+50 -34
View File
@@ -6,11 +6,35 @@
"source": [
"# How to control graph recursion limit\n",
"\n",
"You can set the graph recursion limit when invoking or streaming the graph. The recursion limit sets the number of supersteps that the graph is allowed to execute before it raises an error. Read more about the concept of recursion limits [here](https://langchain-ai.github.io/langgraph/concepts/low_level/#recursion-limit). Let's see an example of this in a simple graph with parallel branches to better understand exactly how the recursion limit works.\n",
"<div class=\"admonition tip\">\n",
" <p class=\"admonition-title\">Prerequisites</p>\n",
" <p>\n",
" This guide assumes familiarity with the following:\n",
" <ul>\n",
" <li>\n",
" <a href=\"https://langchain-ai.github.io/langgraphjs/concepts/low_level/#graphs\">\n",
" Graphs\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://langchain-ai.github.io/langgraph/concepts/low_level/#recursion-limit\">\n",
" Recursion Limit\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://langchain-ai.github.io/langgraph/concepts/low_level/#nodes\">\n",
" Nodes\n",
" </a>\n",
" </li>\n",
" </ul>\n",
" </p>\n",
"</div> \n",
"\n",
"\n",
"You can set the graph recursion limit when invoking or streaming the graph. The recursion limit sets the number of **supersteps** that the graph is allowed to execute before it raises an error. Read more about the concept of recursion limits [here](https://langchain-ai.github.io/langgraph/concepts/low_level/#recursion-limit). Let's see an example of this in a simple graph with parallel branches to better understand exactly how the recursion limit works.\n",
"\n",
"If you want to see an example of how you can return the last value of your state instead of receiving a recursion limit error form your graph, read [this how-to](https://langchain-ai.github.io/langgraph/how-tos/return-when-recursion-limit-hits/).\n",
"\n",
"\n",
"## Setup\n",
"\n",
"First, let's install the required packages"
@@ -18,7 +42,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
@@ -47,7 +71,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
@@ -64,21 +88,28 @@
" aggregate: Annotated[list, operator.add]\n",
"\n",
"\n",
"class ReturnNodeValue:\n",
" def __init__(self, node_secret: str):\n",
" self._value = node_secret\n",
"def node_a(state):\n",
" return {\"aggregate\": [\"I'm A\"]}\n",
"\n",
" def __call__(self, state: State) -> Any:\n",
" print(f\"Adding {self._value} to {state['aggregate']}\")\n",
" return {\"aggregate\": [self._value]}\n",
"\n",
"def node_b(state):\n",
" return {\"aggregate\": [\"I'm B\"]}\n",
"\n",
"\n",
"def node_c(state):\n",
" return {\"aggregate\": [\"I'm C\"]}\n",
"\n",
"\n",
"def node_d(state):\n",
" return {\"aggregate\": [\"I'm A\"]}\n",
"\n",
"\n",
"builder = StateGraph(State)\n",
"builder.add_node(\"a\", ReturnNodeValue(\"I'm A\"))\n",
"builder.add_node(\"a\", node_a)\n",
"builder.add_edge(START, \"a\")\n",
"builder.add_node(\"b\", ReturnNodeValue(\"I'm B\"))\n",
"builder.add_node(\"c\", ReturnNodeValue(\"I'm C\"))\n",
"builder.add_node(\"d\", ReturnNodeValue(\"I'm D\"))\n",
"builder.add_node(\"b\", node_b)\n",
"builder.add_node(\"c\", node_c)\n",
"builder.add_node(\"d\", node_d)\n",
"builder.add_edge(\"a\", \"b\")\n",
"builder.add_edge(\"a\", \"c\")\n",
"builder.add_edge(\"b\", \"d\")\n",
@@ -89,7 +120,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 3,
"metadata": {},
"outputs": [
{
@@ -120,17 +151,13 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Adding I'm A to []\n",
"Adding I'm B to [\"I'm A\"]\n",
"Adding I'm C to [\"I'm A\"]\n",
"Adding I'm D to [\"I'm A\", \"I'm B\", \"I'm C\"]\n",
"Recursion Error\n"
]
}
@@ -153,20 +180,9 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Adding I'm A to []\n",
"Adding I'm B to [\"I'm A\"]\n",
"Adding I'm C to [\"I'm A\"]\n",
"Adding I'm D to [\"I'm A\", \"I'm B\", \"I'm C\"]\n"
]
}
],
"outputs": [],
"source": [
"try:\n",
" graph.invoke({\"aggregate\": []}, {\"recursion_limit\": 4})\n",
@@ -200,7 +216,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
"version": "3.11.4"
}
},
"nbformat": 4,
@@ -6,6 +6,30 @@
"source": [
"# How to return state before hitting recursion limit\n",
"\n",
"<div class=\"admonition tip\">\n",
" <p class=\"admonition-title\">Prerequisites</p>\n",
" <p>\n",
" This guide assumes familiarity with the following:\n",
" <ul>\n",
" <li>\n",
" <a href=\"https://langchain-ai.github.io/langgraphjs/concepts/low_level/#graphs\">\n",
" Graphs\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://langchain-ai.github.io/langgraph/concepts/low_level/#recursion-limit\">\n",
" Recursion Limit\n",
" </a>\n",
" </li>\n",
" <li>\n",
" <a href=\"https://langchain-ai.github.io/langgraph/concepts/low_level/#nodes\">\n",
" Nodes\n",
" </a>\n",
" </li>\n",
" </ul>\n",
" </p>\n",
"</div> \n",
"\n",
"[Setting the graph recursion limit](https://langchain-ai.github.io/langgraph/how-tos/recursion-limit/) can help you control how long your graph will stay running, but if the recursion limit is hit your graph returns an error - which may not be ideal for all use cases. Instead you may wish to return the value of the state *just before* the recursion limit is hit. This how-to will show you how to do this."
]
},
@@ -51,7 +75,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
@@ -92,7 +116,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 2,
"metadata": {},
"outputs": [
{
@@ -121,7 +145,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 3,
"metadata": {},
"outputs": [
{
@@ -158,7 +182,7 @@
},
{
"cell_type": "code",
"execution_count": 23,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
@@ -211,7 +235,7 @@
},
{
"cell_type": "code",
"execution_count": 25,
"execution_count": 5,
"metadata": {},
"outputs": [
{
@@ -220,7 +244,7 @@
"{'value': 'keep going!', 'action_result': 'what a great result!'}"
]
},
"execution_count": 25,
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
@@ -239,7 +263,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
@@ -253,9 +277,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
"version": "3.11.4"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long