diff --git a/docs/docs/how_to/trim_messages.ipynb b/docs/docs/how_to/trim_messages.ipynb index 9aa61fed9c..e82c126f61 100644 --- a/docs/docs/how_to/trim_messages.ipynb +++ b/docs/docs/how_to/trim_messages.ipynb @@ -7,6 +7,19 @@ "source": [ "# How to trim messages\n", "\n", + ":::info Prerequisites\n", + "\n", + "This guide assumes familiarity with the following concepts:\n", + "\n", + "- [Messages](/docs/concepts/#messages)\n", + "- [Chat models](/docs/concepts/#chat-models)\n", + "- [Chaining](/docs/how_to/sequence/)\n", + "- [Chat history](/docs/concepts/#chat-history)\n", + "\n", + "The methods in this guide also require `langchain-core>=0.2.9`.\n", + "\n", + ":::\n", + "\n", "All models have finite context windows, meaning there's a limit to how many tokens they can take as input. If you have very long messages or a chain/agent that accumulates a long message is history, you'll need to manage the length of the messages you're passing in to the model.\n", "\n", "The `trim_messages` util provides some basic strategies for trimming a list of messages to be of a certain token length.\n",