To avoid errors due to token limit. See: - https://langchain-ai.github.io/langgraph/how-tos/memory/manage-conversation-history/ - https://python.langchain.com/docs/how_to/trim_messages/ - https://langchain-ai.github.io/langgraph/concepts/memory/?ref=blog.langchain.dev#summarizing-past-conversations
To avoid errors due to token limit.
See: