-
Notifications
You must be signed in to change notification settings - Fork 16k
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
community: Get Document object by Document ID from Chroma DB #16671
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
cc @jeffchuber
@raunakshrivastava7 another way to do this is to by creating a chroma client and passing it to langchain. My personal feeling is the glue between Chroma-Langchain should focus on the the tools that Langchain as a framework needs (maybe that is the case here?) - otherwise the glue will have to expand to be the full set of Chroma's API and then is more apt to break. From a user education perspective, I think it's also generally more clear "which API you are learning" if they are separate. However... I don't feel strongly! Maybe it's just this morning cup of coffee talking. @baskaryan thoughts? |
As per my understanding, currently the Document object can be fetched using similarity_search functions in langchain. There is no direct method or API to get the Document object from Document ID. The PR solves this problem. |
As per my understanding, currently the Document object can be fetched using similarity_search functions in langchain. There is no direct method or API to get the Document object from Document ID. The PR solves this problem. |
Description:
Added get_document_by_id() function in langchain_community/vectorstores/chroma.py to get Document object from
Document ID.
Document object is required for updating any document. get_document_by_id() function will help users to get the
Document object from Document ID. Then the metadata or page_content of the Document object can be modified by the
user and passed to update_document() function.
Issue: Fixed Get Chroma vectorstore Document by
doc_id
for document / metadata updates. #15261