Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/chroma destination experimental fix #297

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.3.9-dev0

## Fixes

* **Test fix to ChromaDB reverting client creating order**

## 0.3.8

### Fixes
Expand Down
2 changes: 1 addition & 1 deletion unstructured_ingest/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.3.8" # pragma: no cover
__version__ = "0.3.9-dev0" # pragma: no cover
17 changes: 8 additions & 9 deletions unstructured_ingest/v2/processes/connectors/chroma.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,7 @@ def create_client(self) -> "Client":
import chromadb

access_config = self.connection_config.access_config.get_secret_value()
if self.connection_config.path:
return chromadb.PersistentClient(
path=self.connection_config.path,
settings=access_config.settings,
tenant=self.connection_config.tenant,
database=self.connection_config.database,
)

elif self.connection_config.host and self.connection_config.port:
if self.connection_config.host and self.connection_config.port:
return chromadb.HttpClient(
host=self.connection_config.host,
port=self.connection_config.port,
Expand All @@ -153,6 +145,13 @@ def create_client(self) -> "Client":
tenant=self.connection_config.tenant,
database=self.connection_config.database,
)
elif self.connection_config.path:
return chromadb.PersistentClient(
path=self.connection_config.path,
settings=access_config.settings,
tenant=self.connection_config.tenant,
database=self.connection_config.database,
)
else:
raise ValueError("Chroma connector requires either path or host and port to be set.")

Expand Down
Loading