docs/how_to/trim_messages/ #28999
Replies: 2 comments
-
Any advice on how to use token counter = llm when trimming messages with tools calls? Getting this
|
Beta Was this translation helpful? Give feedback.
-
Hello, I try to trim the SQLChatMessageHistory, as you can see the code in the below: def get_session_history(user_id: str, conversation_id: str) -> BaseChatMessageHistory:
the return chat_history is a SQLChatMessageHistory class variable, and is there a way to trim it? |
Beta Was this translation helpful? Give feedback.
-
docs/how_to/trim_messages/
This guide assumes familiarity with the following concepts:
https://python.langchain.com/docs/how_to/trim_messages/
Beta Was this translation helpful? Give feedback.
All reactions