Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
community: Chroma Adding create_collection_if_not_exists flag to Chro…
…ma constructor (langchain-ai#21420) - **Description:** Adds the ability to either `get_or_create` or simply `get_collection`. This is useful when dealing with read-only Chroma instances where users are constraint to using `get_collection`. Targeted at Http/CloudClients mostly. - **Issue:** chroma-core/chroma#2163 - **Dependencies:** N/A - **Twitter handle:** `@t_azarov` | Collection Exists | create_collection_if_not_exists | Outcome | test | |-------------------|---------------------------------|----------------------------------------------------------------|----------------------------------------------------------| | True | False | No errors, collection state unchanged | `test_create_collection_if_not_exist_false_existing` | | True | True | No errors, collection state unchanged | `test_create_collection_if_not_exist_true_existing` | | False | False | Error, `get_collection()` fails | `test_create_collection_if_not_exist_false_non_existing` | | False | True | No errors, `get_or_create_collection()` creates the collection | `test_create_collection_if_not_exist_true_non_existing` |
- Loading branch information