From 5e3aa495d94494375334dc4a2576dbb8a7b8095e Mon Sep 17 00:00:00 2001 From: Chester Curme Date: Fri, 17 Jan 2025 11:05:55 -0500 Subject: [PATCH] update --- docs/docs/tutorials/introduction.ipynb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/docs/tutorials/introduction.ipynb b/docs/docs/tutorials/introduction.ipynb index 10c9ef4b2..0168af968 100644 --- a/docs/docs/tutorials/introduction.ipynb +++ b/docs/docs/tutorials/introduction.ipynb @@ -1523,7 +1523,9 @@ "\n", "\n", "def chatbot(state: State):\n", - " return {\"messages\": [llm_with_tools.invoke(state[\"messages\"])]}\n", + " message = llm_with_tools.invoke(state[\"messages\"])\n", + " assert(len(message.tool_calls) <= 1)\n", + " return {\"messages\": [message]}\n", "\n", "\n", "graph_builder.add_node(\"chatbot\", chatbot)\n", @@ -1991,7 +1993,9 @@ "\n", "\n", "def chatbot(state: State):\n", - " return {\"messages\": [llm_with_tools.invoke(state[\"messages\"])]}\n", + " message = llm_with_tools.invoke(state[\"messages\"])\n", + " assert(len(message.tool_calls) <= 1)\n", + " return {\"messages\": [message]}\n", "\n", "\n", "graph_builder = StateGraph(State)\n",