From b2ca80024294c5e87b543835eae309a3636cfec5 Mon Sep 17 00:00:00 2001 From: Stefano Fiorucci Date: Thu, 2 Jan 2025 11:04:35 +0100 Subject: [PATCH] update to chroma 0.6.0 (#1270) --- .github/workflows/chroma.yml | 2 +- integrations/chroma/pyproject.toml | 6 ++---- .../document_stores/chroma/document_store.py | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/chroma.yml b/.github/workflows/chroma.yml index 323a8a0b3..93008f863 100644 --- a/.github/workflows/chroma.yml +++ b/.github/workflows/chroma.yml @@ -30,7 +30,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.9", "3.10", "3.11"] steps: - name: Support longpaths diff --git a/integrations/chroma/pyproject.toml b/integrations/chroma/pyproject.toml index 40bc9a2b3..589b75f78 100644 --- a/integrations/chroma/pyproject.toml +++ b/integrations/chroma/pyproject.toml @@ -7,7 +7,7 @@ name = "chroma-haystack" dynamic = ["version"] description = '' readme = "README.md" -requires-python = ">=3.8" +requires-python = ">=3.9" license = "Apache-2.0" keywords = [] authors = [{ name = "John Doe", email = "jd@example.com" }] @@ -15,7 +15,6 @@ classifiers = [ "License :: OSI Approved :: Apache Software License", "Development Status :: 4 - Beta", "Programming Language :: Python", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -24,8 +23,7 @@ classifiers = [ ] dependencies = [ "haystack-ai", - "chromadb>=0.5.17", - "typing_extensions>=4.8.0" + "chromadb>=0.6.0", ] [project.urls] diff --git a/integrations/chroma/src/haystack_integrations/document_stores/chroma/document_store.py b/integrations/chroma/src/haystack_integrations/document_stores/chroma/document_store.py index 439e4b144..5dee9c889 100644 --- a/integrations/chroma/src/haystack_integrations/document_stores/chroma/document_store.py +++ b/integrations/chroma/src/haystack_integrations/document_stores/chroma/document_store.py @@ -116,7 +116,7 @@ def _ensure_initialized(self): if "hnsw:space" not in self._metadata: self._metadata["hnsw:space"] = self._distance_function - if self._collection_name in [c.name for c in client.list_collections()]: + if self._collection_name in client.list_collections(): self._collection = client.get_collection(self._collection_name, embedding_function=self._embedding_func) if self._metadata != self._collection.metadata: