From 6c05d4b1539420f512293212cf7490b5bf4b1cac Mon Sep 17 00:00:00 2001 From: Vadym Barda Date: Fri, 7 Mar 2025 17:05:51 -0500 Subject: [PATCH] docs[patch]: update trim messages wording (#30174) --- docs/docs/how_to/trim_messages.ipynb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/docs/how_to/trim_messages.ipynb b/docs/docs/how_to/trim_messages.ipynb index 505e7b90195..9c6553c7e6d 100644 --- a/docs/docs/how_to/trim_messages.ipynb +++ b/docs/docs/how_to/trim_messages.ipynb @@ -30,7 +30,8 @@ "1. The resulting chat history should be **valid**. Usually this means that the following properties should be satisfied:\n", " - The chat history **starts** with either (1) a `HumanMessage` or (2) a [SystemMessage](/docs/concepts/messages/#systemmessage) followed by a `HumanMessage`.\n", " - The chat history **ends** with either a `HumanMessage` or a `ToolMessage`.\n", - " - A `ToolMessage` can only appear after an `AIMessage` that involved a tool call. \n", + " - A `ToolMessage` can only appear after an `AIMessage` that involved a tool call.\n", + "\n", " This can be achieved by setting `start_on=\"human\"` and `ends_on=(\"human\", \"tool\")`.\n", "3. It includes recent messages and drops old messages in the chat history.\n", " This can be achieved by setting `strategy=\"last\"`.\n",