scale-gp-beta 0.1.0a39__py3-none-any.whl → 0.1.0a41__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.
Files changed (46) hide show
  1. scale_gp_beta/_base_client.py +140 -11
  2. scale_gp_beta/_client.py +602 -143
  3. scale_gp_beta/_models.py +16 -1
  4. scale_gp_beta/_streaming.py +12 -10
  5. scale_gp_beta/_types.py +12 -2
  6. scale_gp_beta/_version.py +1 -1
  7. scale_gp_beta/resources/__init__.py +14 -0
  8. scale_gp_beta/resources/build.py +582 -0
  9. scale_gp_beta/resources/chat/completions.py +4 -0
  10. scale_gp_beta/resources/credentials.py +4 -0
  11. scale_gp_beta/resources/dataset_items.py +4 -0
  12. scale_gp_beta/resources/datasets.py +4 -0
  13. scale_gp_beta/resources/evaluation_items.py +4 -0
  14. scale_gp_beta/resources/evaluations.py +4 -0
  15. scale_gp_beta/resources/files/files.py +4 -0
  16. scale_gp_beta/resources/models.py +4 -0
  17. scale_gp_beta/resources/questions.py +4 -0
  18. scale_gp_beta/resources/spans.py +28 -0
  19. scale_gp_beta/types/__init__.py +6 -0
  20. scale_gp_beta/types/build_cancel_response.py +38 -0
  21. scale_gp_beta/types/build_create_params.py +26 -0
  22. scale_gp_beta/types/build_create_response.py +38 -0
  23. scale_gp_beta/types/build_list_params.py +19 -0
  24. scale_gp_beta/types/build_list_response.py +38 -0
  25. scale_gp_beta/types/build_retrieve_response.py +38 -0
  26. scale_gp_beta/types/chat/completion_models_params.py +2 -0
  27. scale_gp_beta/types/credential_list_params.py +2 -0
  28. scale_gp_beta/types/dataset_item_list_params.py +2 -0
  29. scale_gp_beta/types/dataset_list_params.py +2 -0
  30. scale_gp_beta/types/evaluation.py +2 -0
  31. scale_gp_beta/types/evaluation_create_params.py +2 -0
  32. scale_gp_beta/types/evaluation_item_list_params.py +2 -0
  33. scale_gp_beta/types/evaluation_list_params.py +2 -0
  34. scale_gp_beta/types/evaluation_task.py +5 -1
  35. scale_gp_beta/types/evaluation_task_param.py +5 -1
  36. scale_gp_beta/types/file_import_from_cloud_response.py +4 -0
  37. scale_gp_beta/types/file_list_params.py +2 -0
  38. scale_gp_beta/types/inference_create_params.py +2 -0
  39. scale_gp_beta/types/model_list_params.py +2 -0
  40. scale_gp_beta/types/question_list_params.py +2 -0
  41. scale_gp_beta/types/span_assessment.py +2 -0
  42. scale_gp_beta/types/span_search_params.py +11 -0
  43. {scale_gp_beta-0.1.0a39.dist-info → scale_gp_beta-0.1.0a41.dist-info}/METADATA +14 -42
  44. {scale_gp_beta-0.1.0a39.dist-info → scale_gp_beta-0.1.0a41.dist-info}/RECORD +46 -39
  45. {scale_gp_beta-0.1.0a39.dist-info → scale_gp_beta-0.1.0a41.dist-info}/licenses/LICENSE +1 -1
  46. {scale_gp_beta-0.1.0a39.dist-info → scale_gp_beta-0.1.0a41.dist-info}/WHEEL +0 -0
