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

@@ -608,7 +608,62 @@ class RunsClient(BaseAPIClient):
608
608
  t.start()
609
609
  t.join()
610
610
 
611
+ # ------------------------------------------------------------
612
+ # These are helpers that build the run lists
613
+ # ------------------------------------------------------------
614
+ def list_runs_enveloped(
615
+ self, limit: int = 20, order: str = "asc"
616
+ ) -> ent_validator.RunListResponse:
617
+ params = {"limit": limit, "order": order if order in ("asc", "desc") else "asc"}
618
+ resp = self.client.get("/v1/runs", params=params)
619
+ resp.raise_for_status()
620
+ payload = resp.json()
621
+ if isinstance(payload, dict) and "data" in payload:
622
+ return ent_validator.RunListResponse(**payload)
623
+ # legacy fallback: wrap raw list
624
+ runs = [ent_validator.Run(**item) for item in payload]
625
+ return ent_validator.RunListResponse(
626
+ object="list",
627
+ data=runs,
628
+ first_id=runs[0].id if runs else None,
629
+ last_id=runs[-1].id if runs else None,
630
+ has_more=False,
631
+ )
632
+
633
+ def list_runs_for_thread_enveloped(
634
+ self, thread_id: str, limit: int = 20, order: str = "asc"
635
+ ) -> ent_validator.RunListResponse:
636
+ params = {"limit": limit, "order": order if order in ("asc", "desc") else "asc"}
637
+ resp = self.client.get(f"/v1/threads/{thread_id}/runs", params=params)
638
+ resp.raise_for_status()
639
+ payload = resp.json()
640
+ if isinstance(payload, dict) and "data" in payload:
641
+ return ent_validator.RunListResponse(**payload)
642
+ runs = [ent_validator.Run(**item) for item in payload]
643
+ return ent_validator.RunListResponse(
644
+ object="list",
645
+ data=runs,
646
+ first_id=runs[0].id if runs else None,
647
+ last_id=runs[-1].id if runs else None,
648
+ has_more=False,
649
+ )
650
+
611
651
  def list_runs(self, limit: int = 20, order: str = "asc") -> List[ent_validator.Run]:
652
+ # soft-deprecate in logs if you want
653
+ env = self.list_runs_enveloped(limit=limit, order=order)
654
+ return list(env.data)
655
+
656
+ def list_runs_for_thread(
657
+ self, thread_id: str, limit: int = 20, order: str = "asc"
658
+ ) -> List[ent_validator.Run]:
659
+ env = self.list_runs_for_thread_enveloped(
660
+ thread_id=thread_id, limit=limit, order=order
661
+ )
662
+ return list(env.data)
663
+
664
+ def list_runsX(
665
+ self, limit: int = 20, order: str = "asc"
666
+ ) -> List[ent_validator.Run]:
612
667
 
613
668
  logging_utility.info("Listing runs with limit: %d, order: %s", limit, order)
614
669
  params = {"limit": limit, "order": order if order in ("asc", "desc") else "asc"}
@@ -638,7 +693,7 @@ class RunsClient(BaseAPIClient):
638
693
  logging_utility.error("An error occurred while listing runs: %s", str(e))
639
694
  raise
640
695
 
641
- def list_runs_with_meta(
696
+ def list_runs_with_metaX(
642
697
  self, limit: int = 20, order: str = "asc"
643
698
  ) -> Tuple[List[ent_validator.Run], Optional[str], Optional[str], bool]:
644
699
  """
@@ -671,7 +726,7 @@ class RunsClient(BaseAPIClient):
671
726
  logging_utility.error("An error occurred while listing runs: %s", str(e))
672
727
  raise
673
728
 
674
- def list_runs_for_thread(
729
+ def list_runs_for_threadX(
675
730
  self, thread_id: str, limit: int = 20, order: str = "asc"
676
731
  ) -> List[ent_validator.Run]:
677
732
  logging_utility.info(
@@ -709,7 +764,7 @@ class RunsClient(BaseAPIClient):
709
764
  logging_utility.error("Error listing runs for thread: %s", str(e))
710
765
  raise
711
766
 
712
- def list_runs_for_thread_with_meta(
767
+ def list_runs_for_thread_with_metaX(
713
768
  self, thread_id: str, limit: int = 20, order: str = "asc"
714
769
  ) -> Tuple[List[ent_validator.Run], Optional[str], Optional[str], bool]:
715
770
  logging_utility.info(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: projectdavid
3
- Version: 1.34.1
3
+ Version: 1.34.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
@@ -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=8VcFGxIcmbps8tU6wU04dUhY1C-H3ANqsCUxvlaek3c,29816
18
+ projectdavid/clients/runs.py,sha256=23pTcTRjuvEnBRpveFVeYQD8B-2SAsJjKqVrhmHq5ts,32112
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.1.dist-info/licenses/LICENSE,sha256=_8yjiEGttpS284BkfhXxfERqTRZW_tUaHiBB0GTJTMg,4563
41
- projectdavid-1.34.1.dist-info/METADATA,sha256=jchbM5nC79y5gst-0lB0qZA39ilaKdMnU_e2PC0F2PM,11555
42
- projectdavid-1.34.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
43
- projectdavid-1.34.1.dist-info/top_level.txt,sha256=kil8GU4s7qYRfNnzGnFHhZnSNRSxgNG-J4HLgQMmMtw,13
44
- projectdavid-1.34.1.dist-info/RECORD,,
40
+ projectdavid-1.34.2.dist-info/licenses/LICENSE,sha256=_8yjiEGttpS284BkfhXxfERqTRZW_tUaHiBB0GTJTMg,4563
41
+ projectdavid-1.34.2.dist-info/METADATA,sha256=yt-iVqj07cA22xv_rGkVk7poOsKbPiaDwRiaK3Qru4Y,11555
42
+ projectdavid-1.34.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
43
+ projectdavid-1.34.2.dist-info/top_level.txt,sha256=kil8GU4s7qYRfNnzGnFHhZnSNRSxgNG-J4HLgQMmMtw,13
44
+ projectdavid-1.34.2.dist-info/RECORD,,