together 1.5.24__py3-none-any.whl → 1.5.25__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.
- together/resources/batch.py +30 -0
- together/types/batch.py +1 -0
- {together-1.5.24.dist-info → together-1.5.25.dist-info}/METADATA +1 -1
- {together-1.5.24.dist-info → together-1.5.25.dist-info}/RECORD +7 -7
- {together-1.5.24.dist-info → together-1.5.25.dist-info}/LICENSE +0 -0
- {together-1.5.24.dist-info → together-1.5.25.dist-info}/WHEEL +0 -0
- {together-1.5.24.dist-info → together-1.5.25.dist-info}/entry_points.txt +0 -0
together/resources/batch.py
CHANGED
|
@@ -72,6 +72,21 @@ class Batches:
|
|
|
72
72
|
jobs = response.data or []
|
|
73
73
|
return [BatchJob(**job) for job in jobs]
|
|
74
74
|
|
|
75
|
+
def cancel_batch(self, batch_job_id: str) -> BatchJob:
|
|
76
|
+
requestor = api_requestor.APIRequestor(
|
|
77
|
+
client=self._client,
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
response, _, _ = requestor.request(
|
|
81
|
+
options=TogetherRequest(
|
|
82
|
+
method="POST",
|
|
83
|
+
url=f"batches/{batch_job_id}/cancel",
|
|
84
|
+
),
|
|
85
|
+
stream=False,
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
return BatchJob(**response.data)
|
|
89
|
+
|
|
75
90
|
|
|
76
91
|
class AsyncBatches:
|
|
77
92
|
def __init__(self, client: TogetherClient) -> None:
|
|
@@ -133,3 +148,18 @@ class AsyncBatches:
|
|
|
133
148
|
assert isinstance(response, TogetherResponse)
|
|
134
149
|
jobs = response.data or []
|
|
135
150
|
return [BatchJob(**job) for job in jobs]
|
|
151
|
+
|
|
152
|
+
async def cancel_batch(self, batch_job_id: str) -> BatchJob:
|
|
153
|
+
requestor = api_requestor.APIRequestor(
|
|
154
|
+
client=self._client,
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
response, _, _ = await requestor.arequest(
|
|
158
|
+
options=TogetherRequest(
|
|
159
|
+
method="POST",
|
|
160
|
+
url=f"batches/{batch_job_id}/cancel",
|
|
161
|
+
),
|
|
162
|
+
stream=False,
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
return BatchJob(**response.data)
|
together/types/batch.py
CHANGED
|
@@ -30,7 +30,7 @@ together/resources/audio/__init__.py,sha256=S6gV6aEPAHL9kskoA38Uq_Ju7uM1Xcfl0doO
|
|
|
30
30
|
together/resources/audio/speech.py,sha256=81ib_gIo-Rxoaipx2Pi9ZsKnOTjeFPwSlBrcUkyX5xk,5211
|
|
31
31
|
together/resources/audio/transcriptions.py,sha256=67TPiDzfEcsHMpRyZx8eGR5jtnmEcZNUjA6g3Ykq4Zg,10219
|
|
32
32
|
together/resources/audio/translations.py,sha256=_2VeYEthYzPIflDD_hlVmoXk-OCgLgnvva2vMPpaU_Q,10508
|
|
33
|
-
together/resources/batch.py,sha256=
|
|
33
|
+
together/resources/batch.py,sha256=dBXgh264AQPsO3pCff1vT1PAewnX9yroxa8UZQUJAqE,4584
|
|
34
34
|
together/resources/chat/__init__.py,sha256=RsTptdP8MeGjcdIjze896-J27cRvCbUoMft0X2BVlQ8,617
|
|
35
35
|
together/resources/chat/completions.py,sha256=cBsSFWi9qToQCn4V_3qJ0gwRqORjF6NFDXmHcHfIhOY,14442
|
|
36
36
|
together/resources/code_interpreter.py,sha256=vbN8Mh5MG6HQvqra7p61leIyfebgbgJTM_q2A_Fylhw,2948
|
|
@@ -47,7 +47,7 @@ together/together_response.py,sha256=a3dgKMPDrlfKQwxYENfNt2T4l2vSZxRWMixhHSy-q3E
|
|
|
47
47
|
together/types/__init__.py,sha256=qSGo1AWLB0v7L_y1Fl1FQ_Cen48UmRs0Rc-EEQOjj_A,3942
|
|
48
48
|
together/types/abstract.py,sha256=1lFQI_3WjsR_t1128AeKW0aTk6EiM6Gh1J3ZuyLLPao,642
|
|
49
49
|
together/types/audio_speech.py,sha256=7GNldCfddDNo1vVPqyT-u7fX_TR-du1OePSzoXdAK3s,4694
|
|
50
|
-
together/types/batch.py,sha256=
|
|
50
|
+
together/types/batch.py,sha256=KiI5i1En7cyIUxHhVIGoQk6Wlw19c0PXSqDWwc2KZ2c,1140
|
|
51
51
|
together/types/chat_completions.py,sha256=NxJ7tFlWynxoLsRtQHzM7Ka3QxKVjRs6EvtOTYZ79bM,5340
|
|
52
52
|
together/types/code_interpreter.py,sha256=cjF8TKgRkJllHS4i24dWQZBGTRsG557eHSewOiip0Kk,1770
|
|
53
53
|
together/types/common.py,sha256=kxZ-N9xtBsGYZBmbIWnZ0rfT3Pn8PFB7sAbp3iv96pw,1525
|
|
@@ -67,8 +67,8 @@ together/utils/api_helpers.py,sha256=2K0O6qeEQ2zVFvi5NBN5m2kjZJaS3-JfKFecQ7SmGaw
|
|
|
67
67
|
together/utils/files.py,sha256=CTngpKf_Erp31fbT0dQFtKXrABcsKUpSX1_EGQTgFno,20682
|
|
68
68
|
together/utils/tools.py,sha256=H2MTJhEqtBllaDvOyZehIO_IVNK3P17rSDeILtJIVag,2964
|
|
69
69
|
together/version.py,sha256=p03ivHyE0SyWU4jAnRTBi_sOwywVWoZPU4g2gzRgG-Y,126
|
|
70
|
-
together-1.5.
|
|
71
|
-
together-1.5.
|
|
72
|
-
together-1.5.
|
|
73
|
-
together-1.5.
|
|
74
|
-
together-1.5.
|
|
70
|
+
together-1.5.25.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
71
|
+
together-1.5.25.dist-info/METADATA,sha256=zq3CIGBZGKZ9EPXGoF5z5kh8kcaQHrH9_RJvTeyTA1g,16441
|
|
72
|
+
together-1.5.25.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
73
|
+
together-1.5.25.dist-info/entry_points.txt,sha256=G-b5NKW6lUUf1V1fH8IPTBb7jXnK7lhbX9H1zTEJXPs,50
|
|
74
|
+
together-1.5.25.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|