projectdavid 1.33.2__py3-none-any.whl → 1.33.4__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.

@@ -113,17 +113,21 @@ class SynchronousInferenceStream:
113
113
  yield chunk
114
114
  continue
115
115
 
116
- if chunk.get("type") in ("hot_code", "hot_code_output"):
116
+ if chunk.get("type") == "code_interpreter_stream":
117
117
  yield chunk
118
118
  continue
119
119
 
120
- if (
121
- chunk.get("stream_type") == "code_execution"
122
- and chunk.get("chunk", {}).get("type") == "code_interpreter_stream"
123
- ):
120
+ if chunk.get("type") in ("hot_code", "hot_code_output"):
124
121
  yield chunk
125
122
  continue
126
123
 
124
+ # if (
125
+ # chunk.get("stream_type") == "code_execution"
126
+ # and chunk.get("chunk", {}).get("type") == "code_interpreter_stream"
127
+ # ):
128
+ # yield chunk
129
+ # continue
130
+
127
131
  if isinstance(chunk.get("content"), str):
128
132
  chunk["content"] = _filter_text(chunk["content"])
129
133
  if chunk["content"] == "":
@@ -20,6 +20,7 @@ from qdrant_client.http import models as qdrant
20
20
 
21
21
  from projectdavid.clients.file_processor import FileProcessor
22
22
  from projectdavid.clients.vector_store_manager import VectorStoreManager
23
+ from projectdavid.decorators import experimental
23
24
  from projectdavid.synthesis import reranker, retriever
24
25
  from projectdavid.synthesis.llm_synthesizer import synthesize_envelope
25
26
  from projectdavid.utils.vector_search_formatter import make_envelope
@@ -504,6 +505,7 @@ class VectorStoreClient:
504
505
  )
505
506
  )
506
507
 
508
+ @experimental
507
509
  def create_vector_vision_store(
508
510
  self,
509
511
  name: str,
@@ -544,6 +546,7 @@ class VectorStoreClient:
544
546
  )
545
547
  )
546
548
 
