Skip to content

A ChatMemory implementation based on token size control is required. #3423

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sunyuhan1998 opened this issue Jun 3, 2025 · 0 comments · May be fixed by #3424
Open

A ChatMemory implementation based on token size control is required. #3423

sunyuhan1998 opened this issue Jun 3, 2025 · 0 comments · May be fixed by #3424

Comments

@sunyuhan1998
Copy link
Contributor

Expected Behavior

An implementation of ChatMemory based on token size control is required, which evicts the oldest messages when the total memory tokens exceed a specified limit.

Current Behavior

Currently, there is only a ChatMemory implementation that is based on the number of messages.

Context

Currently, there is only a ChatMemory implementation that focuses on the number of messages, which is actually insufficient for real-world use cases.

ChatMemory represents the memory content of an LLM, and its actual limitation should depend on the context token size supported by the LLM. Therefore, a ChatMemory implementation that limits the window based on token size is more practically meaningful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant