Skip to content

The agent engineering platform.

docs[patch]: update trim messages wording (#30174)

Vadym Barda6c05d4b15394
diff --git a/docs/docs/how_to/trim_messages.ipynb b/docs/docs/how_to/trim_messages.ipynb
index 505e7b9019..9c6553c7e6 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",