mirror of
https://github.com/hwchase17/langchain.git
synced 2025-05-19 05:51:16 +00:00
# Fix for `update_document` Function in Chroma ## Summary This pull request addresses an issue with the `update_document` function in the Chroma class, as described in [#5031](https://github.com/hwchase17/langchain/issues/5031#issuecomment-1562577947). The issue was identified as an `AttributeError` raised when calling `update_document` due to a missing corresponding method in the `Collection` object. This fix refactors the `update_document` method in `Chroma` to correctly interact with the `Collection` object. ## Changes 1. Fixed the `update_document` method in the `Chroma` class to correctly call methods on the `Collection` object. 2. Added the corresponding test `test_chroma_update_document` in `tests/integration_tests/vectorstores/test_chroma.py` to reflect the updated method call. 3. Added an example and explanation of how to use the `update_document` function in the Jupyter notebook tutorial for Chroma. ## Test Plan All existing tests pass after this change. In addition, the `test_chroma_update_document` test case now correctly checks the functionality of `update_document`, ensuring that the function works as expected and updates the content of documents correctly. ## Reviewers @dev2049 This fix will ensure that users are able to use the `update_document` function as expected, without encountering the previous `AttributeError`. This will enhance the usability and reliability of the Chroma class for all users. Thank you for considering this pull request. I look forward to your feedback and suggestions. |
||
---|---|---|
.. | ||
analyticdb.ipynb | ||
annoy.ipynb | ||
atlas.ipynb | ||
chroma.ipynb | ||
deeplake.ipynb | ||
docarray_hnsw.ipynb | ||
docarray_in_memory.ipynb | ||
elasticsearch.ipynb | ||
faiss.ipynb | ||
lanecdb.ipynb | ||
milvus.ipynb | ||
myscale.ipynb | ||
opensearch.ipynb | ||
pgvector.ipynb | ||
pinecone.ipynb | ||
qdrant.ipynb | ||
redis.ipynb | ||
sklearn.ipynb | ||
supabase.ipynb | ||
tair.ipynb | ||
typesense.ipynb | ||
vectara.ipynb | ||
weaviate.ipynb | ||
zilliz.ipynb |