@@ -0,0 +1,582 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Mapping, cast
6
+ from typing_extensions import Literal
7
+
8
+ import httpx
9
+
10
+ from ..types import build_list_params, build_create_params
11
+ from .._types import Body, Omit, Query, Headers, NotGiven, FileTypes, omit, not_given
12
+ from .._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform
13
+ from .._compat import cached_property
14
+ from .._resource import SyncAPIResource, AsyncAPIResource
15
+ from .._response import (
16
+ to_raw_response_wrapper,
17
+ to_streamed_response_wrapper,
18
+ async_to_raw_response_wrapper,
19
+ async_to_streamed_response_wrapper,
20
+ )
21
+ from ..pagination import SyncCursorPage, AsyncCursorPage
22
+ from .._base_client import AsyncPaginator, make_request_options
23
+ from ..types.build_list_response import BuildListResponse
24
+ from ..types.build_cancel_response import BuildCancelResponse
25
+ from ..types.build_create_response import BuildCreateResponse
26
+ from ..types.build_retrieve_response import BuildRetrieveResponse
27
+
28
+ __all__ = ["BuildResource", "AsyncBuildResource"]
29
+
30
+
31
+ class BuildResource(SyncAPIResource):
32
+ @cached_property
33
+ def with_raw_response(self) -> BuildResourceWithRawResponse:
34
+ """
35
+ This property can be used as a prefix for any HTTP method call to return
36
+ the raw response object instead of the parsed content.
37
+
38
+ For more information, see https://www.github.com/scaleapi/sgp-python-beta#accessing-raw-response-data-eg-headers
39
+ """
40
+ return BuildResourceWithRawResponse(self)
41
+
42
+ @cached_property
43
+ def with_streaming_response(self) -> BuildResourceWithStreamingResponse:
44
+ """
45
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
46
+
47
+ For more information, see https://www.github.com/scaleapi/sgp-python-beta#with_streaming_response
48
+ """
49
+ return BuildResourceWithStreamingResponse(self)
50
+
51
+ def create(
52
+ self,
53
+ *,
54
+ context_archive: FileTypes,
55
+ image_name: str,
56
+ build_args: str | Omit = omit,
57
+ image_tag: str | Omit = omit,
58
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
59
+ # The extra values given here take precedence over values defined on the client or passed to this method.
60
+ extra_headers: Headers | None = None,
61
+ extra_query: Query | None = None,
62
+ extra_body: Body | None = None,
63
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
64
+ ) -> BuildCreateResponse:
65
+ """
66
+ Submit a container image build.
67
+
68
+ Upload a tar.gz archive containing the build context (Dockerfile and any files
69
+ needed for the build) along with image name, tag, and optional build arguments.
70
+
71
+ Maximum file size: 500MB
72
+
73
+ Args:
74
+ context_archive: tar.gz archive containing the build context (Dockerfile and any files needed for
75
+ the build)
76
+
77
+ image_name: Name for the built image
78
+
79
+ build_args: JSON string of build arguments
80
+
81
+ image_tag: Tag for the built image
82
+
83
+ extra_headers: Send extra headers
84
+
85
+ extra_query: Add additional query parameters to the request
86
+
87
+ extra_body: Add additional JSON properties to the request
88
+
89
+ timeout: Override the client-level default timeout for this request, in seconds
90
+ """
91
+ body = deepcopy_minimal(
92
+ {
93
+ "context_archive": context_archive,
94
+ "image_name": image_name,
95
+ "build_args": build_args,
96
+ "image_tag": image_tag,
97
+ }
98
+ )
99
+ files = extract_files(cast(Mapping[str, object], body), paths=[["context_archive"]])
100
+ # It should be noted that the actual Content-Type header that will be
101
+ # sent to the server will contain a `boundary` parameter, e.g.
102
+ # multipart/form-data; boundary=---abc--
103
+ extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
104
+ return self._post(
105
+ "/v5/builds",
106
+ body=maybe_transform(body, build_create_params.BuildCreateParams),
107
+ files=files,
108
+ options=make_request_options(
109
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
110
+ ),
111
+ cast_to=BuildCreateResponse,
112
+ )
113
+
114
+ def retrieve(
115
+ self,
116
+ build_id: str,
117
+ *,
118
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
119
+ # The extra values given here take precedence over values defined on the client or passed to this method.
120
+ extra_headers: Headers | None = None,
121
+ extra_query: Query | None = None,
122
+ extra_body: Body | None = None,
123
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
124
+ ) -> BuildRetrieveResponse:
125
+ """
126
+ Get a build by ID, including current status from the cloud provider.
127
+
128
+ Args:
129
+ extra_headers: Send extra headers
130
+
131
+ extra_query: Add additional query parameters to the request
132
+
133
+ extra_body: Add additional JSON properties to the request
134
+
135
+ timeout: Override the client-level default timeout for this request, in seconds
136
+ """
137
+ if not build_id:
138
+ raise ValueError(f"Expected a non-empty value for `build_id` but received {build_id!r}")
139
+ return self._get(
140
+ f"/v5/builds/{build_id}",
141
+ options=make_request_options(
142
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
143
+ ),
144
+ cast_to=BuildRetrieveResponse,
145
+ )
146
+
147
+ def list(
148
+ self,
149
+ *,
150
+ ending_before: str | Omit = omit,
151
+ limit: int | Omit = omit,
152
+ sort_by: str | Omit = omit,
153
+ sort_order: Literal["asc", "desc"] | Omit = omit,
154
+ starting_after: str | Omit = omit,
155
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
156
+ # The extra values given here take precedence over values defined on the client or passed to this method.
157
+ extra_headers: Headers | None = None,
158
+ extra_query: Query | None = None,
159
+ extra_body: Body | None = None,
160
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
161
+ ) -> SyncCursorPage[BuildListResponse]:
162
+ """
163
+ List Builds
164
+
165
+ Args:
166
+ extra_headers: Send extra headers
167
+
168
+ extra_query: Add additional query parameters to the request
169
+
170
+ extra_body: Add additional JSON properties to the request
171
+
172
+ timeout: Override the client-level default timeout for this request, in seconds
173
+ """
174
+ return self._get_api_list(
175
+ "/v5/builds",
176
+ page=SyncCursorPage[BuildListResponse],
177
+ options=make_request_options(
178
+ extra_headers=extra_headers,
179
+ extra_query=extra_query,
180
+ extra_body=extra_body,
181
+ timeout=timeout,
182
+ query=maybe_transform(
183
+ {
184
+ "ending_before": ending_before,
185
+ "limit": limit,
186
+ "sort_by": sort_by,
187
+ "sort_order": sort_order,
188
+ "starting_after": starting_after,
189
+ },
190
+ build_list_params.BuildListParams,
191
+ ),
192
+ ),
193
+ model=BuildListResponse,
194
+ )
195
+
196
+ def cancel(
197
+ self,
198
+ build_id: str,
199
+ *,
200
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
201
+ # The extra values given here take precedence over values defined on the client or passed to this method.
202
+ extra_headers: Headers | None = None,
203
+ extra_query: Query | None = None,
204
+ extra_body: Body | None = None,
205
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
206
+ ) -> BuildCancelResponse:
207
+ """
208
+ Cancel a pending or running build.
209
+
210
+ Args:
211
+ extra_headers: Send extra headers
212
+
213
+ extra_query: Add additional query parameters to the request
214
+
215
+ extra_body: Add additional JSON properties to the request
216
+
217
+ timeout: Override the client-level default timeout for this request, in seconds
218
+ """
219
+ if not build_id:
220
+ raise ValueError(f"Expected a non-empty value for `build_id` but received {build_id!r}")
221
+ return self._post(
222
+ f"/v5/builds/{build_id}/cancel",
223
+ options=make_request_options(
224
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
225
+ ),
226
+ cast_to=BuildCancelResponse,
227
+ )
228
+
229
+ def logs(
230
+ self,
231
+ build_id: str,
232
+ *,
233
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
234
+ # The extra values given here take precedence over values defined on the client or passed to this method.
235
+ extra_headers: Headers | None = None,
236
+ extra_query: Query | None = None,
237
+ extra_body: Body | None = None,
238
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
239
+ ) -> object:
240
+ """
241
+ Stream build logs via Server-Sent Events (SSE).
242
+
243
+ Returns a streaming response with content-type text/event-stream. Each log line
244
+ is sent as an SSE data event.
245
+
246
+ Args:
247
+ extra_headers: Send extra headers
248
+
249
+ extra_query: Add additional query parameters to the request
250
+
251
+ extra_body: Add additional JSON properties to the request
252
+
253
+ timeout: Override the client-level default timeout for this request, in seconds
254
+ """
255
+ if not build_id:
256
+ raise ValueError(f"Expected a non-empty value for `build_id` but received {build_id!r}")
257
+ return self._get(
258
+ f"/v5/builds/{build_id}/logs",
259
+ options=make_request_options(
260
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
261
+ ),
262
+ cast_to=object,
263
+ )
264
+
265
+
266
+ class AsyncBuildResource(AsyncAPIResource):
267
+ @cached_property
268
+ def with_raw_response(self) -> AsyncBuildResourceWithRawResponse:
269
+ """
270
+ This property can be used as a prefix for any HTTP method call to return
271
+ the raw response object instead of the parsed content.
272
+
273
+ For more information, see https://www.github.com/scaleapi/sgp-python-beta#accessing-raw-response-data-eg-headers
274
+ """
275
+ return AsyncBuildResourceWithRawResponse(self)
276
+
277
+ @cached_property
278
+ def with_streaming_response(self) -> AsyncBuildResourceWithStreamingResponse:
279
+ """
280
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
281
+
282
+ For more information, see https://www.github.com/scaleapi/sgp-python-beta#with_streaming_response
283
+ """
284
+ return AsyncBuildResourceWithStreamingResponse(self)
285
+
286
+ async def create(
287
+ self,
288
+ *,
289
+ context_archive: FileTypes,
290
+ image_name: str,
291
+ build_args: str | Omit = omit,
292
+ image_tag: str | Omit = omit,
293
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
294
+ # The extra values given here take precedence over values defined on the client or passed to this method.
295
+ extra_headers: Headers | None = None,
296
+ extra_query: Query | None = None,
297
+ extra_body: Body | None = None,
298
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
299
+ ) -> BuildCreateResponse:
300
+ """
301
+ Submit a container image build.
302
+
303
+ Upload a tar.gz archive containing the build context (Dockerfile and any files
304
+ needed for the build) along with image name, tag, and optional build arguments.
305
+
306
+ Maximum file size: 500MB
307
+
308
+ Args:
309
+ context_archive: tar.gz archive containing the build context (Dockerfile and any files needed for
310
+ the build)
311
+
312
+ image_name: Name for the built image
313
+
314
+ build_args: JSON string of build arguments
315
+
316
+ image_tag: Tag for the built image
317
+
318
+ extra_headers: Send extra headers
319
+
320
+ extra_query: Add additional query parameters to the request
321
+
322
+ extra_body: Add additional JSON properties to the request
323
+
324
+ timeout: Override the client-level default timeout for this request, in seconds
325
+ """
326
+ body = deepcopy_minimal(
327
+ {
328
+ "context_archive": context_archive,
329
+ "image_name": image_name,
330
+ "build_args": build_args,
331
+ "image_tag": image_tag,
332
+ }
333
+ )
334
+ files = extract_files(cast(Mapping[str, object], body), paths=[["context_archive"]])
335
+ # It should be noted that the actual Content-Type header that will be
336
+ # sent to the server will contain a `boundary` parameter, e.g.
337
+ # multipart/form-data; boundary=---abc--
338
+ extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
339
+ return await self._post(
340
+ "/v5/builds",
341
+ body=await async_maybe_transform(body, build_create_params.BuildCreateParams),
342
+ files=files,
343
+ options=make_request_options(
344
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
345
+ ),
346
+ cast_to=BuildCreateResponse,
347
+ )
348
+
349
+ async def retrieve(
350
+ self,
351
+ build_id: str,
352
+ *,
353
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
354
+ # The extra values given here take precedence over values defined on the client or passed to this method.
355
+ extra_headers: Headers | None = None,
356
+ extra_query: Query | None = None,
357
+ extra_body: Body | None = None,
358
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
359
+ ) -> BuildRetrieveResponse:
360
+ """
361
+ Get a build by ID, including current status from the cloud provider.
362
+
363
+ Args:
364
+ extra_headers: Send extra headers
365
+
366
+ extra_query: Add additional query parameters to the request
367
+
368
+ extra_body: Add additional JSON properties to the request
369
+
370
+ timeout: Override the client-level default timeout for this request, in seconds
371
+ """
372
+ if not build_id:
373
+ raise ValueError(f"Expected a non-empty value for `build_id` but received {build_id!r}")
374
+ return await self._get(
375
+ f"/v5/builds/{build_id}",
376
+ options=make_request_options(
377
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
378
+ ),
379
+ cast_to=BuildRetrieveResponse,
380
+ )
381
+
382
+ def list(
383
+ self,
384
+ *,
385
+ ending_before: str | Omit = omit,
386
+ limit: int | Omit = omit,
387
+ sort_by: str | Omit = omit,
388
+ sort_order: Literal["asc", "desc"] | Omit = omit,
389
+ starting_after: str | Omit = omit,
390
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
391
+ # The extra values given here take precedence over values defined on the client or passed to this method.
392
+ extra_headers: Headers | None = None,
393
+ extra_query: Query | None = None,
394
+ extra_body: Body | None = None,
395
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
396
+ ) -> AsyncPaginator[BuildListResponse, AsyncCursorPage[BuildListResponse]]:
397
+ """
398
+ List Builds
399
+
400
+ Args:
401
+ extra_headers: Send extra headers
402
+
403
+ extra_query: Add additional query parameters to the request
404
+
405
+ extra_body: Add additional JSON properties to the request
406
+
407
+ timeout: Override the client-level default timeout for this request, in seconds
408
+ """
409
+ return self._get_api_list(
410
+ "/v5/builds",
411
+ page=AsyncCursorPage[BuildListResponse],
412
+ options=make_request_options(
413
+ extra_headers=extra_headers,
414
+ extra_query=extra_query,
415
+ extra_body=extra_body,
416
+ timeout=timeout,
417
+ query=maybe_transform(
418
+ {
419
+ "ending_before": ending_before,
420
+ "limit": limit,
421
+ "sort_by": sort_by,
422
+ "sort_order": sort_order,
423
+ "starting_after": starting_after,
424
+ },
425
+ build_list_params.BuildListParams,
426
+ ),
427
+ ),
428
+ model=BuildListResponse,
429
+ )
430
+
431
+ async def cancel(
432
+ self,
433
+ build_id: str,
434
+ *,
435
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
436
+ # The extra values given here take precedence over values defined on the client or passed to this method.
437
+ extra_headers: Headers | None = None,
438
+ extra_query: Query | None = None,
439
+ extra_body: Body | None = None,
440
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
441
+ ) -> BuildCancelResponse:
442
+ """
443
+ Cancel a pending or running build.
444
+
445
+ Args:
446
+ extra_headers: Send extra headers
447
+
448
+ extra_query: Add additional query parameters to the request
449
+
450
+ extra_body: Add additional JSON properties to the request
451
+
452
+ timeout: Override the client-level default timeout for this request, in seconds
453
+ """
454
+ if not build_id:
455
+ raise ValueError(f"Expected a non-empty value for `build_id` but received {build_id!r}")
456
+ return await self._post(
457
+ f"/v5/builds/{build_id}/cancel",
458
+ options=make_request_options(
459
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
460
+ ),
461
+ cast_to=BuildCancelResponse,
462
+ )
463
+
464
+ async def logs(
465
+ self,
466
+ build_id: str,
467
+ *,
468
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
469
+ # The extra values given here take precedence over values defined on the client or passed to this method.
470
+ extra_headers: Headers | None = None,
471
+ extra_query: Query | None = None,
472
+ extra_body: Body | None = None,
473
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
474
+ ) -> object:
475
+ """
476
+ Stream build logs via Server-Sent Events (SSE).
477
+
478
+ Returns a streaming response with content-type text/event-stream. Each log line
479
+ is sent as an SSE data event.
480
+
481
+ Args:
482
+ extra_headers: Send extra headers
483
+
484
+ extra_query: Add additional query parameters to the request
485
+
486
+ extra_body: Add additional JSON properties to the request
487
+
488
+ timeout: Override the client-level default timeout for this request, in seconds
489
+ """
490
+ if not build_id:
491
+ raise ValueError(f"Expected a non-empty value for `build_id` but received {build_id!r}")
492
+ return await self._get(
493
+ f"/v5/builds/{build_id}/logs",
494
+ options=make_request_options(
495
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
496
+ ),
497
+ cast_to=object,
498
+ )
499
+
500
+
501
+ class BuildResourceWithRawResponse:
502
+ def __init__(self, build: BuildResource) -> None:
503
+ self._build = build
504
+
505
+ self.create = to_raw_response_wrapper(
506
+ build.create,
507
+ )
508
+ self.retrieve = to_raw_response_wrapper(
509
+ build.retrieve,
510
+ )
511
+ self.list = to_raw_response_wrapper(
512
+ build.list,
513
+ )
514
+ self.cancel = to_raw_response_wrapper(
515
+ build.cancel,
516
+ )
517
+ self.logs = to_raw_response_wrapper(
518
+ build.logs,
519
+ )
520
+
521
+
522
+ class AsyncBuildResourceWithRawResponse:
523
+ def __init__(self, build: AsyncBuildResource) -> None:
524
+ self._build = build
525
+
526
+ self.create = async_to_raw_response_wrapper(
527
+ build.create,
528
+ )
529
+ self.retrieve = async_to_raw_response_wrapper(
530
+ build.retrieve,
531
+ )
532
+ self.list = async_to_raw_response_wrapper(
533
+ build.list,
534
+ )
535
+ self.cancel = async_to_raw_response_wrapper(
536
+ build.cancel,
537
+ )
538
+ self.logs = async_to_raw_response_wrapper(
539
+ build.logs,
540
+ )
541
+
542
+
543
+ class BuildResourceWithStreamingResponse:
544
+ def __init__(self, build: BuildResource) -> None:
545
+ self._build = build
546
+
547
+ self.create = to_streamed_response_wrapper(
548
+ build.create,
549
+ )
550
+ self.retrieve = to_streamed_response_wrapper(
551
+ build.retrieve,
552
+ )
553
+ self.list = to_streamed_response_wrapper(
554
+ build.list,
555
+ )
556
+ self.cancel = to_streamed_response_wrapper(
557
+ build.cancel,
558
+ )
559
+ self.logs = to_streamed_response_wrapper(
560
+ build.logs,
561
+ )
562
+
563
+
564
+ class AsyncBuildResourceWithStreamingResponse:
565
+ def __init__(self, build: AsyncBuildResource) -> None:
566
+ self._build = build
567
+
568
+ self.create = async_to_streamed_response_wrapper(
569
+ build.create,
570
+ )
571
+ self.retrieve = async_to_streamed_response_wrapper(
572
+ build.retrieve,
573
+ )
574
+ self.list = async_to_streamed_response_wrapper(
575
+ build.list,
576
+ )
577
+ self.cancel = async_to_streamed_response_wrapper(
578
+ build.cancel,
579
+ )
580
+ self.logs = async_to_streamed_response_wrapper(
581
+ build.logs,
582
+ )
@@ -539,6 +539,7 @@ class CompletionsResource(SyncAPIResource):
539
539
  "fireworks_ai",
540
540
  ]
541
541
  | Omit = omit,
542
+ sort_by: str | Omit = omit,
542
543
  sort_order: Literal["asc", "desc"] | Omit = omit,
543
544
  starting_after: str | Omit = omit,
544
545
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -572,6 +573,7 @@ class CompletionsResource(SyncAPIResource):
572
573
  "ending_before": ending_before,
573
574
  "limit": limit,
574
575
  "model_vendor": model_vendor,
576
+ "sort_by": sort_by,
575
577
  "sort_order": sort_order,
576
578
  "starting_after": starting_after,
577
579
  },
@@ -1094,6 +1096,7 @@ class AsyncCompletionsResource(AsyncAPIResource):
1094
1096
  "fireworks_ai",
1095
1097
  ]
1096
1098
  | Omit = omit,
1099
+ sort_by: str | Omit = omit,
1097
1100
  sort_order: Literal["asc", "desc"] | Omit = omit,
1098
1101
  starting_after: str | Omit = omit,
1099
1102
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -1127,6 +1130,7 @@ class AsyncCompletionsResource(AsyncAPIResource):
1127
1130
  "ending_before": ending_before,
1128
1131
  "limit": limit,
1129
1132
  "model_vendor": model_vendor,
1133
+ "sort_by": sort_by,
1130
1134
  "sort_order": sort_order,
1131
1135
  "starting_after": starting_after,
1132
1136
  },
@@ -201,6 +201,7 @@ class CredentialsResource(SyncAPIResource):
201
201
  ending_before: str | Omit = omit,
202
202
  limit: int | Omit = omit,
203
203
  name: str | Omit = omit,
204
+ sort_by: str | Omit = omit,
204
205
  sort_order: Literal["asc", "desc"] | Omit = omit,
205
206
  starting_after: str | Omit = omit,
206
207
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -238,6 +239,7 @@ class CredentialsResource(SyncAPIResource):
238
239
  "ending_before": ending_before,
239
240
  "limit": limit,
240
241
  "name": name,
242
+ "sort_by": sort_by,
241
243
  "sort_order": sort_order,
242
244
  "starting_after": starting_after,
243
245
  },
@@ -554,6 +556,7 @@ class AsyncCredentialsResource(AsyncAPIResource):
554
556
  ending_before: str | Omit = omit,
555
557
  limit: int | Omit = omit,
556
558
  name: str | Omit = omit,
559
+ sort_by: str | Omit = omit,
557
560
  sort_order: Literal["asc", "desc"] | Omit = omit,
558
561
  starting_after: str | Omit = omit,
559
562
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -591,6 +594,7 @@ class AsyncCredentialsResource(AsyncAPIResource):
591
594
  "ending_before": ending_before,
592
595
  "limit": limit,
593
596
  "name": name,
597
+ "sort_by": sort_by,
594
598
  "sort_order": sort_order,
595
599
  "starting_after": starting_after,
596
600
  },
@@ -146,6 +146,7 @@ class DatasetItemsResource(SyncAPIResource):
146
146
  ending_before: str | Omit = omit,
147
147
  include_archived: bool | Omit = omit,
148
148
  limit: int | Omit = omit,
149
+ sort_by: str | Omit = omit,
149
150
  sort_order: Literal["asc", "desc"] | Omit = omit,
150
151
  starting_after: str | Omit = omit,
151
152
  version: int | Omit = omit,
@@ -189,6 +190,7 @@ class DatasetItemsResource(SyncAPIResource):
189
190
  "ending_before": ending_before,
190
191
  "include_archived": include_archived,
191
192
  "limit": limit,
193
+ "sort_by": sort_by,
192
194
  "sort_order": sort_order,
193
195
  "starting_after": starting_after,
194
196
  "version": version,
@@ -396,6 +398,7 @@ class AsyncDatasetItemsResource(AsyncAPIResource):
396
398
  ending_before: str | Omit = omit,
397
399
  include_archived: bool | Omit = omit,
398
400
  limit: int | Omit = omit,
401
+ sort_by: str | Omit = omit,
399
402
  sort_order: Literal["asc", "desc"] | Omit = omit,
400
403
  starting_after: str | Omit = omit,
401
404
  version: int | Omit = omit,
@@ -439,6 +442,7 @@ class AsyncDatasetItemsResource(AsyncAPIResource):
439
442
  "ending_before": ending_before,
440
443
  "include_archived": include_archived,
441
444
  "limit": limit,
445
+ "sort_by": sort_by,
442
446
  "sort_order": sort_order,
443
447
  "starting_after": starting_after,
444
448
  "version": version,