vector-inspector 0.3.4__py3-none-any.whl → 0.3.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- vector_inspector/core/connections/base_connection.py +86 -1
- vector_inspector/core/connections/chroma_connection.py +23 -3
- vector_inspector/core/connections/pgvector_connection.py +1100 -0
- vector_inspector/core/connections/pinecone_connection.py +24 -4
- vector_inspector/core/connections/qdrant_connection.py +224 -189
- vector_inspector/core/embedding_providers/provider_factory.py +33 -38
- vector_inspector/core/embedding_utils.py +2 -2
- vector_inspector/services/backup_restore_service.py +41 -33
- vector_inspector/ui/components/connection_manager_panel.py +96 -77
- vector_inspector/ui/components/profile_manager_panel.py +315 -121
- vector_inspector/ui/dialogs/embedding_config_dialog.py +79 -58
- vector_inspector/ui/main_window.py +22 -0
- vector_inspector/ui/views/connection_view.py +215 -116
- vector_inspector/ui/views/info_panel.py +6 -6
- vector_inspector/ui/views/metadata_view.py +466 -187
- {vector_inspector-0.3.4.dist-info → vector_inspector-0.3.5.dist-info}/METADATA +4 -3
- {vector_inspector-0.3.4.dist-info → vector_inspector-0.3.5.dist-info}/RECORD +19 -18
- {vector_inspector-0.3.4.dist-info → vector_inspector-0.3.5.dist-info}/WHEEL +0 -0
- {vector_inspector-0.3.4.dist-info → vector_inspector-0.3.5.dist-info}/entry_points.txt +0 -0
|
@@ -5,7 +5,7 @@ import time
|
|
|
5
5
|
from pinecone import Pinecone, ServerlessSpec
|
|
6
6
|
from pinecone.exceptions import PineconeException
|
|
7
7
|
|
|
8
|
-
from .base_connection import VectorDBConnection
|
|
8
|
+
from vector_inspector.core.connections.base_connection import VectorDBConnection
|
|
9
9
|
from vector_inspector.core.logging import log_error
|
|
10
10
|
|
|
11
11
|
|
|
@@ -229,9 +229,15 @@ class PineconeConnection(VectorDBConnection):
|
|
|
229
229
|
Returns:
|
|
230
230
|
True if successful, False otherwise
|
|
231
231
|
"""
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
232
|
+
# If embeddings not provided, compute using base helper
|
|
233
|
+
if not embeddings and documents:
|
|
234
|
+
try:
|
|
235
|
+
embeddings = self.compute_embeddings_for_documents(
|
|
236
|
+
collection_name, documents, getattr(self, "connection_id", None)
|
|
237
|
+
)
|
|
238
|
+
except Exception as e:
|
|
239
|
+
log_error("Embeddings are required for Pinecone and computing them failed: %s", e)
|
|
240
|
+
return False
|
|
235
241
|
|
|
236
242
|
index = self._get_index(collection_name)
|
|
237
243
|
if not index:
|
|
@@ -660,6 +666,20 @@ class PineconeConnection(VectorDBConnection):
|
|
|
660
666
|
|
|
661
667
|
# Update document
|
|
662
668
|
if documents and i < len(documents):
|
|
669
|
+
# If embedding not supplied, compute for this updated document
|
|
670
|
+
if (
|
|
671
|
+
embeddings is None or i >= len(embeddings) or embeddings[i] is None
|
|
672
|
+
) and documents[i]:
|
|
673
|
+
try:
|
|
674
|
+
computed = self.compute_embeddings_for_documents(
|
|
675
|
+
collection_name,
|
|
676
|
+
[documents[i]],
|
|
677
|
+
getattr(self, "connection_id", None),
|
|
678
|
+
)
|
|
679
|
+
if computed:
|
|
680
|
+
values = computed[0]
|
|
681
|
+
except Exception as e:
|
|
682
|
+
log_error("Failed to compute embedding for Pinecone update: %s", e)
|
|
663
683
|
metadata["document"] = documents[i]
|
|
664
684
|
|
|
665
685
|
vectors.append({"id": vid, "values": values, "metadata": metadata})
|