scale-gp-beta 0.1.0a12__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 (48) hide show
  1. scale_gp_beta/__init__.py +5 -0
  2. scale_gp_beta/_utils/_proxy.py +4 -1
  3. scale_gp_beta/_utils/_resources_proxy.py +24 -0
  4. scale_gp_beta/_version.py +1 -1
  5. scale_gp_beta/pagination.py +39 -1
  6. scale_gp_beta/resources/chat/completions.py +136 -1
  7. scale_gp_beta/resources/dataset_items.py +29 -21
  8. scale_gp_beta/resources/datasets.py +18 -5
  9. scale_gp_beta/resources/evaluation_items.py +11 -7
  10. scale_gp_beta/resources/evaluations.py +142 -21
  11. scale_gp_beta/resources/files/files.py +10 -5
  12. scale_gp_beta/resources/models.py +35 -35
  13. scale_gp_beta/resources/spans.py +312 -24
  14. scale_gp_beta/types/__init__.py +9 -2
  15. scale_gp_beta/types/chat/__init__.py +3 -0
  16. scale_gp_beta/types/chat/completion_models_params.py +31 -0
  17. scale_gp_beta/types/{dataset_item_batch_create_response.py → chat/completion_models_response.py} +5 -5
  18. scale_gp_beta/types/chat/model_definition.py +32 -0
  19. scale_gp_beta/types/component.py +18 -0
  20. scale_gp_beta/types/component_param.py +19 -0
  21. scale_gp_beta/types/container.py +35 -0
  22. scale_gp_beta/types/container_param.py +28 -0
  23. scale_gp_beta/types/dataset_item.py +2 -0
  24. scale_gp_beta/types/dataset_item_list_params.py +7 -6
  25. scale_gp_beta/types/dataset_item_retrieve_params.py +1 -2
  26. scale_gp_beta/types/dataset_list_params.py +10 -4
  27. scale_gp_beta/types/evaluation.py +12 -2
  28. scale_gp_beta/types/evaluation_create_params.py +5 -5
  29. scale_gp_beta/types/{evaluation_archive_response.py → evaluation_delete_response.py} +2 -2
  30. scale_gp_beta/types/evaluation_item_list_params.py +6 -5
  31. scale_gp_beta/types/evaluation_list_params.py +9 -3
  32. scale_gp_beta/types/evaluation_task.py +139 -33
  33. scale_gp_beta/types/evaluation_task_param.py +88 -33
  34. scale_gp_beta/types/evaluation_update_params.py +17 -0
  35. scale_gp_beta/types/file_list_params.py +5 -4
  36. scale_gp_beta/types/inference_model.py +0 -4
  37. scale_gp_beta/types/item_locator.py +7 -0
  38. scale_gp_beta/types/item_locator_template.py +7 -0
  39. scale_gp_beta/types/model_list_params.py +17 -18
  40. scale_gp_beta/types/span.py +40 -1
  41. scale_gp_beta/types/span_batch_params.py +130 -0
  42. scale_gp_beta/types/span_create_params.py +71 -3
  43. scale_gp_beta/types/span_list_params.py +7 -6
  44. scale_gp_beta/types/span_update_params.py +5 -3
  45. {scale_gp_beta-0.1.0a12.dist-info → scale_gp_beta-0.1.0a14.dist-info}/METADATA +1 -1
  46. {scale_gp_beta-0.1.0a12.dist-info → scale_gp_beta-0.1.0a14.dist-info}/RECORD +48 -37
  47. {scale_gp_beta-0.1.0a12.dist-info → scale_gp_beta-0.1.0a14.dist-info}/WHEEL +0 -0
  48. {scale_gp_beta-0.1.0a12.dist-info → scale_gp_beta-0.1.0a14.dist-info}/licenses/LICENSE +0 -0
scale_gp_beta/__init__.py CHANGED
@@ -1,5 +1,7 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ import typing as _t
4
+
3
5
  from . import types
4
6
  from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes
5
7
  from ._utils import file_from_path
@@ -80,6 +82,9 @@ __all__ = [
80
82
  "DefaultAsyncHttpxClient",
81
83
  ]
82
84
 
85
+ if not _t.TYPE_CHECKING:
86
+ from ._utils._resources_proxy import resources as resources
87
+
83
88
  _setup_logging()
84
89
 
85
90
  # Update the __module__ attribute for exported symbols so that
@@ -46,7 +46,10 @@ class LazyProxy(Generic[T], ABC):
46
46
  @property # type: ignore
47
47
  @override
48
48
  def __class__(self) -> type: # pyright: ignore
49
- proxied = self.__get_proxied__()
49
+ try:
50
+ proxied = self.__get_proxied__()
51
+ except Exception:
52
+ return type(self)
50
53
  if issubclass(type(proxied), LazyProxy):
51
54
  return type(proxied)
52
55
  return proxied.__class__
@@ -0,0 +1,24 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import Any
4
+ from typing_extensions import override
5
+
6
+ from ._proxy import LazyProxy
7
+
8
+
9
+ class ResourcesProxy(LazyProxy[Any]):
10
+ """A proxy for the `scale_gp_beta.resources` module.
11
+
12
+ This is used so that we can lazily import `scale_gp_beta.resources` only when
13
+ needed *and* so that users can just import `scale_gp_beta` and reference `scale_gp_beta.resources`
14
+ """
15
+
16
+ @override
17
+ def __load__(self) -> Any:
18
+ import importlib
19
+
20
+ mod = importlib.import_module("scale_gp_beta.resources")
21
+ return mod
22
+
23
+
24
+ resources = ResourcesProxy().__as_proxied__()
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.12" # 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,10 +18,11 @@ from ..._response import (
18
18
  async_to_streamed_response_wrapper,
19
19
  )
20
20
  from ..._streaming import Stream, AsyncStream
21
- from ...types.chat import completion_create_params
21
+ from ...types.chat import completion_create_params, completion_models_params
22
22
  from ..._base_client import make_request_options
23
23
  from ...types.chat.chat_completion_chunk import ChatCompletionChunk
24
24
  from ...types.chat.completion_create_response import CompletionCreateResponse
25
+ from ...types.chat.completion_models_response import CompletionModelsResponse
25
26
 
26
27
  __all__ = ["CompletionsResource", "AsyncCompletionsResource"]
27
28
 
@@ -518,6 +519,67 @@ class CompletionsResource(SyncAPIResource):
518
519
  stream_cls=Stream[ChatCompletionChunk],
519
520
  )
520
521
 
522
+ def models(
523
+ self,
524
+ *,
525
+ ending_before: str | NotGiven = NOT_GIVEN,
526
+ limit: int | NotGiven = NOT_GIVEN,
527
+ model_vendor: Literal[
528
+ "openai",
529
+ "cohere",
530
+ "vertex_ai",
531
+ "anthropic",
532
+ "azure",
533
+ "gemini",
534
+ "launch",
535
+ "llmengine",
536
+ "model_zoo",
537
+ "bedrock",
538
+ "xai",
539
+ ]
540
+ | NotGiven = NOT_GIVEN,
541
+ sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
542
+ starting_after: str | NotGiven = NOT_GIVEN,
543
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
544
+ # The extra values given here take precedence over values defined on the client or passed to this method.
545
+ extra_headers: Headers | None = None,
546
+ extra_query: Query | None = None,
547
+ extra_body: Body | None = None,
548
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
549
+ ) -> CompletionModelsResponse:
550
+ """
551
+ Chat Completions
552
+
553
+ Args:
554
+ extra_headers: Send extra headers
555
+
556
+ extra_query: Add additional query parameters to the request
557
+
558
+ extra_body: Add additional JSON properties to the request
559
+
560
+ timeout: Override the client-level default timeout for this request, in seconds
561
+ """
562
+ return self._get(
563
+ "/v5/chat/completions/models",
564
+ options=make_request_options(
565
+ extra_headers=extra_headers,
566
+ extra_query=extra_query,
567
+ extra_body=extra_body,
568
+ timeout=timeout,
569
+ query=maybe_transform(
570
+ {
571
+ "ending_before": ending_before,
572
+ "limit": limit,
573
+ "model_vendor": model_vendor,
574
+ "sort_order": sort_order,
575
+ "starting_after": starting_after,
576
+ },
577
+ completion_models_params.CompletionModelsParams,
578
+ ),
579
+ ),
580
+ cast_to=CompletionModelsResponse,
581
+ )
582
+
521
583
 
522
584
  class AsyncCompletionsResource(AsyncAPIResource):
