Abstract base class for chat memory.
ATTENTION This abstraction was created prior to when chat models had native tool calling capabilities. It does NOT support native tool calling capabilities for chat models and will fail SILENTLY if used with a chat model that has native tool calling.
DO NOT USE THIS ABSTRACTION FOR NEW CODE.
Conversation chat memory with token limit.
Keeps only the most recent messages in the conversation under the constraint that the total number of tokens in the conversation does not exceed a certain limit.