projectdavid 1.34.13__py3-none-any.whl → 1.35.0__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/runs.py +13 -4
- {projectdavid-1.34.13.dist-info → projectdavid-1.35.0.dist-info}/METADATA +2 -2
- {projectdavid-1.34.13.dist-info → projectdavid-1.35.0.dist-info}/RECORD +6 -6
- {projectdavid-1.34.13.dist-info → projectdavid-1.35.0.dist-info}/WHEEL +0 -0
- {projectdavid-1.34.13.dist-info → projectdavid-1.35.0.dist-info}/licenses/LICENSE +0 -0
- {projectdavid-1.34.13.dist-info → projectdavid-1.35.0.dist-info}/top_level.txt +0 -0
projectdavid/clients/runs.py
CHANGED
|
@@ -50,6 +50,8 @@ class RunsClient(BaseAPIClient):
|
|
|
50
50
|
tool_choice: Optional[str] = None, # allow None in signature, fix below
|
|
51
51
|
temperature: float = 1.0,
|
|
52
52
|
top_p: float = 1.0,
|
|
53
|
+
# ↓ NEW: optional; only sent if provided
|
|
54
|
+
truncation_strategy: Optional[ent_validator.TruncationStrategy] = None,
|
|
53
55
|
) -> ent_validator.Run:
|
|
54
56
|
"""
|
|
55
57
|
Create a run. The server injects user_id from the API key.
|
|
@@ -88,22 +90,29 @@ class RunsClient(BaseAPIClient):
|
|
|
88
90
|
# use schema enum; queued is also valid if you prefer
|
|
89
91
|
tool_choice=tool_choice,
|
|
90
92
|
tools=[],
|
|
91
|
-
truncation_strategy
|
|
93
|
+
# NOTE: do NOT set truncation_strategy here; only if provided below
|
|
92
94
|
usage=None,
|
|
93
95
|
temperature=temperature,
|
|
94
96
|
top_p=top_p,
|
|
95
97
|
tool_resources={},
|
|
96
98
|
)
|
|
97
99
|
|
|
100
|
+
# If caller explicitly provided truncation_strategy, set it; else omit so DB default fires
|
|
101
|
+
if truncation_strategy is not None:
|
|
102
|
+
run_payload.truncation_strategy = truncation_strategy
|
|
103
|
+
|
|
98
104
|
logging_utility.info(
|
|
99
105
|
"Creating run for assistant_id=%s, thread_id=%s", assistant_id, thread_id
|
|
100
106
|
)
|
|
101
107
|
logging_utility.debug("Run payload: %s", run_payload.model_dump())
|
|
102
108
|
|
|
103
109
|
try:
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
110
|
+
# Build dict; if truncation_strategy wasn't provided, drop it so DB default applies
|
|
111
|
+
payload_dict = run_payload.model_dump(exclude_none=True)
|
|
112
|
+
if truncation_strategy is None:
|
|
113
|
+
payload_dict.pop("truncation_strategy", None)
|
|
114
|
+
|
|
115
|
+
resp = self.client.post("/v1/runs", json=payload_dict)
|
|
107
116
|
resp.raise_for_status()
|
|
108
117
|
run_out = ent_validator.Run(**resp.json())
|
|
109
118
|
logging_utility.info("Run created successfully: %s", run_out.id)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: projectdavid
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.35.0
|
|
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
|
|
@@ -20,7 +20,7 @@ Requires-Dist: pydantic<3.0,>=2.0
|
|
|
20
20
|
Requires-Dist: python-dotenv<2.0,>=1.0.1
|
|
21
21
|
Requires-Dist: aiofiles<25.0,>=23.2.1
|
|
22
22
|
Requires-Dist: ollama<0.5.0,>=0.4.4
|
|
23
|
-
Requires-Dist: projectdavid_common==0.
|
|
23
|
+
Requires-Dist: projectdavid_common==0.18.0
|
|
24
24
|
Requires-Dist: qdrant-client<2.0.0,>=1.0.0
|
|
25
25
|
Requires-Dist: pdfplumber<0.12.0,>=0.11.0
|
|
26
26
|
Requires-Dist: validators<0.35.0,>=0.29.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=
|
|
18
|
+
projectdavid/clients/runs.py,sha256=D6FimyLKhw6yKjOBdlcO78sqJ2i-5F05IGc-ZnW39Q0,27060
|
|
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.
|
|
41
|
-
projectdavid-1.
|
|
42
|
-
projectdavid-1.
|
|
43
|
-
projectdavid-1.
|
|
44
|
-
projectdavid-1.
|
|
40
|
+
projectdavid-1.35.0.dist-info/licenses/LICENSE,sha256=_8yjiEGttpS284BkfhXxfERqTRZW_tUaHiBB0GTJTMg,4563
|
|
41
|
+
projectdavid-1.35.0.dist-info/METADATA,sha256=2Fg0fIvfxMvATqoesvhYOc5eCEYhSa7FmSr49z2beXI,11554
|
|
42
|
+
projectdavid-1.35.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
43
|
+
projectdavid-1.35.0.dist-info/top_level.txt,sha256=kil8GU4s7qYRfNnzGnFHhZnSNRSxgNG-J4HLgQMmMtw,13
|
|
44
|
+
projectdavid-1.35.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|