langchain/docs/modules/indexes/vectorstores/examples
Martin Holecek 44b48d9518
Fix update_document function, add test and documentation. (#5359)
# 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.
2023-05-29 06:39:25 -07:00
..
analyticdb.ipynb docs: improved vectorstore notebooks (#3724) 2023-04-28 19:26:50 -07:00
annoy.ipynb docs: vectorstores, different updates and fixes (#4939) 2023-05-18 15:35:47 -07:00
atlas.ipynb docs: vectorstores, different updates and fixes (#4939) 2023-05-18 15:35:47 -07:00
chroma.ipynb Fix update_document function, add test and documentation. (#5359) 2023-05-29 06:39:25 -07:00
deeplake.ipynb docs: vectorstores, different updates and fixes (#4939) 2023-05-18 15:35:47 -07:00
docarray_hnsw.ipynb docs: vectorstores, different updates and fixes (#4939) 2023-05-18 15:35:47 -07:00
docarray_in_memory.ipynb docs: vectorstores, different updates and fixes (#4939) 2023-05-18 15:35:47 -07:00
elasticsearch.ipynb docs retriever improvements (#4430) 2023-05-17 15:29:22 -07:00
faiss.ipynb Faiss no avx2 (#4895) 2023-05-17 19:18:57 -07:00
lanecdb.ipynb docs: improved vectorstore notebooks (#3724) 2023-04-28 19:26:50 -07:00
milvus.ipynb Update the milvus example (#4706) 2023-05-15 16:16:57 -07:00
myscale.ipynb docs: improved vectorstore notebooks (#3724) 2023-04-28 19:26:50 -07:00
opensearch.ipynb OpenSearch top k parameter fix (#5216) 2023-05-25 09:51:23 -07:00
pgvector.ipynb added documentation on retrieving a PG vectorstore (#4578) 2023-05-12 13:04:06 -04:00
pinecone.ipynb docs retriever improvements (#4430) 2023-05-17 15:29:22 -07:00
qdrant.ipynb update qdrant docs to reflect the proper way to initialize Qdrant() constructor (#4596) 2023-05-16 17:30:38 -07:00
redis.ipynb docs: vectorstores, different updates and fixes (#4939) 2023-05-18 15:35:47 -07:00
sklearn.ipynb Add SKLearnVectorStore (#5305) 2023-05-28 08:17:42 -07:00
supabase.ipynb docs supabase update (#4935) 2023-05-18 10:42:08 -07:00
tair.ipynb docs: vectorstores, different updates and fixes (#4939) 2023-05-18 15:35:47 -07:00
typesense.ipynb Add Typesense vector store (#1674) 2023-05-23 23:20:45 -07:00
vectara.ipynb Vectara (#5069) 2023-05-24 01:24:58 -07:00
weaviate.ipynb Weaviate: Add QnA with sources example (#5247) 2023-05-25 09:58:33 -04:00
zilliz.ipynb Update the milvus example (#4706) 2023-05-15 16:16:57 -07:00