-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 Custom Prompt for Memory Action Decision #2371
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@Dev-Khant Could you please take a look at this change? I'd love to hear your thoughts on this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @rst0070 We should change the name of custom_prompt
to custom_fact_extraction_prompt
and a doc for it on how it works. Because the current names custom_prompt
and custom_update_memory_prompt
would be confusing to users.
Thanks for the review! I will apply the change soon! |
14f5cf8
to
93120b7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rst0070 Thanks for quickly making the changes! PR looks good to me.
Description
The feature allows customizing the prompt used to determine memory actions - (whether to ADD, UPDATE, DELETE, or NONE).
Motivation and context
Summary of changes
custom_update_memory_prompt
which is the prompt determining memory actionmem0.configs.prompts.get_update_memory_messages
function and related codes to itIn my work, the code appends a suffix to
custom_update_memory_prompt
to force structured output, but it can be done another way if maintainers think that's more appropriate.Fixes #2366
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Please delete options that are not relevant.
Checklist:
Maintainer Checklist