mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-12 04:37:51 +02:00
docs(agents): update manage message history section (#4482)
Co-authored-by: Lauren Hirata Singh <lauren@langchain.dev>
This commit is contained in:
co-authored by
Lauren Hirata Singh
parent
d08ed5f42e
commit
c5de8f4e50
@@ -17,8 +17,8 @@
|
||||
"\n",
|
||||
"Message history can grow quickly and exceed LLM context window size, whether you're building chatbots with many conversation turns or agentic systems with numerous tool calls. There are several strategies for managing the message history:\n",
|
||||
"\n",
|
||||
"* [message trimming](#keep-the-original-message-history-unmodified) - remove first or last N messages in the history\n",
|
||||
"* [summarization](#summarizing-message-history) - summarize earlier messages in the history and replace them with a summary\n",
|
||||
"* [message trimming](#keep-the-original-message-history-unmodified) — remove first or last N messages in the history\n",
|
||||
"* [summarization](#summarizing-message-history) — summarize earlier messages in the history and replace them with a summary\n",
|
||||
"* custom strategies (e.g., message filtering, etc.)\n",
|
||||
"\n",
|
||||
"To manage message history in `create_react_agent`, you need to define a `pre_model_hook` function or [runnable](https://python.langchain.com/docs/concepts/runnables/) that takes graph state an returns a state update:\n",
|
||||
|
||||
Reference in New Issue
Block a user