523
585
  @cached_property
@@ -1011,6 +1073,67 @@ class AsyncCompletionsResource(AsyncAPIResource):
1011
1073
  stream_cls=AsyncStream[ChatCompletionChunk],
1012
1074
  )
1013
1075
 
1076
+ async def models(
1077
+ self,
1078
+ *,
1079
+ ending_before: str | NotGiven = NOT_GIVEN,
1080
+ limit: int | NotGiven = NOT_GIVEN,
1081
+ model_vendor: Literal[
1082
+ "openai",
1083
+ "cohere",
1084
+ "vertex_ai",
1085
+ "anthropic",
1086
+ "azure",
1087
+ "gemini",
1088
+ "launch",
1089
+ "llmengine",
1090
+ "model_zoo",
1091
+ "bedrock",
1092
+ "xai",
1093
+ ]
1094
+ | NotGiven = NOT_GIVEN,
1095
+ sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
1096
+ starting_after: str | NotGiven = NOT_GIVEN,
1097
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1098
+ # The extra values given here take precedence over values defined on the client or passed to this method.
1099
+ extra_headers: Headers | None = None,
1100
+ extra_query: Query | None = None,
1101
+ extra_body: Body | None = None,
1102
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1103
+ ) -> CompletionModelsResponse:
1104
+ """
1105
+ Chat Completions
1106
+
1107
+ Args:
1108
+ extra_headers: Send extra headers
1109
+
1110
+ extra_query: Add additional query parameters to the request
1111
+
1112
+ extra_body: Add additional JSON properties to the request
1113
+
1114
+ timeout: Override the client-level default timeout for this request, in seconds
1115
+ """
1116
+ return await self._get(
1117
+ "/v5/chat/completions/models",
1118
+ options=make_request_options(
1119
+ extra_headers=extra_headers,
1120
+ extra_query=extra_query,
1121
+ extra_body=extra_body,
1122
+ timeout=timeout,
1123
+ query=await async_maybe_transform(
1124
+ {
1125
+ "ending_before": ending_before,
1126
+ "limit": limit,
1127
+ "model_vendor": model_vendor,
1128
+ "sort_order": sort_order,
1129
+ "starting_after": starting_after,
1130
+ },
1131
+ completion_models_params.CompletionModelsParams,
1132
+ ),
1133
+ ),
1134
+ cast_to=CompletionModelsResponse,
1135
+ )
1136
+
1014
1137
 
1015
1138
  class CompletionsResourceWithRawResponse:
1016
1139
  def __init__(self, completions: CompletionsResource) -> None:
@@ -1019,6 +1142,9 @@ class CompletionsResourceWithRawResponse:
1019
1142
  self.create = to_raw_response_wrapper(
1020
1143
  completions.create,
1021
1144
  )
1145
+ self.models = to_raw_response_wrapper(
1146
+ completions.models,
1147
+ )
1022
1148
 
1023
1149
 
1024
1150
  class AsyncCompletionsResourceWithRawResponse:
@@ -1028,6 +1154,9 @@ class AsyncCompletionsResourceWithRawResponse:
1028
1154
  self.create = async_to_raw_response_wrapper(
1029
1155
  completions.create,
1030
1156
  )
1157
+ self.models = async_to_raw_response_wrapper(
1158
+ completions.models,
1159
+ )
1031
1160
 
1032
1161
 
1033
1162
  class CompletionsResourceWithStreamingResponse:
@@ -1037,6 +1166,9 @@ class CompletionsResourceWithStreamingResponse:
1037
1166
  self.create = to_streamed_response_wrapper(
1038
1167
  completions.create,
1039
1168
  )
1169
+ self.models = to_streamed_response_wrapper(
1170
+ completions.models,
1171
+ )
1040
1172
 
1041
1173
 
1042
1174
  class AsyncCompletionsResourceWithStreamingResponse:
@@ -1046,3 +1178,6 @@ class AsyncCompletionsResourceWithStreamingResponse:
1046
1178
  self.create = async_to_streamed_response_wrapper(
1047
1179
  completions.create,
1048
1180
  )
1181
+ self.models = async_to_streamed_response_wrapper(
1182
+ completions.models,
1183
+ )
@@ -2,7 +2,8 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Dict, Iterable, Optional
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
 
@@ -55,7 +55,7 @@ class DatasetItemsResource(SyncAPIResource):
55
55
  self,
56
56
  dataset_item_id: str,
57
57
  *,
58
- version: Optional[int] | NotGiven = NOT_GIVEN,
58
+ version: int | NotGiven = NOT_GIVEN,
59
59
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
60
60
  # The extra values given here take precedence over values defined on the client or passed to this method.
61
61
  extra_headers: Headers | None = None,
@@ -132,12 +132,13 @@ class DatasetItemsResource(SyncAPIResource):
132
132
  def list(
133
133
  self,
134
134
  *,
135
- dataset_id: Optional[str] | NotGiven = NOT_GIVEN,
136
- ending_before: Optional[str] | NotGiven = NOT_GIVEN,
135
+ dataset_id: str | NotGiven = NOT_GIVEN,
136
+ ending_before: str | NotGiven = NOT_GIVEN,
137
137
  include_archived: bool | NotGiven = NOT_GIVEN,
138
138
  limit: int | NotGiven = NOT_GIVEN,
139
- starting_after: Optional[str] | NotGiven = NOT_GIVEN,
140
- version: Optional[int] | NotGiven = NOT_GIVEN,
139
+ sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
140
+ starting_after: str | NotGiven = NOT_GIVEN,
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.
142
143
  # The extra values given here take precedence over values defined on the client or passed to this method.
143
144
  extra_headers: Headers | None = None,
@@ -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
 
@@ -288,7 +292,7 @@ class AsyncDatasetItemsResource(AsyncAPIResource):
288
292
  self,
289
293
  dataset_item_id: str,
290
294
  *,
291
- version: Optional[int] | NotGiven = NOT_GIVEN,
295
+ version: int | NotGiven = NOT_GIVEN,
292
296
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
293
297
  # The extra values given here take precedence over values defined on the client or passed to this method.
294
298
  extra_headers: Headers | None = None,
@@ -367,12 +371,13 @@ class AsyncDatasetItemsResource(AsyncAPIResource):
367
371
  def list(
368
372
  self,
369
373
  *,
370
- dataset_id: Optional[str] | NotGiven = NOT_GIVEN,
371
- ending_before: Optional[str] | NotGiven = NOT_GIVEN,
374
+ dataset_id: str | NotGiven = NOT_GIVEN,
375
+ ending_before: str | NotGiven = NOT_GIVEN,
372
376
  include_archived: bool | NotGiven = NOT_GIVEN,
373
377
  limit: int | NotGiven = NOT_GIVEN,
374
- starting_after: Optional[str] | NotGiven = NOT_GIVEN,
375
- version: Optional[int] | NotGiven = NOT_GIVEN,
378
+ sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
379
+ starting_after: str | NotGiven = NOT_GIVEN,
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.
377
382
  # The extra values given here take precedence over values defined on the client or passed to this method.
378
383
  extra_headers: Headers | None = None,
@@ -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
 
@@ -2,7 +2,8 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Dict, List, Iterable, Optional
5
+ from typing import Dict, List, Iterable
6
+ from typing_extensions import Literal
6
7
 
7
8
  import httpx
8
9
 
@@ -181,10 +182,13 @@ class DatasetsResource(SyncAPIResource):
181
182
  def list(
182
183
  self,
183
184
  *,
184
- ending_before: Optional[str] | NotGiven = NOT_GIVEN,
185
+ ending_before: str | NotGiven = NOT_GIVEN,
185
186
  include_archived: bool | NotGiven = NOT_GIVEN,
186
187
  limit: int | NotGiven = NOT_GIVEN,
187
- starting_after: Optional[str] | NotGiven = NOT_GIVEN,
188
+ name: str | NotGiven = NOT_GIVEN,
189
+ sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
190
+ starting_after: str | NotGiven = NOT_GIVEN,
191
+ tags: List[str] | NotGiven = NOT_GIVEN,
188
192
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
189
193
  # The extra values given here take precedence over values defined on the client or passed to this method.
190
194
  extra_headers: Headers | None = None,
@@ -217,7 +221,10 @@ class DatasetsResource(SyncAPIResource):
217
221
  "ending_before": ending_before,
218
222
  "include_archived": include_archived,
219
223
  "limit": limit,
224
+ "name": name,
225
+ "sort_order": sort_order,
220
226
  "starting_after": starting_after,
227
+ "tags": tags,
221
228
  },
222
229
  dataset_list_params.DatasetListParams,
223
230
  ),
@@ -415,10 +422,13 @@ class AsyncDatasetsResource(AsyncAPIResource):
415
422
  def list(
416
423
  self,
417
424
  *,
418
- ending_before: Optional[str] | NotGiven = NOT_GIVEN,
425
+ ending_before: str | NotGiven = NOT_GIVEN,
419
426
  include_archived: bool | NotGiven = NOT_GIVEN,
420
427
  limit: int | NotGiven = NOT_GIVEN,
421
- starting_after: Optional[str] | NotGiven = NOT_GIVEN,
428
+ name: str | NotGiven = NOT_GIVEN,
429
+ sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
430
+ starting_after: str | NotGiven = NOT_GIVEN,
431
+ tags: List[str] | NotGiven = NOT_GIVEN,
422
432
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
423
433
  # The extra values given here take precedence over values defined on the client or passed to this method.
424
434
  extra_headers: Headers | None = None,
@@ -451,7 +461,10 @@ class AsyncDatasetsResource(AsyncAPIResource):
451
461
  "ending_before": ending_before,
452
462
  "include_archived": include_archived,
453
463
  "limit": limit,
464
+ "name": name,
465
+ "sort_order": sort_order,
454
466
  "starting_after": starting_after,
467
+ "tags": tags,
455
468
  },
456
469
  dataset_list_params.DatasetListParams,
457
470
  ),
