projectdavid 1.34.4__py3-none-any.whl → 1.34.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.

Potentially problematic release.


This version of projectdavid might be problematic. Click here for more details.

@@ -151,12 +151,35 @@ class RunsClient(BaseAPIClient):
151
151
  def update_run(self, run_id: str, metadata: Dict[str, Any]) -> ent_validator.Run:
152
152
  """
153
153
  Shallow-merge metadata into a run. Returns the updated Run.
154
+
155
+ Server route expects body shaped as:
156
+ {"metadata": {...}}
157
+
158
+ Args:
159
+ run_id: The run ID (e.g., "run_abc123").
160
+ metadata: Dict to merge into run.meta_data.
161
+
162
+ Raises:
163
+ ValueError: if metadata is not a dict or validation fails.
164
+ httpx.HTTPStatusError: on non-2xx response.
165
+ Exception: on unexpected errors.
154
166
  """
155
167
  logging_utility.info("Updating metadata for run_id: %s", run_id)
168
+
169
+ # Basic input validation (fail fast with clear error)
170
+ if not isinstance(metadata, dict):
171
+ raise ValueError("`metadata` must be a dict")
172
+
156
173
  try:
157
- resp = self.client.put(f"/v1/runs/{run_id}/metadata", json=metadata)
174
+ resp = self.client.put(
175
+ f"/v1/runs/{run_id}/metadata",
176
+ json={"metadata": metadata}, # <-- wrap to match router param
177
+ )
158
178
  resp.raise_for_status()
179
+
180
+ # Validate server response to the shared model
159
181
  return ent_validator.Run(**resp.json())
182
+
160
183
  except ValidationError as e:
161
184
  logging_utility.error("Validation error: %s", e.json())
162
185
  raise ValueError(f"Validation error: {e}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: projectdavid
3
- Version: 1.34.4
3
+ Version: 1.34.5
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
@@ -15,7 +15,7 @@ projectdavid/clients/file_search.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
15
15
  projectdavid/clients/files_client.py,sha256=XkIDzbQFGDrd88taf0Kouc_4YJOPIYEHiIyWYLKDofI,15581
16
16
  projectdavid/clients/inference_client.py,sha256=xz4ACPv5Tkis604QxO5mJX1inH_TGDfQP-31geETYpE,6609
17
17
  projectdavid/clients/messages_client.py,sha256=-tUubr5f62nLER6BxVY3ihp3vn3pnZH-ceigvQRSlYs,16825
18
- projectdavid/clients/runs.py,sha256=lW2gYkMEfiddZYvsEMkdmbb2MFRP6rUpdkKG_020iy0,26772
18
+ projectdavid/clients/runs.py,sha256=xXht0tq-nnpuajy_D52STXBvpOdPanaiC5hQZ8cV7zo,27484
19
19
  projectdavid/clients/synchronous_inference_wrapper.py,sha256=qh94rtNlLqgIxiA_ZbQ1ncOwQTi9aBj5os3sMExLh4E,7070
20
20
  projectdavid/clients/threads_client.py,sha256=9RshJD09kfYxfarTysQz_Bwbv4XxQaHQXhCLRMdaWcI,7392
21
21
  projectdavid/clients/tools_client.py,sha256=GkCVOmwpAoPqVt6aYmH0G1HIFha3iEwR9IIf9teR0j8,11487
@@ -37,8 +37,8 @@ projectdavid/utils/monitor_launcher.py,sha256=3YAgJdeuaUvq3JGvpA4ymqFsAnk29nH5q9
37
37
  projectdavid/utils/peek_gate.py,sha256=5whMRnDOQjATRpThWDJkvY9ScXuJ7Sd_-9rvGgXeTAQ,2532
38
38
  projectdavid/utils/run_monitor.py,sha256=F_WkqIP-qnWH-4llIbileWWLfRj2Q1Cg-ni23SR1rec,3786
39
39
  projectdavid/utils/vector_search_formatter.py,sha256=YTe3HPGec26qGY7uxY8_GS8lc4QaN6aNXMzkl29nZpI,1735
40
- projectdavid-1.34.4.dist-info/licenses/LICENSE,sha256=_8yjiEGttpS284BkfhXxfERqTRZW_tUaHiBB0GTJTMg,4563
41
- projectdavid-1.34.4.dist-info/METADATA,sha256=DptMF63609KaYskIGlnnmpyCFrvK0jGkfBCxXCP2ImI,11555
42
- projectdavid-1.34.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
43
- projectdavid-1.34.4.dist-info/top_level.txt,sha256=kil8GU4s7qYRfNnzGnFHhZnSNRSxgNG-J4HLgQMmMtw,13
44
- projectdavid-1.34.4.dist-info/RECORD,,
40
+ projectdavid-1.34.5.dist-info/licenses/LICENSE,sha256=_8yjiEGttpS284BkfhXxfERqTRZW_tUaHiBB0GTJTMg,4563
41
+ projectdavid-1.34.5.dist-info/METADATA,sha256=ojM3YNfuQSBRm0EqQ-BoSDQvp6sgxaskcktX4EMJ-5g,11555
42
+ projectdavid-1.34.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
43
+ projectdavid-1.34.5.dist-info/top_level.txt,sha256=kil8GU4s7qYRfNnzGnFHhZnSNRSxgNG-J4HLgQMmMtw,13
44
+ projectdavid-1.34.5.dist-info/RECORD,,