langchain/tests/integration_tests/vectorstores
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
..
cassettes Fix/issue 2695 (#3608) 2023-04-26 21:45:03 -07:00
docarray Add DocArray vector stores (#4483) 2023-05-10 15:22:16 -07:00
docker-compose Fix/issue 1213 (#2932) 2023-04-16 13:11:30 -07:00
fixtures fix: elasticsearch (#2402) 2023-04-05 06:51:32 -07:00
__init__.py
conftest.py [minor] Deep Lake auth improvements in docs, kwargs pass, faster tests (#2927) 2023-04-15 10:49:16 -07:00
fake_embeddings.py Propagate "filter" arg in Chroma similarity_search (#1869) 2023-03-22 19:40:10 -07:00
test_analyticdb.py Add a full PostgresSQL syntax database 'AnalyticDB' as vector store. (#3135) 2023-04-22 08:25:41 -07:00
test_annoy.py Add Annoy as VectorStore (#2939) 2023-04-16 13:44:04 -07:00
test_atlas.py
test_chroma.py Fix update_document function, add test and documentation. (#5359) 2023-05-29 06:39:25 -07:00
test_deeplake.py Fixing DeepLake Overwrite Flag (#4683) 2023-05-15 17:39:16 -07:00
test_elasticsearch.py Add the usage of SSL certificates for Elasticsearch and user password authentication (#5058) 2023-05-22 11:51:32 -07:00
test_faiss.py Add similarity_search_with_normalized_similarities (#2916) 2023-04-15 21:06:08 -07:00
test_lancedb.py Harrison/lancedb (#3634) 2023-04-27 08:14:36 -07:00
test_milvus.py Refactor Milvus/Zilliz (#3047) 2023-04-22 08:26:19 -07:00
test_myscale.py Harrison/myscale (#3352) 2023-04-22 09:17:38 -07:00
test_opensearch.py OpenSearch: Add Similarity Search with Score (#4089) 2023-05-08 16:35:21 -07:00
test_pgvector.py Adds 'IN' metadata filter for pgvector for checking set presence (#4982) 2023-05-19 13:53:23 -07:00
test_pinecone.py feat: improve pinecone tests (#2806) 2023-04-13 21:49:31 -07:00
test_qdrant.py Add support for Qdrant nested filter (#4354) 2023-05-09 10:34:11 -07:00
test_redis.py Update redis integration tests (#4937) 2023-05-18 10:22:17 -07:00
test_tair.py Harrison/tair (#3770) 2023-04-28 21:25:33 -07:00
test_vectara.py Vectara (#5069) 2023-05-24 01:24:58 -07:00
test_weaviate.py Fixes issue #5072 - adds additional support to Weaviate (#5085) 2023-05-22 18:57:10 -07:00
test_zilliz.py Refactor Milvus/Zilliz (#3047) 2023-04-22 08:26:19 -07:00