projectdavid 1.36.0__py3-none-any.whl → 1.36.1__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 +7 -10
- {projectdavid-1.36.0.dist-info → projectdavid-1.36.1.dist-info}/METADATA +1 -1
- {projectdavid-1.36.0.dist-info → projectdavid-1.36.1.dist-info}/RECORD +6 -6
- {projectdavid-1.36.0.dist-info → projectdavid-1.36.1.dist-info}/WHEEL +0 -0
- {projectdavid-1.36.0.dist-info → projectdavid-1.36.1.dist-info}/licenses/LICENSE +0 -0
- {projectdavid-1.36.0.dist-info → projectdavid-1.36.1.dist-info}/top_level.txt +0 -0
projectdavid/clients/runs.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
#!!Python
|
|
1
2
|
import json
|
|
2
3
|
import threading
|
|
3
4
|
import time
|
|
@@ -80,37 +81,33 @@ class RunsClient(BaseAPIClient):
|
|
|
80
81
|
last_error=None,
|
|
81
82
|
max_completion_tokens=1000,
|
|
82
83
|
max_prompt_tokens=500,
|
|
83
|
-
model=model,
|
|
84
|
+
model=model,
|
|
84
85
|
object="run",
|
|
85
86
|
parallel_tool_calls=False,
|
|
86
87
|
required_action=None,
|
|
87
88
|
response_format=response_format,
|
|
88
89
|
started_at=None,
|
|
89
90
|
status=ent_validator.RunStatus.pending,
|
|
90
|
-
# use schema enum; queued is also valid if you prefer
|
|
91
91
|
tool_choice=tool_choice,
|
|
92
92
|
tools=[],
|
|
93
|
-
# NOTE: do NOT set truncation_strategy here; only if provided below
|
|
94
93
|
usage=None,
|
|
95
94
|
temperature=temperature,
|
|
96
95
|
top_p=top_p,
|
|
97
96
|
tool_resources={},
|
|
97
|
+
# Directly pass the truncation_strategy. It will be None if not provided.
|
|
98
|
+
truncation_strategy=truncation_strategy,
|
|
98
99
|
)
|
|
99
100
|
|
|
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
|
-
|
|
104
101
|
logging_utility.info(
|
|
105
102
|
"Creating run for assistant_id=%s, thread_id=%s", assistant_id, thread_id
|
|
106
103
|
)
|
|
107
104
|
logging_utility.debug("Run payload: %s", run_payload.model_dump())
|
|
108
105
|
|
|
109
106
|
try:
|
|
110
|
-
# Build dict
|
|
107
|
+
# Build dict from the Pydantic model. `exclude_none=True` will
|
|
108
|
+
# automatically omit `truncation_strategy` if it is None, allowing
|
|
109
|
+
# the server-side database default to apply.
|
|
111
110
|
payload_dict = run_payload.model_dump(exclude_none=True)
|
|
112
|
-
if truncation_strategy is None:
|
|
113
|
-
payload_dict.pop("truncation_strategy", None)
|
|
114
111
|
|
|
115
112
|
resp = self.client.post("/v1/runs", json=payload_dict)
|
|
116
113
|
resp.raise_for_status()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: projectdavid
|
|
3
|
-
Version: 1.36.
|
|
3
|
+
Version: 1.36.1
|
|
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=
|
|
18
|
+
projectdavid/clients/runs.py,sha256=WNgaGnZmtmw8FMtSH5FY4LP9SZdJwdNifBbjGsXC8qM,26827
|
|
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.36.
|
|
41
|
-
projectdavid-1.36.
|
|
42
|
-
projectdavid-1.36.
|
|
43
|
-
projectdavid-1.36.
|
|
44
|
-
projectdavid-1.36.
|
|
40
|
+
projectdavid-1.36.1.dist-info/licenses/LICENSE,sha256=_8yjiEGttpS284BkfhXxfERqTRZW_tUaHiBB0GTJTMg,4563
|
|
41
|
+
projectdavid-1.36.1.dist-info/METADATA,sha256=Sq9hLfKfeSSikD3by-y-yOHyXRNRSHB6nlkMDaLB2NU,11554
|
|
42
|
+
projectdavid-1.36.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
43
|
+
projectdavid-1.36.1.dist-info/top_level.txt,sha256=kil8GU4s7qYRfNnzGnFHhZnSNRSxgNG-J4HLgQMmMtw,13
|
|
44
|
+
projectdavid-1.36.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|