diff --git a/CHANGELOG.md b/CHANGELOG.md index dbc19afb3b..82f806e5b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## 0.14.2-dev0 + +### Enhancements + +### Features + + * Add attribution to the `pinecone` connector + +### Fixes + ## 0.14.1 ### Enhancements @@ -13,7 +23,8 @@ * Use the python client when calling the unstructured api for partitioning or chunking * Saving the final content is now a dedicated destination connector (local) set as the default if none are provided. Avoids adding new files locally if uploading elsewhere. * Leverage last modified date when deciding if new files should be downloaded and reprocessed. -* **Add support for Python 3.12**. `unstructured` now works with Python 3.12! + * Add attribution to the `pinecone` connector + * **Add support for Python 3.12**. `unstructured` now works with Python 3.12! ### Fixes @@ -47,7 +58,7 @@ * **Fix disk-space leak in `partition_odt()`.** Remove temporary file created but not removed when `file` argument is passed to `partition_odt()`. * **AstraDB: option to prevent indexing metadata** * **Fix Missing py.typed** - + ## 0.13.7 ### Enhancements diff --git a/requirements/ingest/embed-huggingface.txt b/requirements/ingest/embed-huggingface.txt index a8de1edf93..73da4af416 100644 --- a/requirements/ingest/embed-huggingface.txt +++ b/requirements/ingest/embed-huggingface.txt @@ -152,7 +152,7 @@ requests==2.32.1 # transformers safetensors==0.4.3 # via transformers -scikit-learn==1.4.2 +scikit-learn==1.5.0 # via sentence-transformers scipy==1.11.3 # via diff --git a/requirements/ingest/pinecone.in b/requirements/ingest/pinecone.in index 618074fce1..985accf439 100644 --- a/requirements/ingest/pinecone.in +++ b/requirements/ingest/pinecone.in @@ -1,3 +1,3 @@ -c ../deps/constraints.txt -c ../base.txt -pinecone-client==2.2.4 +pinecone-client>=3.7.1 diff --git a/requirements/ingest/pinecone.txt b/requirements/ingest/pinecone.txt index 08d2c37a08..91b0bea83b 100644 --- a/requirements/ingest/pinecone.txt +++ b/requirements/ingest/pinecone.txt @@ -5,43 +5,12 @@ # pip-compile ./ingest/pinecone.in # certifi==2024.2.2 - # via - # -c ./ingest/../base.txt - # -c ./ingest/../deps/constraints.txt - # requests -charset-normalizer==3.3.2 - # via - # -c ./ingest/../base.txt - # requests -dnspython==2.6.1 - # via pinecone-client -idna==3.7 - # via - # -c ./ingest/../base.txt - # requests -loguru==0.7.2 - # via pinecone-client -numpy==1.26.4 # via # -c ./ingest/../base.txt # -c ./ingest/../deps/constraints.txt # pinecone-client -pinecone-client==2.2.4 +pinecone-client==4.1.0 # via -r ./ingest/pinecone.in -python-dateutil==2.9.0.post0 - # via - # -c ./ingest/../base.txt - # pinecone-client -pyyaml==6.0.1 - # via pinecone-client -requests==2.32.1 - # via - # -c ./ingest/../base.txt - # pinecone-client -six==1.16.0 - # via - # -c ./ingest/../base.txt - # python-dateutil tqdm==4.66.4 # via # -c ./ingest/../base.txt @@ -55,4 +24,3 @@ urllib3==1.26.18 # -c ./ingest/../base.txt # -c ./ingest/../deps/constraints.txt # pinecone-client - # requests diff --git a/requirements/ingest/salesforce.txt b/requirements/ingest/salesforce.txt index b462449fc4..b1a0463b93 100644 --- a/requirements/ingest/salesforce.txt +++ b/requirements/ingest/salesforce.txt @@ -48,7 +48,7 @@ requests==2.32.1 # requests-toolbelt # simple-salesforce # zeep -requests-file==2.0.0 +requests-file==2.1.0 # via zeep requests-toolbelt==1.0.0 # via zeep diff --git a/unstructured/__version__.py b/unstructured/__version__.py index 7170ac652a..660f95323f 100644 --- a/unstructured/__version__.py +++ b/unstructured/__version__.py @@ -1 +1 @@ -__version__ = "0.14.1" # pragma: no cover +__version__ = "0.14.2-dev0" # pragma: no cover diff --git a/unstructured/ingest/connector/pinecone.py b/unstructured/ingest/connector/pinecone.py index dd6f5d023c..9ede3cb0ac 100644 --- a/unstructured/ingest/connector/pinecone.py +++ b/unstructured/ingest/connector/pinecone.py @@ -72,16 +72,17 @@ def initialize(self): @requires_dependencies(["pinecone"], extras="pinecone") def create_index(self) -> "PineconeIndex": - import pinecone + from pinecone import Pinecone - pinecone.init( + from unstructured import __version__ as unstructured_version + + pc = Pinecone( api_key=self.connector_config.access_config.api_key, - environment=self.connector_config.environment, - ) - index = pinecone.Index(self.connector_config.index_name) - logger.debug( - f"Connected to index: {pinecone.describe_index(self.connector_config.index_name)}" + source_tag=f"unstructured=={unstructured_version}", ) + + index = pc.Index(self.connector_config.index_name) + logger.debug(f"Connected to index: {pc.describe_index(self.connector_config.index_name)}") return index @DestinationConnectionError.wrap