Skip to content

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

Open
@sunyuhan1998

Description

@sunyuhan1998

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions