vecmindb 1.0.2__tar.gz → 1.0.4__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.
- {vecmindb-1.0.2 → vecmindb-1.0.4}/PKG-INFO +1 -1
- {vecmindb-1.0.2 → vecmindb-1.0.4}/pyproject.toml +1 -1
- {vecmindb-1.0.2 → vecmindb-1.0.4}/vecmindb/__init__.py +1 -1
- {vecmindb-1.0.2 → vecmindb-1.0.4}/vecmindb/async_client.py +10 -1
- {vecmindb-1.0.2 → vecmindb-1.0.4}/vecmindb/client.py +9 -2
- {vecmindb-1.0.2 → vecmindb-1.0.4}/vecmindb/memory.py +2 -0
- {vecmindb-1.0.2 → vecmindb-1.0.4}/vecmindb.egg-info/PKG-INFO +1 -1
- {vecmindb-1.0.2 → vecmindb-1.0.4}/README.md +0 -0
- {vecmindb-1.0.2 → vecmindb-1.0.4}/setup.cfg +0 -0
- {vecmindb-1.0.2 → vecmindb-1.0.4}/tests/test_agent_memory.py +0 -0
- {vecmindb-1.0.2 → vecmindb-1.0.4}/tests/test_client.py +0 -0
- {vecmindb-1.0.2 → vecmindb-1.0.4}/tests/test_integrations.py +0 -0
- {vecmindb-1.0.2 → vecmindb-1.0.4}/vecmindb/auth.py +0 -0
- {vecmindb-1.0.2 → vecmindb-1.0.4}/vecmindb/exceptions.py +0 -0
- {vecmindb-1.0.2 → vecmindb-1.0.4}/vecmindb/integrations/__init__.py +0 -0
- {vecmindb-1.0.2 → vecmindb-1.0.4}/vecmindb/integrations/langchain.py +0 -0
- {vecmindb-1.0.2 → vecmindb-1.0.4}/vecmindb/integrations/llamaindex.py +0 -0
- {vecmindb-1.0.2 → vecmindb-1.0.4}/vecmindb/mcp.py +0 -0
- {vecmindb-1.0.2 → vecmindb-1.0.4}/vecmindb/mcp_server.py +0 -0
- {vecmindb-1.0.2 → vecmindb-1.0.4}/vecmindb/memory_plugin.py +0 -0
- {vecmindb-1.0.2 → vecmindb-1.0.4}/vecmindb/models.py +0 -0
- {vecmindb-1.0.2 → vecmindb-1.0.4}/vecmindb/py.typed +0 -0
- {vecmindb-1.0.2 → vecmindb-1.0.4}/vecmindb/retry.py +0 -0
- {vecmindb-1.0.2 → vecmindb-1.0.4}/vecmindb.egg-info/SOURCES.txt +0 -0
- {vecmindb-1.0.2 → vecmindb-1.0.4}/vecmindb.egg-info/dependency_links.txt +0 -0
- {vecmindb-1.0.2 → vecmindb-1.0.4}/vecmindb.egg-info/requires.txt +0 -0
- {vecmindb-1.0.2 → vecmindb-1.0.4}/vecmindb.egg-info/top_level.txt +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "vecmindb"
|
|
7
|
-
version = "1.0.
|
|
7
|
+
version = "1.0.4"
|
|
8
8
|
description = "Python SDK for VecminDB - High-performance vector database HTTP client"
|
|
9
9
|
authors = [{email = "contact@lingxinmind.com", name = "VecminDB Team"}]
|
|
10
10
|
license = {text = "MIT OR Apache-2.0"}
|
|
@@ -348,6 +348,7 @@ class AsyncVecminClient:
|
|
|
348
348
|
index_type: str = "HNSW",
|
|
349
349
|
index_params: Optional[Dict[str, Any]] = None,
|
|
350
350
|
domain: Optional[str] = "general",
|
|
351
|
+
sovereignty_token: Optional[str] = None,
|
|
351
352
|
**kw,
|
|
352
353
|
) -> CollectionInfo:
|
|
353
354
|
"""Create a new collection (``POST /api/v1/collections``).
|
|
@@ -359,6 +360,7 @@ class AsyncVecminClient:
|
|
|
359
360
|
index_type: Index algorithm.
|
|
360
361
|
index_params: Algorithm-specific parameters.
|
|
361
362
|
domain: Cognitive factuality domain.
|
|
363
|
+
sovereignty_token: Sovereign domain access token.
|
|
362
364
|
|
|
363
365
|
Returns:
|
|
364
366
|
Created collection metadata.
|
|
@@ -371,7 +373,11 @@ class AsyncVecminClient:
|
|
|
371
373
|
index_params=index_params,
|
|
372
374
|
domain=domain,
|
|
373
375
|
)
|
|
374
|
-
|
|
376
|
+
body = payload.model_dump(exclude_none=True)
|
|
377
|
+
resolved_token = sovereignty_token or self.sovereignty_token
|
|
378
|
+
if resolved_token:
|
|
379
|
+
body["sovereignty_token"] = resolved_token
|
|
380
|
+
data = await self._api_post("/collections", body, **kw)
|
|
375
381
|
res_data = data.get("data") if isinstance(data, dict) else None
|
|
376
382
|
if not isinstance(res_data, dict):
|
|
377
383
|
return CollectionInfo(name=name, dimension=dimension, metric_type=metric_type, index_type=index_type, domain=domain)
|
|
@@ -1083,6 +1089,7 @@ class AsyncVecminClient:
|
|
|
1083
1089
|
index_type: str = "HNSW",
|
|
1084
1090
|
index_params: Optional[Dict[str, Any]] = None,
|
|
1085
1091
|
domain: Optional[str] = "general",
|
|
1092
|
+
sovereignty_token: Optional[str] = None,
|
|
1086
1093
|
) -> bool:
|
|
1087
1094
|
"""Ensure a collection exists, creating it if necessary.
|
|
1088
1095
|
|
|
@@ -1096,6 +1103,7 @@ class AsyncVecminClient:
|
|
|
1096
1103
|
index_type: Index algorithm.
|
|
1097
1104
|
index_params: Algorithm parameters.
|
|
1098
1105
|
domain: Cognitive factuality domain.
|
|
1106
|
+
sovereignty_token: Sovereign domain access token forwarded to create_collection.
|
|
1099
1107
|
|
|
1100
1108
|
Returns:
|
|
1101
1109
|
``True`` if the collection exists or was created.
|
|
@@ -1120,6 +1128,7 @@ class AsyncVecminClient:
|
|
|
1120
1128
|
index_type=index_type,
|
|
1121
1129
|
index_params=index_params,
|
|
1122
1130
|
domain=domain,
|
|
1131
|
+
sovereignty_token=sovereignty_token,
|
|
1123
1132
|
)
|
|
1124
1133
|
return True
|
|
1125
1134
|
except Exception:
|
|
@@ -277,6 +277,7 @@ class VecminClient:
|
|
|
277
277
|
index_type: str = "HNSW",
|
|
278
278
|
index_params: Optional[Dict[str, Any]] = None,
|
|
279
279
|
domain: Optional[str] = "general",
|
|
280
|
+
sovereignty_token: Optional[str] = None,
|
|
280
281
|
**kw,
|
|
281
282
|
) -> CollectionInfo:
|
|
282
283
|
"""Create a new collection (``POST /api/v1/collections``)."""
|
|
@@ -285,7 +286,11 @@ class VecminClient:
|
|
|
285
286
|
index_type=index_type, index_params=index_params,
|
|
286
287
|
domain=domain,
|
|
287
288
|
)
|
|
288
|
-
|
|
289
|
+
body = payload.model_dump(exclude_none=True)
|
|
290
|
+
resolved_token = sovereignty_token or self.sovereignty_token
|
|
291
|
+
if resolved_token:
|
|
292
|
+
body["sovereignty_token"] = resolved_token
|
|
293
|
+
data = self._api_post("/collections", body, **kw)
|
|
289
294
|
res_data = data.get("data") if isinstance(data, dict) else None
|
|
290
295
|
if not isinstance(res_data, dict):
|
|
291
296
|
return CollectionInfo(name=name, dimension=dimension, metric_type=metric_type, index_type=index_type, domain=domain)
|
|
@@ -762,6 +767,7 @@ class VecminClient:
|
|
|
762
767
|
index_type: str = "HNSW",
|
|
763
768
|
index_params: Optional[Dict[str, Any]] = None,
|
|
764
769
|
domain: Optional[str] = "general",
|
|
770
|
+
sovereignty_token: Optional[str] = None,
|
|
765
771
|
) -> bool:
|
|
766
772
|
"""Ensure a collection exists, creating it if necessary.
|
|
767
773
|
|
|
@@ -772,6 +778,7 @@ class VecminClient:
|
|
|
772
778
|
index_type: Index algorithm.
|
|
773
779
|
index_params: Algorithm parameters.
|
|
774
780
|
domain: Cognitive factuality domain.
|
|
781
|
+
sovereignty_token: Sovereign domain access token forwarded to create_collection.
|
|
775
782
|
|
|
776
783
|
Returns:
|
|
777
784
|
``True`` if the collection exists or was created.
|
|
@@ -792,7 +799,7 @@ class VecminClient:
|
|
|
792
799
|
self.create_collection(
|
|
793
800
|
name, dimension=dimension, metric_type=metric_type,
|
|
794
801
|
index_type=index_type, index_params=index_params,
|
|
795
|
-
domain=domain,
|
|
802
|
+
domain=domain, sovereignty_token=sovereignty_token,
|
|
796
803
|
)
|
|
797
804
|
return True
|
|
798
805
|
except Exception:
|
|
@@ -46,6 +46,7 @@ class AgentMemoryManager:
|
|
|
46
46
|
metric_type=kwargs.get("metric_type", "Cosine"),
|
|
47
47
|
index_type=kwargs.get("index_type", "HNSW"),
|
|
48
48
|
domain=domain or "general",
|
|
49
|
+
sovereignty_token=self.sovereignty_token,
|
|
49
50
|
)
|
|
50
51
|
return VecminMemorySpace(
|
|
51
52
|
client=self.client,
|
|
@@ -86,6 +87,7 @@ class AsyncAgentMemoryManager:
|
|
|
86
87
|
metric_type=kwargs.get("metric_type", "Cosine"),
|
|
87
88
|
index_type=kwargs.get("index_type", "HNSW"),
|
|
88
89
|
domain=domain or "general",
|
|
90
|
+
sovereignty_token=self.sovereignty_token,
|
|
89
91
|
)
|
|
90
92
|
return AsyncVecminMemorySpace(
|
|
91
93
|
client=self.client,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|