mirror of
https://github.com/hwchase17/langchain
synced 2024-11-02 09:40:22 +00:00
ba7d53689c
- **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` | |
||
---|---|---|
.. | ||
langchain_chroma | ||
scripts | ||
tests | ||
.gitignore | ||
LICENSE | ||
Makefile | ||
poetry.lock | ||
pyproject.toml | ||
README.md |
langchain-chroma
This package contains the LangChain integration with Chroma.
Installation
pip install -U langchain-chroma
Usage
The Chroma
class exposes the connection to the Chroma vector store.
from langchain_chroma import Chroma
embeddings = ... # use a LangChain Embeddings class
vectorstore = Chroma(embeddings=embeddings)