Skip to content
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

support load limited messages from chat memory #52

Conversation

zhangxiaojiawow
Copy link
Contributor

Since the token we input to LLM is limited, the history messages we add into gpt request is also limited.

This merge request defines the interface MemoryMessagePicker, it can pick up needed chat messages from memory. We also provide an implementation of this interface BufferWindowMemoryMessagePicker, which will pick up lastest 2*K messages from memory.

@HamaWhiteGG HamaWhiteGG merged commit eceb312 into HamaWhiteGG:dev Jul 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants