diff --git a/llama-index-integrations/vector_stores/llama-index-vector-stores-pinecone/llama_index/vector_stores/pinecone/base.py b/llama-index-integrations/vector_stores/llama-index-vector-stores-pinecone/llama_index/vector_stores/pinecone/base.py index 707306b09c5bd..e2b64c2d69019 100644 --- a/llama-index-integrations/vector_stores/llama-index-vector-stores-pinecone/llama_index/vector_stores/pinecone/base.py +++ b/llama-index-integrations/vector_stores/llama-index-vector-stores-pinecone/llama_index/vector_stores/pinecone/base.py @@ -420,9 +420,10 @@ def delete(self, ref_doc_id: str, **delete_kwargs: Any) -> None: prefix=ref_doc_id, namespace=self.namespace ) ids_to_delete = list(id_gen) - self._pinecone_index.delete( - ids=ids_to_delete, namespace=self.namespace, **delete_kwargs - ) + if ids_to_delete: + self._pinecone_index.delete( + ids=ids_to_delete, namespace=self.namespace, **delete_kwargs + ) def delete_nodes( self, diff --git a/llama-index-integrations/vector_stores/llama-index-vector-stores-pinecone/pyproject.toml b/llama-index-integrations/vector_stores/llama-index-vector-stores-pinecone/pyproject.toml index ab8aaf1fffc6a..f214666a1b785 100644 --- a/llama-index-integrations/vector_stores/llama-index-vector-stores-pinecone/pyproject.toml +++ b/llama-index-integrations/vector_stores/llama-index-vector-stores-pinecone/pyproject.toml @@ -27,7 +27,7 @@ exclude = ["**/BUILD"] license = "MIT" name = "llama-index-vector-stores-pinecone" readme = "README.md" -version = "0.4.1" +version = "0.4.2" [tool.poetry.dependencies] python = ">=3.9,<3.13"