-
-
Notifications
You must be signed in to change notification settings - Fork 19.9k
feat:Adds new Param in getChatMessages for better context handling #4273
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
base: main
Are you sure you want to change the base?
Conversation
Hi @chungyau97, |
Hey @chungyau97, |
Hey @HenryHengZJ , can you help here? |
hey sorry for late reply. I think a better approach is to use Finally, in the mem0 you can then take the input from init function |
…e effectively" This reverts commit 086be60.
Is it possible to add a self-hosting feature? |
This is a proposal to introduce a new parameter in the
getChatMessages
function that allows us to retrieve the latest user message, enabling more accurate memory retrieval. Currently, Mem0 Memory usesget_all
to fetch all user memories, but this change would allow us to perform a semantic search, which is more efficient for handling context.I'd like to understand if there's a better approach to achieve this, and whether it makes sense to apply the same logic to other components as well. Thanks!
Changelog
getChatMessages
Method: Introduced a new parametercurrentMessages
to allow for dynamic message retrieval based on the latest user input, improving the context handling during chat sessions.currentMessages
to the chat history, ensuring that the latest user input is considered when fetching the memories.