-
Notifications
You must be signed in to change notification settings - Fork 15.8k
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
Zep Retriever - Vector Search Over Chat History #4533
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.
very cool, thanks for contribution @danielchalef! one quick comment
@dev2049 Bump on this one, too. Thanks! |
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.
this seems reasonable to me! i think @dev2049 already merged in the other pr, but lets wait to announce both of them on friday?
Friday's good. Thanks! |
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.
couple small comments but otherwise looks good! do you think it might be useful to add a to_retriever
method to ZepChatMessageHistory or a from_message_history
method to ZepRetriever (or both) that instantiates retriever from message history (since seems like they're based on same client/params under the hood)
Love the idea. Can we do so in a future PR? We have some other features coming - search and metadata related - that may require an update. |
looking good! could we add some tests as well? |
Coming up. 10 minutes. |
@dev2049 Tests pushed Took me a little longer to get the tests written. I hadn't really thought very deeply what popping would do here in terms of testing expected vs actual :-) def _search_result_to_doc(self, results: List[SearchResult]) -> List[Document]:
return [
Document(
page_content=r.message.pop("content"),
metadata={"score": r.dist, **r.message},
)
for r in results
if r.message
] |
Looks like github is having issues again :-(
|
Zep Retriever - Vector Search Over Chat History with the Zep Long-term Memory Service
More on Zep: https://github.com/getzep/zep
Note: This PR is related to and relies on #4834. I did not want to modify the
pyproject.toml
file to add thezep-python
dependency a second time.Before submitting
Notebook included in the PR. Integration tests require a Zep service container. Let me know if this is feasible given your CI setup.
Who can review?
Community members can review the PR once tests pass. Tag maintainers/contributors who might be interested:
@dev2049