-
Notifications
You must be signed in to change notification settings - Fork 6.4k
ZepMemory implementation for LlamaIndex #18199
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
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.
Did you mean to put this in the mem0 folder? Normally this would be its own integration right?
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.
Thank you for the feedback. You’re absolutely right—it should be its own integration. I apologize for the oversight in placing it within the mem0 folder. I'll make the necessary adjustments promptly.
user_id: Optional[str] = None, | ||
memory_key: str = "chat_history", | ||
max_message_length: int = 2500, | ||
**kwargs, |
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.
no need for kwargs if we aren't using them
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.
I agree, I'll remove **kwargs
from the signature to simplify the code. Thanks for the suggestion!
memory_key=memory_key, | ||
max_message_length=max_message_length, | ||
) | ||
self._client = zep_client |
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.
does zep have an async client? There are a few async methods in the base class that would be nice to implement
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.
I’ve updated the ZepMemory implementation to include full asynchronous support. The new code now implements async versions for all key operations (e.g. _async_sync_from_zep
, aget
, aput
, aset
, areset
, and asearch
). When using an AsyncZep
client with the is_async
flag set to True
, the memory will use these async
methods; otherwise, it falls back to the synchronous methods.
Let me know if you have any further suggestions!
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.
@logan-markewich could you please let me know if you have any further suggestions
To add an integration, you'll need more than a single file -- check out other integrations for examples, but you'll need a README and a pyproject.toml at a minimum Tests would also be nice |
Feel free to check it out — I’d love to hear your thoughts and feedback! Thanks! 🙌 |
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
This PR is stale because it has been open 50 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
Hi @logan-markewich, Appreciate your time and guidance! Thanks, |
Add ZepMemory Integration for LlamaIndex
Overview
This PR introduces a
ZepMemory
class that provides integration between LlamaIndex and Zep, allowing for persistent memory, context enrichment, and retrieval capabilities in LlamaIndex applications.Features
ChatMemoryBuffer
and Zep's memory storeImplementation Details
BaseMemory
classDependencies
zep-python
client library