langchain/docs/modules/indexes
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
..
document_loaders/examples Fix typos (#5323) 2023-05-26 18:55:21 -07:00
retrievers/examples Better docs for weaviate hybrid search (#5290) 2023-05-26 09:30:41 -07:00
text_splitters docs: text splitters improvements (#4490) 2023-05-17 21:33:34 -07:00
vectorstores Fix update_document function, add test and documentation. (#5359) 2023-05-29 06:39:25 -07:00
document_loaders.rst nit (#5208) 2023-05-24 12:52:20 -07:00
getting_started.ipynb Update getting_started.ipynb (#4850) 2023-05-17 13:19:14 -07:00
retrievers.rst
text_splitters.rst docs: text splitters improvements (#4490) 2023-05-17 21:33:34 -07:00
vectorstores.rst