@@ -2,7 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Optional
5
+ from typing_extensions import Literal
6
6
 
7
7
  import httpx
8
8
 
@@ -87,11 +87,12 @@ class EvaluationItemsResource(SyncAPIResource):
87
87
  def list(
88
88
  self,
89
89
  *,
90
- ending_before: Optional[str] | NotGiven = NOT_GIVEN,
91
- evaluation_id: Optional[str] | NotGiven = NOT_GIVEN,
90
+ ending_before: str | NotGiven = NOT_GIVEN,
91
+ evaluation_id: str | NotGiven = NOT_GIVEN,
92
92
  include_archived: bool | NotGiven = NOT_GIVEN,
93
93
  limit: int | NotGiven = NOT_GIVEN,
94
- starting_after: Optional[str] | NotGiven = NOT_GIVEN,
94
+ sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
95
+ starting_after: str | NotGiven = NOT_GIVEN,
95
96
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
96
97
  # The extra values given here take precedence over values defined on the client or passed to this method.
97
98
  extra_headers: Headers | None = None,
@@ -125,6 +126,7 @@ class EvaluationItemsResource(SyncAPIResource):
125
126
  "evaluation_id": evaluation_id,
126
127
  "include_archived": include_archived,
127
128
  "limit": limit,
129
+ "sort_order": sort_order,
128
130
  "starting_after": starting_after,
129
131
  },
130
132
  evaluation_item_list_params.EvaluationItemListParams,
@@ -197,11 +199,12 @@ class AsyncEvaluationItemsResource(AsyncAPIResource):
197
199
  def list(
198
200
  self,
199
201
  *,
200
- ending_before: Optional[str] | NotGiven = NOT_GIVEN,
201
- evaluation_id: Optional[str] | NotGiven = NOT_GIVEN,
202
+ ending_before: str | NotGiven = NOT_GIVEN,
203
+ evaluation_id: str | NotGiven = NOT_GIVEN,
202
204
  include_archived: bool | NotGiven = NOT_GIVEN,
203
205
  limit: int | NotGiven = NOT_GIVEN,
204
- starting_after: Optional[str] | NotGiven = NOT_GIVEN,
206
+ sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
207
+ starting_after: str | NotGiven = NOT_GIVEN,
205
208
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
206
209
  # The extra values given here take precedence over values defined on the client or passed to this method.
207
210
  extra_headers: Headers | None = None,
@@ -235,6 +238,7 @@ class AsyncEvaluationItemsResource(AsyncAPIResource):
235
238
  "evaluation_id": evaluation_id,
236
239
  "include_archived": include_archived,
237
240
  "limit": limit,
241
+ "sort_order": sort_order,
238
242
  "starting_after": starting_after,
239
243
  },
240
244
  evaluation_item_list_params.EvaluationItemListParams,