- DATE:
- AUTHOR:
- The LangChain Team
LangChain
✂️ Trim messages with transformer utils
DATE:
AUTHOR:
The LangChain Team
Processing LangChain messages is now easier in both Python and JavaScript with our new message transformers. The newtrim_messages
util in LangChain covers a variety of new tasks, including:
Trimming by tokens
Merge messages of the same type
Filter by type, ID, or name
This is especially useful for stateful or complex applications (e.g. for those built in LangGraph).
See the how-to guide for more.