549
+ @experimental
547
550
  def create_vector_vision_store_for_user(
548
551
  self,
549
552
  owner_id: str,
@@ -964,6 +967,7 @@ class VectorStoreClient:
964
967
 
965
968
  return hits
966
969
 
970
+ @experimental
967
971
  def image_similarity_search(
968
972
  self,
969
973
  vector_store_id: str,
@@ -981,6 +985,7 @@ class VectorStoreClient:
981
985
  vector_field="image_vector",
982
986
  )
983
987
 
988
+ @experimental
984
989
  def search_images(
985
990
  self,
986
991
  vector_store_id: str,
@@ -0,0 +1,64 @@
1
+ # decorators.py
2
+
3
+ import functools
4
+ import warnings
5
+ from typing import Optional
6
+
7
+
8
+ class ExperimentalWarning(UserWarning):
9
+ """
10
+ API is experimental, may be incomplete (and possibly not fully functional),
11
+ and may change or be removed without notice.
12
+ """
13
+
14
+
15
+ class InternalWarning(UserWarning):
16
+ """
17
+ API is internal/admin-only. Intended for framework authors and
18
+ superusers—will likely change or go away without notice.
19
+ """
20
+
21
+
22
+ def experimental(func):
23
+ """
24
+ Decorator to mark methods as experimental.
25
+ Emits an ExperimentalWarning on first call.
26
+ """
27
+
28
+ @functools.wraps(func)
29
+ def wrapper(*args, **kwargs):
30
+ warnings.warn(
31
+ f"{func.__name__} is experimental, may be incomplete, and may change in a future release",
32
+ ExperimentalWarning,
33
+ stacklevel=2,
34
+ )
35
+ return func(*args, **kwargs)
36
+
37
+ wrapper.__experimental__ = True
38
+ return wrapper
39
+
40
+
41
+ def internal(func):
42
+ """
43
+ Decorator to mark a method as internal/admin-only.
44
+ Raises PermissionError if self.is_admin is False or missing.
45
+ Emits an InternalWarning on use.
46
+ """
47
+
48
+ @functools.wraps(func)
49
+ def wrapper(self, *args, **kwargs):
50
+ # 1️⃣ Enforce admin
51
+ if not getattr(self, "is_admin", False):
52
+ raise PermissionError(
53
+ f"{func.__name__} is for admin use only; your client.is_admin is False."
54
+ )
55
+ # 2️⃣ Warn about internal usage
56
+ warnings.warn(
57
+ f"{func.__name__} is internal/admin-only and may change without notice",
58
+ InternalWarning,
59
+ stacklevel=2,
60
+ )
61
+ return func(self, *args, **kwargs)
62
+
63
+ wrapper.__internal__ = True
64
+ return wrapper
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: projectdavid
3
- Version: 1.33.2
3
+ Version: 1.33.4
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
@@ -1,5 +1,6 @@
1
1
  projectdavid/__init__.py,sha256=QKjYL0-e4ifiRWyp05lK_dGm0u_jaxo36fyF-c0qqeI,224
2
2
  projectdavid/_version.py,sha256=_qiy4uXbgWEU-in9CM9h6tk4Ddhzpvv-HnoAYSuiGg0,100
3
+ projectdavid/decorators.py,sha256=xwjzSNJdg8pOeicdtWEeJeuwAwfrWfM2_cH9tI5O-l0,1730
3
4
  projectdavid/entity.py,sha256=SRZg3E9Cifz3O0Ax4FNeWXWSgOZFKUBzLYtdjbH-e_w,5832
4
5
  projectdavid/events.py,sha256=m_vu5BgphrM6dpBmnkTXK8jczwyYXO1UwXXI9340vjQ,720
5
6
  projectdavid/serializers.py,sha256=OdipJGXGGjRoZBcPkpmHSDgsNptXUg0CMn2TQoCZIOI,1723
@@ -15,12 +16,12 @@ projectdavid/clients/files_client.py,sha256=XkIDzbQFGDrd88taf0Kouc_4YJOPIYEHiIyW
15
16
  projectdavid/clients/inference_client.py,sha256=xz4ACPv5Tkis604QxO5mJX1inH_TGDfQP-31geETYpE,6609
16
17
  projectdavid/clients/messages_client.py,sha256=467xeIt3VYs6cG8-bl-eDRi_auWOPmfd5tSJDmQSJUI,17232
17
18
  projectdavid/clients/runs.py,sha256=-fXOq5L9w2efDPmZkNxb0s2yjl6oN0XN4_aLXqaeceo,25270
18
- projectdavid/clients/synchronous_inference_wrapper.py,sha256=mN5WAHmv0aRoeMIb7XPgv3cuqrMPzu378UsZ02jEvRY,5090
19
+ projectdavid/clients/synchronous_inference_wrapper.py,sha256=Ll8t_dyJjuEKLxnWBi8hqMSvpW_qhh9IpkVDpHpxvlE,5227
19
20
  projectdavid/clients/threads_client.py,sha256=ekzU5w14zftmtmFkiec3NC90Of-_KVSUY1qH9cmfSFg,6771
20
21
  projectdavid/clients/tools_client.py,sha256=GkCVOmwpAoPqVt6aYmH0G1HIFha3iEwR9IIf9teR0j8,11487
21
22
  projectdavid/clients/users_client.py,sha256=eCuUb9qvyH1GUFhZu6TRL9zdoK-qzHSs8-Vmrk_0mmg,13729
22
23
  projectdavid/clients/vector_store_manager.py,sha256=q-ZgRQVX_S3nMrKYhmvkVrDjDRzM3ZFzUF55HBGRTe8,12861
23
- projectdavid/clients/vectors.py,sha256=co6CStRnsWk0yO5EyH5AV2c9vMYaGk3VAwIQD4Y-N20,40108
24
+ projectdavid/clients/vectors.py,sha256=cysPVbUzW3byB82MTqG2X1Iz5ZAe82WTS1JfQcoqVhE,40229
24
25
  projectdavid/constants/platform.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
26
  projectdavid/services/logging_service.py,sha256=jdoRL46E42Ar8JFTDOV-xVD67CulcHSN-xhcEqA5CXQ,2643
26
27
  projectdavid/synthesis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -34,8 +35,8 @@ projectdavid/utils/monitor_launcher.py,sha256=3YAgJdeuaUvq3JGvpA4ymqFsAnk29nH5q9
34
35
  projectdavid/utils/peek_gate.py,sha256=5whMRnDOQjATRpThWDJkvY9ScXuJ7Sd_-9rvGgXeTAQ,2532
35
36
  projectdavid/utils/run_monitor.py,sha256=F_WkqIP-qnWH-4llIbileWWLfRj2Q1Cg-ni23SR1rec,3786
36
37
  projectdavid/utils/vector_search_formatter.py,sha256=YTe3HPGec26qGY7uxY8_GS8lc4QaN6aNXMzkl29nZpI,1735
37
- projectdavid-1.33.2.dist-info/licenses/LICENSE,sha256=_8yjiEGttpS284BkfhXxfERqTRZW_tUaHiBB0GTJTMg,4563
38
- projectdavid-1.33.2.dist-info/METADATA,sha256=AXinjpf8D5k2ySQ7SE_roXMsr8SaPHlklAYwXW6cjG0,11554
39
- projectdavid-1.33.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
40
- projectdavid-1.33.2.dist-info/top_level.txt,sha256=kil8GU4s7qYRfNnzGnFHhZnSNRSxgNG-J4HLgQMmMtw,13
41
- projectdavid-1.33.2.dist-info/RECORD,,
38
+ projectdavid-1.33.4.dist-info/licenses/LICENSE,sha256=_8yjiEGttpS284BkfhXxfERqTRZW_tUaHiBB0GTJTMg,4563
39
+ projectdavid-1.33.4.dist-info/METADATA,sha256=S5dDCeIzHHNHzmmw4uAouBr1jJK-P-MUrPhxp0n1v7Q,11554
40
+ projectdavid-1.33.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
41
+ projectdavid-1.33.4.dist-info/top_level.txt,sha256=kil8GU4s7qYRfNnzGnFHhZnSNRSxgNG-J4HLgQMmMtw,13
42
+ projectdavid-1.33.4.dist-info/RECORD,,