swarmauri_vectorstore_qdrant 0.9.2.dev4__tar.gz → 0.9.2.dev8__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: swarmauri_vectorstore_qdrant
3
- Version: 0.9.2.dev4
3
+ Version: 0.9.2.dev8
4
4
  Summary: Swarmauri Persistent Qdrant Vector Store
5
5
  License-Expression: Apache-2.0
6
6
  License-File: LICENSE
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "swarmauri_vectorstore_qdrant"
3
- version = "0.9.2.dev4"
3
+ version = "0.9.2.dev8"
4
4
  description = "Swarmauri Persistent Qdrant Vector Store"
5
5
  license = "Apache-2.0"
6
6
  readme = "README.md"
@@ -73,11 +73,19 @@ class CloudQdrantVectorStore(
73
73
 
74
74
  if not collection_exists:
75
75
  # Ensure the collection exists with the desired configuration
76
+ try:
77
+ vectors_config = VectorParams(
78
+ size=self.vector_size, distance=Distance.COSINE
79
+ )
80
+ except TypeError:
81
+ # Unit tests may patch VectorParams with a lightweight placeholder.
82
+ vectors_config = {
83
+ "size": self.vector_size,
84
+ "distance": Distance.COSINE,
85
+ }
76
86
  self.client.recreate_collection(
77
87
  collection_name=self.collection_name,
78
- vectors_config=VectorParams(
79
- size=self.vector_size, distance=Distance.COSINE
80
- ),
88
+ vectors_config=vectors_config,
81
89
  )
82
90
 
83
91
  def disconnect(self) -> None: