scale-gp-beta 0.1.0a13__py3-none-any.whl → 0.1.0a14__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 (28) hide show
  1. scale_gp_beta/_version.py +1 -1
  2. scale_gp_beta/pagination.py +39 -1
  3. scale_gp_beta/resources/chat/completions.py +14 -13
  4. scale_gp_beta/resources/dataset_items.py +18 -10
  5. scale_gp_beta/resources/datasets.py +5 -0
  6. scale_gp_beta/resources/evaluation_items.py +6 -0
  7. scale_gp_beta/resources/evaluations.py +4 -0
  8. scale_gp_beta/resources/files/files.py +5 -0
  9. scale_gp_beta/resources/models.py +4 -0
  10. scale_gp_beta/resources/spans.py +277 -9
  11. scale_gp_beta/types/__init__.py +1 -1
  12. scale_gp_beta/types/chat/__init__.py +1 -0
  13. scale_gp_beta/types/chat/completion_models_params.py +2 -0
  14. scale_gp_beta/types/{dataset_item_batch_create_response.py → chat/completion_models_response.py} +5 -5
  15. scale_gp_beta/types/dataset_item.py +2 -0
  16. scale_gp_beta/types/dataset_item_list_params.py +3 -1
  17. scale_gp_beta/types/dataset_list_params.py +3 -1
  18. scale_gp_beta/types/evaluation_item_list_params.py +3 -1
  19. scale_gp_beta/types/evaluation_list_params.py +2 -0
  20. scale_gp_beta/types/file_list_params.py +3 -1
  21. scale_gp_beta/types/model_list_params.py +2 -0
  22. scale_gp_beta/types/span_batch_params.py +130 -0
  23. scale_gp_beta/types/span_create_params.py +62 -2
  24. scale_gp_beta/types/span_list_params.py +3 -1
  25. {scale_gp_beta-0.1.0a13.dist-info → scale_gp_beta-0.1.0a14.dist-info}/METADATA +1 -1
  26. {scale_gp_beta-0.1.0a13.dist-info → scale_gp_beta-0.1.0a14.dist-info}/RECORD +28 -27
  27. {scale_gp_beta-0.1.0a13.dist-info → scale_gp_beta-0.1.0a14.dist-info}/WHEEL +0 -0
  28. {scale_gp_beta-0.1.0a13.dist-info → scale_gp_beta-0.1.0a14.dist-info}/licenses/LICENSE +0 -0
scale_gp_beta/_version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "scale_gp_beta"
4
- __version__ = "0.1.0-alpha.13" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.14" # x-release-please-version
@@ -5,7 +5,7 @@ from typing_extensions import Protocol, override, runtime_checkable
5
5
 
6
6
  from ._base_client import BasePage, PageInfo, BaseSyncPage, BaseAsyncPage
7
7
 
8
- __all__ = ["SyncCursorPage", "AsyncCursorPage"]
8
+ __all__ = ["SyncCursorPage", "AsyncCursorPage", "SyncAPIListPage", "AsyncAPIListPage"]
9
9
 
10
10
  _T = TypeVar("_T")
11
11
 
@@ -81,3 +81,41 @@ class AsyncCursorPage(BaseAsyncPage[_T], BasePage[_T], Generic[_T]):
81
81
  return None
82
82
 
83
83
  return PageInfo(params={"ending_before": item.id})
84
+
85
+
86
+ class SyncAPIListPage(BaseSyncPage[_T], BasePage[_T], Generic[_T]):
87
+ items: List[_T]
88
+
89
+ @override
90
+ def _get_page_items(self) -> List[_T]:
91
+ items = self.items
92
+ if not items:
93
+ return []
94
+ return items
95
+
96
+ @override
97
+ def next_page_info(self) -> None:
98
+ """
99
+ This page represents a response that isn't actually paginated at the API level
100
+ so there will never be a next page.
101
+ """
102
+ return None
103
+
104
+
105
+ class AsyncAPIListPage(BaseAsyncPage[_T], BasePage[_T], Generic[_T]):
106
+ items: List[_T]
107
+
108
+ @override
109
+ def _get_page_items(self) -> List[_T]:
110
+ items = self.items
111
+ if not items:
112
+ return []
113
+ return items
114
+
115
+ @override
116
+ def next_page_info(self) -> None:
117
+ """
118
+ This page represents a response that isn't actually paginated at the API level
119
+ so there will never be a next page.
120
+ """
121
+ return None
@@ -18,12 +18,11 @@ from ..._response import (
18
18
  async_to_streamed_response_wrapper,
19
19
  )
20
20
  from ..._streaming import Stream, AsyncStream
21
- from ...pagination import SyncCursorPage, AsyncCursorPage
22
21
  from ...types.chat import completion_create_params, completion_models_params
23
- from ..._base_client import AsyncPaginator, make_request_options
24
- from ...types.chat.model_definition import ModelDefinition
22
+ from ..._base_client import make_request_options
25
23
  from ...types.chat.chat_completion_chunk import ChatCompletionChunk
26
24
  from ...types.chat.completion_create_response import CompletionCreateResponse
25
+ from ...types.chat.completion_models_response import CompletionModelsResponse
27
26
 
28
27
  __all__ = ["CompletionsResource", "AsyncCompletionsResource"]
29
28
 
@@ -539,6 +538,7 @@ class CompletionsResource(SyncAPIResource):
539
538
  "xai",
540
539
  ]
541
540
  | NotGiven = NOT_GIVEN,
541
+ sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
542
542
  starting_after: str | NotGiven = NOT_GIVEN,
543
543
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
544
544
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -546,7 +546,7 @@ class CompletionsResource(SyncAPIResource):
546
546
  extra_query: Query | None = None,
547
547
  extra_body: Body | None = None,
548
548
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
549
- ) -> SyncCursorPage[ModelDefinition]:
549
+ ) -> CompletionModelsResponse:
550
550
  """
551
551
  Chat Completions
552
552
 
@@ -559,9 +559,8 @@ class CompletionsResource(SyncAPIResource):
559
559
 
560
560
  timeout: Override the client-level default timeout for this request, in seconds
561
561
  """
562
- return self._get_api_list(
562
+ return self._get(
563
563
  "/v5/chat/completions/models",
564
- page=SyncCursorPage[ModelDefinition],
565
564
  options=make_request_options(
566
565
  extra_headers=extra_headers,
567
566
  extra_query=extra_query,
@@ -572,12 +571,13 @@ class CompletionsResource(SyncAPIResource):
572
571
  "ending_before": ending_before,
573
572
  "limit": limit,
574
573
  "model_vendor": model_vendor,
574
+ "sort_order": sort_order,
575
575
  "starting_after": starting_after,
576
576
  },
577
577
  completion_models_params.CompletionModelsParams,
578
578
  ),
579
579
  ),
580
- model=ModelDefinition,
580
+ cast_to=CompletionModelsResponse,
581
581
  )
582
582
 
583
583
 
@@ -1073,7 +1073,7 @@ class AsyncCompletionsResource(AsyncAPIResource):
1073
1073
  stream_cls=AsyncStream[ChatCompletionChunk],
1074
1074
  )
1075
1075
 
1076
- def models(
1076
+ async def models(
1077
1077
  self,
1078
1078
  *,
1079
1079
  ending_before: str | NotGiven = NOT_GIVEN,
@@ -1092,6 +1092,7 @@ class AsyncCompletionsResource(AsyncAPIResource):
1092
1092
  "xai",
1093
1093
  ]
1094
1094
  | NotGiven = NOT_GIVEN,
1095
+ sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
1095
1096
  starting_after: str | NotGiven = NOT_GIVEN,
1096
1097
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1097
1098
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1099,7 +1100,7 @@ class AsyncCompletionsResource(AsyncAPIResource):
1099
1100
  extra_query: Query | None = None,
1100
1101
  extra_body: Body | None = None,
1101
1102
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1102
- ) -> AsyncPaginator[ModelDefinition, AsyncCursorPage[ModelDefinition]]:
1103
+ ) -> CompletionModelsResponse:
1103
1104
  """
1104
1105
  Chat Completions
1105
1106
 
@@ -1112,25 +1113,25 @@ class AsyncCompletionsResource(AsyncAPIResource):
1112
1113
 
1113
1114
  timeout: Override the client-level default timeout for this request, in seconds
1114
1115
  """
1115
- return self._get_api_list(
1116
+ return await self._get(
1116
1117
  "/v5/chat/completions/models",
1117
- page=AsyncCursorPage[ModelDefinition],
1118
1118
  options=make_request_options(
1119
1119
  extra_headers=extra_headers,
1120
1120
  extra_query=extra_query,
1121
1121
  extra_body=extra_body,
1122
1122
  timeout=timeout,
1123
- query=maybe_transform(
1123
+ query=await async_maybe_transform(
1124
1124
  {
1125
1125
  "ending_before": ending_before,
1126
1126
  "limit": limit,
1127
1127
  "model_vendor": model_vendor,
1128
+ "sort_order": sort_order,
1128
1129
  "starting_after": starting_after,
1129
1130
  },
1130
1131
  completion_models_params.CompletionModelsParams,
1131
1132
  ),
1132
1133
  ),
1133
- model=ModelDefinition,
1134
+ cast_to=CompletionModelsResponse,
1134
1135
  )
1135
1136
 
1136
1137
 
@@ -3,6 +3,7 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from typing import Dict, Iterable
6
+ from typing_extensions import Literal
6
7
 
7
8
  import httpx
8
9
 
@@ -22,11 +23,10 @@ from .._response import (
22
23
  async_to_raw_response_wrapper,
23
24
  async_to_streamed_response_wrapper,
24
25
  )
25
- from ..pagination import SyncCursorPage, AsyncCursorPage
26
+ from ..pagination import SyncCursorPage, AsyncCursorPage, SyncAPIListPage, AsyncAPIListPage
26
27
  from .._base_client import AsyncPaginator, make_request_options
27
28
  from ..types.dataset_item import DatasetItem
28
29
  from ..types.dataset_item_delete_response import DatasetItemDeleteResponse
29
- from ..types.dataset_item_batch_create_response import DatasetItemBatchCreateResponse
30
30
 
31
31
  __all__ = ["DatasetItemsResource", "AsyncDatasetItemsResource"]
32
32
 
@@ -136,6 +136,7 @@ class DatasetItemsResource(SyncAPIResource):
136
136
  ending_before: str | NotGiven = NOT_GIVEN,
137
137
  include_archived: bool | NotGiven = NOT_GIVEN,
138
138
  limit: int | NotGiven = NOT_GIVEN,
139
+ sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
139
140
  starting_after: str | NotGiven = NOT_GIVEN,
140
141
  version: int | NotGiven = NOT_GIVEN,
141
142
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -178,6 +179,7 @@ class DatasetItemsResource(SyncAPIResource):
178
179
  "ending_before": ending_before,
179
180
  "include_archived": include_archived,
180
181
  "limit": limit,
182
+ "sort_order": sort_order,
181
183
  "starting_after": starting_after,
182
184
  "version": version,
183
185
  },
@@ -231,7 +233,7 @@ class DatasetItemsResource(SyncAPIResource):
231
233
  extra_query: Query | None = None,
232
234
  extra_body: Body | None = None,
233
235
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
234
- ) -> DatasetItemBatchCreateResponse:
236
+ ) -> SyncAPIListPage[DatasetItem]:
235
237
  """
236
238
  Batch Create Dataset Items
237
239
 
@@ -248,8 +250,9 @@ class DatasetItemsResource(SyncAPIResource):
248
250
 
249
251
  timeout: Override the client-level default timeout for this request, in seconds
250
252
  """
251
- return self._post(
253
+ return self._get_api_list(
252
254
  "/v5/dataset-items/batch",
255
+ page=SyncAPIListPage[DatasetItem],
253
256
  body=maybe_transform(
254
257
  {
255
258
  "data": data,
@@ -260,7 +263,8 @@ class DatasetItemsResource(SyncAPIResource):
260
263
  options=make_request_options(
261
264
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
262
265
  ),
263
- cast_to=DatasetItemBatchCreateResponse,
266
+ model=DatasetItem,
267
+ method="post",
264
268
  )
265
269
 
266
270
 
@@ -371,6 +375,7 @@ class AsyncDatasetItemsResource(AsyncAPIResource):
371
375
  ending_before: str | NotGiven = NOT_GIVEN,
372
376
  include_archived: bool | NotGiven = NOT_GIVEN,
373
377
  limit: int | NotGiven = NOT_GIVEN,
378
+ sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
374
379
  starting_after: str | NotGiven = NOT_GIVEN,
375
380
  version: int | NotGiven = NOT_GIVEN,
376
381
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -413,6 +418,7 @@ class AsyncDatasetItemsResource(AsyncAPIResource):
413
418
  "ending_before": ending_before,
414
419
  "include_archived": include_archived,
415
420
  "limit": limit,
421
+ "sort_order": sort_order,
416
422
  "starting_after": starting_after,
417
423
  "version": version,
418
424
  },
@@ -455,7 +461,7 @@ class AsyncDatasetItemsResource(AsyncAPIResource):
455
461
  cast_to=DatasetItemDeleteResponse,
456
462
  )
457
463
 
458
- async def batch_create(
464
+ def batch_create(
459
465
  self,
460
466
  *,
461
467
  data: Iterable[Dict[str, object]],
@@ -466,7 +472,7 @@ class AsyncDatasetItemsResource(AsyncAPIResource):
466
472
  extra_query: Query | None = None,
467
473
  extra_body: Body | None = None,
468
474
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
469
- ) -> DatasetItemBatchCreateResponse:
475
+ ) -> AsyncPaginator[DatasetItem, AsyncAPIListPage[DatasetItem]]:
470
476
  """
471
477
  Batch Create Dataset Items
472
478
 
@@ -483,9 +489,10 @@ class AsyncDatasetItemsResource(AsyncAPIResource):
483
489
 
484
490
  timeout: Override the client-level default timeout for this request, in seconds
485
491
  """
486
- return await self._post(
492
+ return self._get_api_list(
487
493
  "/v5/dataset-items/batch",
488
- body=await async_maybe_transform(
494
+ page=AsyncAPIListPage[DatasetItem],
495
+ body=maybe_transform(
489
496
  {
490
497
  "data": data,
491
498
  "dataset_id": dataset_id,
@@ -495,7 +502,8 @@ class AsyncDatasetItemsResource(AsyncAPIResource):
495
502
  options=make_request_options(
496
503
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
497
504
  ),
498
- cast_to=DatasetItemBatchCreateResponse,
505
+ model=DatasetItem,
506
+ method="post",
499
507
  )
500
508
 
501
509
 
@@ -3,6 +3,7 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from typing import Dict, List, Iterable
6
+ from typing_extensions import Literal
6
7
 
7
8
  import httpx
8
9
 
@@ -185,6 +186,7 @@ class DatasetsResource(SyncAPIResource):
185
186
  include_archived: bool | NotGiven = NOT_GIVEN,
186
187
  limit: int | NotGiven = NOT_GIVEN,
187
188
  name: str | NotGiven = NOT_GIVEN,
189
+ sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
188
190
  starting_after: str | NotGiven = NOT_GIVEN,
189
191
  tags: List[str] | NotGiven = NOT_GIVEN,
190
192
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -220,6 +222,7 @@ class DatasetsResource(SyncAPIResource):
220
222
  "include_archived": include_archived,
221
223
  "limit": limit,
222
224
  "name": name,
225
+ "sort_order": sort_order,
223
226
  "starting_after": starting_after,
224
227
  "tags": tags,
225
228
  },
@@ -423,6 +426,7 @@ class AsyncDatasetsResource(AsyncAPIResource):
423
426
  include_archived: bool | NotGiven = NOT_GIVEN,
424
427
  limit: int | NotGiven = NOT_GIVEN,
425
428
  name: str | NotGiven = NOT_GIVEN,
429
+ sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
426
430
  starting_after: str | NotGiven = NOT_GIVEN,
427
431
  tags: List[str] | NotGiven = NOT_GIVEN,
428
432
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -458,6 +462,7 @@ class AsyncDatasetsResource(AsyncAPIResource):
458
462
  "include_archived": include_archived,
459
463
  "limit": limit,
460
464
  "name": name,
465
+ "sort_order": sort_order,
461
466
  "starting_after": starting_after,
462
467
  "tags": tags,
463
468
  },
@@ -2,6 +2,8 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ from typing_extensions import Literal
6
+
5
7
  import httpx
6
8
 
7
9
  from ..types import evaluation_item_list_params, evaluation_item_retrieve_params
@@ -89,6 +91,7 @@ class EvaluationItemsResource(SyncAPIResource):
89
91
  evaluation_id: str | NotGiven = NOT_GIVEN,
90
92
  include_archived: bool | NotGiven = NOT_GIVEN,
91
93
  limit: int | NotGiven = NOT_GIVEN,
94
+ sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
92
95
  starting_after: str | NotGiven = NOT_GIVEN,
93
96
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
94
97
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -123,6 +126,7 @@ class EvaluationItemsResource(SyncAPIResource):
123
126
  "evaluation_id": evaluation_id,
124
127
  "include_archived": include_archived,
125
128
  "limit": limit,
129
+ "sort_order": sort_order,
126
130
  "starting_after": starting_after,
127
131
  },
128
132
  evaluation_item_list_params.EvaluationItemListParams,
@@ -199,6 +203,7 @@ class AsyncEvaluationItemsResource(AsyncAPIResource):
199
203
  evaluation_id: str | NotGiven = NOT_GIVEN,
200
204
  include_archived: bool | NotGiven = NOT_GIVEN,
201
205
  limit: int | NotGiven = NOT_GIVEN,
206
+ sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
202
207
  starting_after: str | NotGiven = NOT_GIVEN,
203
208
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
204
209
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -233,6 +238,7 @@ class AsyncEvaluationItemsResource(AsyncAPIResource):
233
238
  "evaluation_id": evaluation_id,
234
239
  "include_archived": include_archived,
235
240
  "limit": limit,
241
+ "sort_order": sort_order,
236
242
  "starting_after": starting_after,
237
243
  },
238
244
  evaluation_item_list_params.EvaluationItemListParams,
@@ -304,6 +304,7 @@ class EvaluationsResource(SyncAPIResource):
304
304
  include_archived: bool | NotGiven = NOT_GIVEN,
305
305
  limit: int | NotGiven = NOT_GIVEN,
306
306
  name: str | NotGiven = NOT_GIVEN,
307
+ sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
307
308
  starting_after: str | NotGiven = NOT_GIVEN,
308
309
  tags: List[str] | NotGiven = NOT_GIVEN,
309
310
  views: List[Literal["tasks"]] | NotGiven = NOT_GIVEN,
@@ -340,6 +341,7 @@ class EvaluationsResource(SyncAPIResource):
340
341
  "include_archived": include_archived,
341
342
  "limit": limit,
342
343
  "name": name,
344
+ "sort_order": sort_order,
343
345
  "starting_after": starting_after,
344
346
  "tags": tags,
345
347
  "views": views,
@@ -656,6 +658,7 @@ class AsyncEvaluationsResource(AsyncAPIResource):
656
658
  include_archived: bool | NotGiven = NOT_GIVEN,
657
659
  limit: int | NotGiven = NOT_GIVEN,
658
660
  name: str | NotGiven = NOT_GIVEN,
661
+ sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
659
662
  starting_after: str | NotGiven = NOT_GIVEN,
660
663
  tags: List[str] | NotGiven = NOT_GIVEN,
661
664
  views: List[Literal["tasks"]] | NotGiven = NOT_GIVEN,
@@ -692,6 +695,7 @@ class AsyncEvaluationsResource(AsyncAPIResource):
692
695
  "include_archived": include_archived,
693
696
  "limit": limit,
694
697
  "name": name,
698
+ "sort_order": sort_order,
695
699
  "starting_after": starting_after,
696
700
  "tags": tags,
697
701
  "views": views,
@@ -3,6 +3,7 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from typing import Dict, Mapping, cast
6
+ from typing_extensions import Literal
6
7
 
7
8
  import httpx
8
9
 
@@ -169,6 +170,7 @@ class FilesResource(SyncAPIResource):
169
170
  *,
170
171
  ending_before: str | NotGiven = NOT_GIVEN,
171
172
  limit: int | NotGiven = NOT_GIVEN,
173
+ sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
172
174
  starting_after: str | NotGiven = NOT_GIVEN,
173
175
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
174
176
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -201,6 +203,7 @@ class FilesResource(SyncAPIResource):
201
203
  {
202
204
  "ending_before": ending_before,
203
205
  "limit": limit,
206
+ "sort_order": sort_order,
204
207
  "starting_after": starting_after,
205
208
  },
206
209
  file_list_params.FileListParams,
@@ -379,6 +382,7 @@ class AsyncFilesResource(AsyncAPIResource):
379
382
  *,
380
383
  ending_before: str | NotGiven = NOT_GIVEN,
381
384
  limit: int | NotGiven = NOT_GIVEN,
385
+ sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
382
386
  starting_after: str | NotGiven = NOT_GIVEN,
383
387
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
384
388
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -411,6 +415,7 @@ class AsyncFilesResource(AsyncAPIResource):
411
415
  {
412
416
  "ending_before": ending_before,
413
417
  "limit": limit,
418
+ "sort_order": sort_order,
414
419
  "starting_after": starting_after,
415
420
  },
416
421
  file_list_params.FileListParams,
@@ -320,6 +320,7 @@ class ModelsResource(SyncAPIResource):
320
320
  ]
321
321
  | NotGiven = NOT_GIVEN,
322
322
  name: str | NotGiven = NOT_GIVEN,
323
+ sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
323
324
  starting_after: str | NotGiven = NOT_GIVEN,
324
325
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
325
326
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -354,6 +355,7 @@ class ModelsResource(SyncAPIResource):
354
355
  "limit": limit,
355
356
  "model_vendor": model_vendor,
356
357
  "name": name,
358
+ "sort_order": sort_order,
357
359
  "starting_after": starting_after,
358
360
  },
359
361
  model_list_params.ModelListParams,
@@ -690,6 +692,7 @@ class AsyncModelsResource(AsyncAPIResource):
690
692
  ]
691
693
  | NotGiven = NOT_GIVEN,
692
694
  name: str | NotGiven = NOT_GIVEN,
695
+ sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
693
696
  starting_after: str | NotGiven = NOT_GIVEN,
694
697
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
695
698
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -724,6 +727,7 @@ class AsyncModelsResource(AsyncAPIResource):
724
727
  "limit": limit,
725
728
  "model_vendor": model_vendor,
726
729
  "name": name,
730
+ "sort_order": sort_order,
727
731
  "starting_after": starting_after,
728
732
  },
729
733
  model_list_params.ModelListParams,