From ab80c113ac5b673f56ceba6c6bf6a35ae85ce20c Mon Sep 17 00:00:00 2001 From: trevor-cyi <142810014+trevor-cyi@users.noreply.github.com> Date: Mon, 22 Jul 2024 14:27:42 -0600 Subject: [PATCH] docs: Use bound model in convo history (#1082) This fixes a small mistake in the manage-conversation-history notebook where the model bound with tools was not used, instead, the original model was used when invocations occur. --- examples/memory/manage-conversation-history.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/memory/manage-conversation-history.ipynb b/examples/memory/manage-conversation-history.ipynb index 94da14225..2cdeb85d0 100644 --- a/examples/memory/manage-conversation-history.ipynb +++ b/examples/memory/manage-conversation-history.ipynb @@ -138,7 +138,7 @@ "\n", "# Define the function that calls the model\n", "def call_model(state: MessagesState):\n", - " response = model.invoke(state[\"messages\"])\n", + " response = bound_model.invoke(state[\"messages\"])\n", " # We return a list, because this will get added to the existing list\n", " return {\"messages\": response}\n", "\n", @@ -275,7 +275,7 @@ "# Define the function that calls the model\n", "def call_model(state: MessagesState):\n", " messages = filter_messages(state[\"messages\"])\n", - " response = model.invoke(messages)\n", + " response = bound_model.invoke(messages)\n", " # We return a list, because this will get added to the existing list\n", " return {\"messages\": response}\n", "\n",