mirror of
https://github.com/hwchase17/langchain
synced 2024-10-29 17:07:25 +00:00
44b48d9518
# 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. |
||
---|---|---|
.. | ||
cassettes | ||
docarray | ||
docker-compose | ||
fixtures | ||
__init__.py | ||
conftest.py | ||
fake_embeddings.py | ||
test_analyticdb.py | ||
test_annoy.py | ||
test_atlas.py | ||
test_chroma.py | ||
test_deeplake.py | ||
test_elasticsearch.py | ||
test_faiss.py | ||
test_lancedb.py | ||
test_milvus.py | ||
test_myscale.py | ||
test_opensearch.py | ||
test_pgvector.py | ||
test_pinecone.py | ||
test_qdrant.py | ||
test_redis.py | ||
test_tair.py | ||
test_vectara.py | ||
test_weaviate.py | ||
test_zilliz.py |