projectdavid 1.30.1__py3-none-any.whl → 1.30.2__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.
Potentially problematic release.
This version of projectdavid might be problematic. Click here for more details.
- projectdavid/clients/file_processor.py +0 -1
- projectdavid/clients/vectors.py +42 -14
- {projectdavid-1.30.1.dist-info → projectdavid-1.30.2.dist-info}/METADATA +1 -1
- {projectdavid-1.30.1.dist-info → projectdavid-1.30.2.dist-info}/RECORD +7 -7
- {projectdavid-1.30.1.dist-info → projectdavid-1.30.2.dist-info}/WHEEL +0 -0
- {projectdavid-1.30.1.dist-info → projectdavid-1.30.2.dist-info}/licenses/LICENSE +0 -0
- {projectdavid-1.30.1.dist-info → projectdavid-1.30.2.dist-info}/top_level.txt +0 -0
projectdavid/clients/vectors.py
CHANGED
|
@@ -454,6 +454,48 @@ class VectorStoreClient:
|
|
|
454
454
|
)
|
|
455
455
|
)
|
|
456
456
|
|
|
457
|
+
# ───────────────────────────────────────────────────────────────
|
|
458
|
+
# Convenience: ensure a per-user “file_search” store exists
|
|
459
|
+
# ───────────────────────────────────────────────────────────────
|
|
460
|
+
# unchanged … (get_or_create_file_search_store)
|
|
461
|
+
|
|
462
|
+
def list_my_vector_stores(self) -> List[ValidationInterface.VectorStoreRead]:
|
|
463
|
+
"""List all non-deleted stores owned by *this* API-key’s user."""
|
|
464
|
+
return self._run_sync(self._list_my_vs_async())
|
|
465
|
+
|
|
466
|
+
# ───────────────────────────────────────────────────────────────
|
|
467
|
+
# NEW: real per-user listing (admin-only)
|
|
468
|
+
# ───────────────────────────────────────────────────────────────
|
|
469
|
+
async def _list_vs_by_user_async(
|
|
470
|
+
self, user_id: str
|
|
471
|
+
) -> List[ValidationInterface.VectorStoreRead]:
|
|
472
|
+
"""
|
|
473
|
+
Admin-scope helper – fetch every (non-deleted) vector-store
|
|
474
|
+
belonging to **user_id**.
|
|
475
|
+
"""
|
|
476
|
+
resp = await self._request(
|
|
477
|
+
"GET",
|
|
478
|
+
"/v1/vector-stores",
|
|
479
|
+
params={"owner_id": user_id},
|
|
480
|
+
)
|
|
481
|
+
return [ValidationInterface.VectorStoreRead.model_validate(r) for r in resp]
|
|
482
|
+
|
|
483
|
+
def get_stores_by_user(
|
|
484
|
+
self,
|
|
485
|
+
_user_id: str,
|
|
486
|
+
) -> List[ValidationInterface.VectorStoreRead]: # noqa: ARG002
|
|
487
|
+
"""
|
|
488
|
+
⚠️ **Deprecated** – prefer impersonating the user’s API-key or using
|
|
489
|
+
the newer RBAC endpoints, but keep working for legacy code.
|
|
490
|
+
"""
|
|
491
|
+
warnings.warn(
|
|
492
|
+
"`get_stores_by_user()` is deprecated; use `list_my_vector_stores()` or "
|
|
493
|
+
"`VectorStoreClient(list_my_vector_stores)` with an impersonated key.",
|
|
494
|
+
DeprecationWarning,
|
|
495
|
+
stacklevel=2,
|
|
496
|
+
)
|
|
497
|
+
return self._run_sync(self._list_vs_by_user_async(_user_id))
|
|
498
|
+
|
|
457
499
|
# ───────────────────────────────────────────────────────────────
|
|
458
500
|
# Convenience: ensure a per-user “file_search” store exists
|
|
459
501
|
# ───────────────────────────────────────────────────────────────
|
|
@@ -514,20 +556,6 @@ class VectorStoreClient:
|
|
|
514
556
|
)
|
|
515
557
|
return new_store.id
|
|
516
558
|
|
|
517
|
-
def list_my_vector_stores(self) -> List[ValidationInterface.VectorStoreRead]:
|
|
518
|
-
"""List all non-deleted stores owned by the caller."""
|
|
519
|
-
return self._run_sync(self._list_my_vs_async())
|
|
520
|
-
|
|
521
|
-
def get_stores_by_user(
|
|
522
|
-
self, _user_id: str
|
|
523
|
-
) -> List[ValidationInterface.VectorStoreRead]: # noqa: ARG002
|
|
524
|
-
warnings.warn(
|
|
525
|
-
"`get_stores_by_user()` is deprecated; use `list_my_vector_stores()`.",
|
|
526
|
-
DeprecationWarning,
|
|
527
|
-
stacklevel=2,
|
|
528
|
-
)
|
|
529
|
-
return self.list_my_vector_stores()
|
|
530
|
-
|
|
531
559
|
def add_file_to_vector_store(
|
|
532
560
|
self,
|
|
533
561
|
vector_store_id: str,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: projectdavid
|
|
3
|
-
Version: 1.30.
|
|
3
|
+
Version: 1.30.2
|
|
4
4
|
Summary: Python SDK for interacting with the Entities Assistant API.
|
|
5
5
|
Author-email: Francis Neequaye Armah <francis.neequaye@projectdavid.co.uk>
|
|
6
6
|
License: PolyForm Noncommercial License 1.0.0
|
|
@@ -9,7 +9,7 @@ projectdavid/clients/assistants_client.py,sha256=SsIGa5wPr7ga9WX0ywam3djUF-uWFdk
|
|
|
9
9
|
projectdavid/clients/base_client.py,sha256=UWl6nr6sxD1_xC6iyptQDR1tnNdFCOrEx5cEUPCRqJE,3417
|
|
10
10
|
projectdavid/clients/base_vector_store.py,sha256=jXivmqAW1bgYcLgIeW-hPxOiWZbs2hCsLy4oWzSvpNI,2061
|
|
11
11
|
projectdavid/clients/event_handler.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
|
-
projectdavid/clients/file_processor.py,sha256=
|
|
12
|
+
projectdavid/clients/file_processor.py,sha256=97MYqpBcQOsPf1hiylPrNo0rJXBNMdSAP7JyAEC0nC0,9941
|
|
13
13
|
projectdavid/clients/file_search.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
14
|
projectdavid/clients/files_client.py,sha256=XkIDzbQFGDrd88taf0Kouc_4YJOPIYEHiIyWYLKDofI,15581
|
|
15
15
|
projectdavid/clients/inference_client.py,sha256=xz4ACPv5Tkis604QxO5mJX1inH_TGDfQP-31geETYpE,6609
|
|
@@ -20,7 +20,7 @@ projectdavid/clients/threads_client.py,sha256=ekzU5w14zftmtmFkiec3NC90Of-_KVSUY1
|
|
|
20
20
|
projectdavid/clients/tools_client.py,sha256=GkCVOmwpAoPqVt6aYmH0G1HIFha3iEwR9IIf9teR0j8,11487
|
|
21
21
|
projectdavid/clients/users_client.py,sha256=eCuUb9qvyH1GUFhZu6TRL9zdoK-qzHSs8-Vmrk_0mmg,13729
|
|
22
22
|
projectdavid/clients/vector_store_manager.py,sha256=lk-sWJjo6Z0EHZzjRoKiHPr0GpEXfE4bJBQzmKV8ezc,11372
|
|
23
|
-
projectdavid/clients/vectors.py,sha256=
|
|
23
|
+
projectdavid/clients/vectors.py,sha256=WqRkTXPvAK6vMA-dgCxKvZ_71bSS3YEMdkXuA9LlC4o,31159
|
|
24
24
|
projectdavid/constants/platform.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
25
|
projectdavid/services/logging_service.py,sha256=jdoRL46E42Ar8JFTDOV-xVD67CulcHSN-xhcEqA5CXQ,2643
|
|
26
26
|
projectdavid/synthesis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -32,8 +32,8 @@ projectdavid/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
|
|
|
32
32
|
projectdavid/utils/monitor_launcher.py,sha256=3YAgJdeuaUvq3JGvpA4ymqFsAnk29nH5q93cwStP4hc,2836
|
|
33
33
|
projectdavid/utils/run_monitor.py,sha256=F_WkqIP-qnWH-4llIbileWWLfRj2Q1Cg-ni23SR1rec,3786
|
|
34
34
|
projectdavid/utils/vector_search_formatter.py,sha256=YTe3HPGec26qGY7uxY8_GS8lc4QaN6aNXMzkl29nZpI,1735
|
|
35
|
-
projectdavid-1.30.
|
|
36
|
-
projectdavid-1.30.
|
|
37
|
-
projectdavid-1.30.
|
|
38
|
-
projectdavid-1.30.
|
|
39
|
-
projectdavid-1.30.
|
|
35
|
+
projectdavid-1.30.2.dist-info/licenses/LICENSE,sha256=_8yjiEGttpS284BkfhXxfERqTRZW_tUaHiBB0GTJTMg,4563
|
|
36
|
+
projectdavid-1.30.2.dist-info/METADATA,sha256=h9MXTZZF7rG8oiCjDv6qZy5ERVBR3U7X_Cv0HFUvSQ0,10727
|
|
37
|
+
projectdavid-1.30.2.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
|
38
|
+
projectdavid-1.30.2.dist-info/top_level.txt,sha256=kil8GU4s7qYRfNnzGnFHhZnSNRSxgNG-J4HLgQMmMtw,13
|
|
39
|
+
projectdavid-1.30.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|