scale-gp-beta 0.1.0a30__py3-none-any.whl → 0.1.0a32__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.
- scale_gp_beta/__init__.py +3 -1
- scale_gp_beta/_base_client.py +12 -12
- scale_gp_beta/_client.py +20 -20
- scale_gp_beta/_compat.py +48 -48
- scale_gp_beta/_models.py +51 -45
- scale_gp_beta/_qs.py +7 -7
- scale_gp_beta/_types.py +53 -12
- scale_gp_beta/_utils/__init__.py +9 -2
- scale_gp_beta/_utils/_compat.py +45 -0
- scale_gp_beta/_utils/_datetime_parse.py +136 -0
- scale_gp_beta/_utils/_transform.py +13 -3
- scale_gp_beta/_utils/_typing.py +6 -1
- scale_gp_beta/_utils/_utils.py +4 -5
- scale_gp_beta/_version.py +1 -1
- scale_gp_beta/resources/__init__.py +6 -6
- scale_gp_beta/resources/chat/completions.py +236 -236
- scale_gp_beta/resources/completions.py +142 -142
- scale_gp_beta/resources/dataset_items.py +27 -27
- scale_gp_beta/resources/datasets.py +38 -38
- scale_gp_beta/resources/evaluation_items.py +19 -19
- scale_gp_beta/resources/evaluations.py +97 -75
- scale_gp_beta/resources/files/content.py +3 -3
- scale_gp_beta/resources/files/files.py +21 -21
- scale_gp_beta/resources/inference.py +7 -7
- scale_gp_beta/resources/models.py +71 -73
- scale_gp_beta/resources/questions.py +43 -43
- scale_gp_beta/resources/responses.py +34 -34
- scale_gp_beta/resources/spans.py +81 -81
- scale_gp_beta/types/__init__.py +4 -4
- scale_gp_beta/types/chat/chat_completion.py +114 -19
- scale_gp_beta/types/chat/chat_completion_chunk.py +84 -14
- scale_gp_beta/types/chat/completion_create_params.py +5 -3
- scale_gp_beta/types/completion.py +36 -6
- scale_gp_beta/types/completion_create_params.py +5 -3
- scale_gp_beta/types/container.py +2 -2
- scale_gp_beta/types/container_param.py +2 -2
- scale_gp_beta/types/dataset_create_params.py +4 -2
- scale_gp_beta/types/dataset_list_params.py +3 -2
- scale_gp_beta/types/dataset_update_params.py +3 -2
- scale_gp_beta/types/evaluation.py +7 -1
- scale_gp_beta/types/evaluation_create_params.py +17 -6
- scale_gp_beta/types/evaluation_list_params.py +3 -1
- scale_gp_beta/types/evaluation_task.py +6 -1
- scale_gp_beta/types/evaluation_task_param.py +4 -3
- scale_gp_beta/types/evaluation_update_params.py +3 -2
- scale_gp_beta/types/inference_model.py +10 -1
- scale_gp_beta/types/model_create_params.py +6 -4
- scale_gp_beta/types/model_update_params.py +6 -4
- scale_gp_beta/types/question_create_params.py +4 -2
- scale_gp_beta/types/response.py +852 -142
- scale_gp_beta/types/response_create_params.py +7 -5
- scale_gp_beta/types/response_create_response.py +6072 -1012
- scale_gp_beta/types/span_search_params.py +8 -7
- {scale_gp_beta-0.1.0a30.dist-info → scale_gp_beta-0.1.0a32.dist-info}/METADATA +1 -1
- {scale_gp_beta-0.1.0a30.dist-info → scale_gp_beta-0.1.0a32.dist-info}/RECORD +57 -55
- {scale_gp_beta-0.1.0a30.dist-info → scale_gp_beta-0.1.0a32.dist-info}/WHEEL +0 -0
- {scale_gp_beta-0.1.0a30.dist-info → scale_gp_beta-0.1.0a32.dist-info}/licenses/LICENSE +0 -0
|
@@ -13,7 +13,7 @@ from ..types import (
|
|
|
13
13
|
evaluation_update_params,
|
|
14
14
|
evaluation_retrieve_params,
|
|
15
15
|
)
|
|
16
|
-
from .._types import
|
|
16
|
+
from .._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
|
|
17
17
|
from .._utils import required_args, maybe_transform, async_maybe_transform
|
|
18
18
|
from .._compat import cached_property
|
|
19
19
|
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
@@ -58,15 +58,16 @@ class EvaluationsResource(SyncAPIResource):
|
|
|
58
58
|
*,
|
|
59
59
|
data: Iterable[Dict[str, object]],
|
|
60
60
|
name: str,
|
|
61
|
-
description: str |
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
description: str | Omit = omit,
|
|
62
|
+
metadata: Dict[str, object] | Omit = omit,
|
|
63
|
+
tags: SequenceNotStr[str] | Omit = omit,
|
|
64
|
+
tasks: Iterable[EvaluationTaskParam] | Omit = omit,
|
|
64
65
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
65
66
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
66
67
|
extra_headers: Headers | None = None,
|
|
67
68
|
extra_query: Query | None = None,
|
|
68
69
|
extra_body: Body | None = None,
|
|
69
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
70
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
70
71
|
) -> Evaluation:
|
|
71
72
|
"""
|
|
72
73
|
Create Evaluation
|
|
@@ -74,6 +75,8 @@ class EvaluationsResource(SyncAPIResource):
|
|
|
74
75
|
Args:
|
|
75
76
|
data: Items to be evaluated
|
|
76
77
|
|
|
78
|
+
metadata: Optional metadata key-value pairs for the evaluation
|
|
79
|
+
|
|
77
80
|
tags: The tags associated with the entity
|
|
78
81
|
|
|
79
82
|
tasks: Tasks allow you to augment and evaluate your data
|
|
@@ -94,16 +97,17 @@ class EvaluationsResource(SyncAPIResource):
|
|
|
94
97
|
*,
|
|
95
98
|
dataset_id: str,
|
|
96
99
|
name: str,
|
|
97
|
-
data: Iterable[evaluation_create_params.EvaluationFromDatasetCreateRequestData] |
|
|
98
|
-
description: str |
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
data: Iterable[evaluation_create_params.EvaluationFromDatasetCreateRequestData] | Omit = omit,
|
|
101
|
+
description: str | Omit = omit,
|
|
102
|
+
metadata: Dict[str, object] | Omit = omit,
|
|
103
|
+
tags: SequenceNotStr[str] | Omit = omit,
|
|
104
|
+
tasks: Iterable[EvaluationTaskParam] | Omit = omit,
|
|
101
105
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
102
106
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
103
107
|
extra_headers: Headers | None = None,
|
|
104
108
|
extra_query: Query | None = None,
|
|
105
109
|
extra_body: Body | None = None,
|
|
106
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
110
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
107
111
|
) -> Evaluation:
|
|
108
112
|
"""
|
|
109
113
|
Create Evaluation
|
|
@@ -113,6 +117,8 @@ class EvaluationsResource(SyncAPIResource):
|
|
|
113
117
|
|
|
114
118
|
data: Items to be evaluated, including references to the input dataset items
|
|
115
119
|
|
|
120
|
+
metadata: Optional metadata key-value pairs for the evaluation
|
|
121
|
+
|
|
116
122
|
tags: The tags associated with the entity
|
|
117
123
|
|
|
118
124
|
tasks: Tasks allow you to augment and evaluate your data
|
|
@@ -134,15 +140,16 @@ class EvaluationsResource(SyncAPIResource):
|
|
|
134
140
|
data: Iterable[Dict[str, object]],
|
|
135
141
|
dataset: evaluation_create_params.EvaluationWithDatasetCreateRequestDataset,
|
|
136
142
|
name: str,
|
|
137
|
-
description: str |
|
|
138
|
-
|
|
139
|
-
|
|
143
|
+
description: str | Omit = omit,
|
|
144
|
+
metadata: Dict[str, object] | Omit = omit,
|
|
145
|
+
tags: SequenceNotStr[str] | Omit = omit,
|
|
146
|
+
tasks: Iterable[EvaluationTaskParam] | Omit = omit,
|
|
140
147
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
141
148
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
142
149
|
extra_headers: Headers | None = None,
|
|
143
150
|
extra_query: Query | None = None,
|
|
144
151
|
extra_body: Body | None = None,
|
|
145
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
152
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
146
153
|
) -> Evaluation:
|
|
147
154
|
"""
|
|
148
155
|
Create Evaluation
|
|
@@ -152,6 +159,8 @@ class EvaluationsResource(SyncAPIResource):
|
|
|
152
159
|
|
|
153
160
|
dataset: Create a reusable dataset from items in the `data` field
|
|
154
161
|
|
|
162
|
+
metadata: Optional metadata key-value pairs for the evaluation
|
|
163
|
+
|
|
155
164
|
tags: The tags associated with the entity
|
|
156
165
|
|
|
157
166
|
tasks: Tasks allow you to augment and evaluate your data
|
|
@@ -172,19 +181,20 @@ class EvaluationsResource(SyncAPIResource):
|
|
|
172
181
|
*,
|
|
173
182
|
data: Iterable[Dict[str, object]]
|
|
174
183
|
| Iterable[evaluation_create_params.EvaluationFromDatasetCreateRequestData]
|
|
175
|
-
|
|
|
184
|
+
| Omit = omit,
|
|
176
185
|
name: str,
|
|
177
|
-
description: str |
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
186
|
+
description: str | Omit = omit,
|
|
187
|
+
metadata: Dict[str, object] | Omit = omit,
|
|
188
|
+
tags: SequenceNotStr[str] | Omit = omit,
|
|
189
|
+
tasks: Iterable[EvaluationTaskParam] | Omit = omit,
|
|
190
|
+
dataset_id: str | Omit = omit,
|
|
191
|
+
dataset: evaluation_create_params.EvaluationWithDatasetCreateRequestDataset | Omit = omit,
|
|
182
192
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
183
193
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
184
194
|
extra_headers: Headers | None = None,
|
|
185
195
|
extra_query: Query | None = None,
|
|
186
196
|
extra_body: Body | None = None,
|
|
187
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
197
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
188
198
|
) -> Evaluation:
|
|
189
199
|
return self._post(
|
|
190
200
|
"/v5/evaluations",
|
|
@@ -193,6 +203,7 @@ class EvaluationsResource(SyncAPIResource):
|
|
|
193
203
|
"data": data,
|
|
194
204
|
"name": name,
|
|
195
205
|
"description": description,
|
|
206
|
+
"metadata": metadata,
|
|
196
207
|
"tags": tags,
|
|
197
208
|
"tasks": tasks,
|
|
198
209
|
"dataset_id": dataset_id,
|
|
@@ -210,14 +221,14 @@ class EvaluationsResource(SyncAPIResource):
|
|
|
210
221
|
self,
|
|
211
222
|
evaluation_id: str,
|
|
212
223
|
*,
|
|
213
|
-
include_archived: bool |
|
|
214
|
-
views: List[Literal["tasks"]] |
|
|
224
|
+
include_archived: bool | Omit = omit,
|
|
225
|
+
views: List[Literal["tasks"]] | Omit = omit,
|
|
215
226
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
216
227
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
217
228
|
extra_headers: Headers | None = None,
|
|
218
229
|
extra_query: Query | None = None,
|
|
219
230
|
extra_body: Body | None = None,
|
|
220
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
231
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
221
232
|
) -> Evaluation:
|
|
222
233
|
"""
|
|
223
234
|
Get Evaluation
|
|
@@ -255,15 +266,15 @@ class EvaluationsResource(SyncAPIResource):
|
|
|
255
266
|
self,
|
|
256
267
|
evaluation_id: str,
|
|
257
268
|
*,
|
|
258
|
-
description: str |
|
|
259
|
-
name: str |
|
|
260
|
-
tags:
|
|
269
|
+
description: str | Omit = omit,
|
|
270
|
+
name: str | Omit = omit,
|
|
271
|
+
tags: SequenceNotStr[str] | Omit = omit,
|
|
261
272
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
262
273
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
263
274
|
extra_headers: Headers | None = None,
|
|
264
275
|
extra_query: Query | None = None,
|
|
265
276
|
extra_body: Body | None = None,
|
|
266
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
277
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
267
278
|
) -> Evaluation:
|
|
268
279
|
"""
|
|
269
280
|
Update Evaluation
|
|
@@ -300,20 +311,20 @@ class EvaluationsResource(SyncAPIResource):
|
|
|
300
311
|
def list(
|
|
301
312
|
self,
|
|
302
313
|
*,
|
|
303
|
-
ending_before: str |
|
|
304
|
-
include_archived: bool |
|
|
305
|
-
limit: int |
|
|
306
|
-
name: str |
|
|
307
|
-
sort_order: Literal["asc", "desc"] |
|
|
308
|
-
starting_after: str |
|
|
309
|
-
tags:
|
|
310
|
-
views: List[Literal["tasks"]] |
|
|
314
|
+
ending_before: str | Omit = omit,
|
|
315
|
+
include_archived: bool | Omit = omit,
|
|
316
|
+
limit: int | Omit = omit,
|
|
317
|
+
name: str | Omit = omit,
|
|
318
|
+
sort_order: Literal["asc", "desc"] | Omit = omit,
|
|
319
|
+
starting_after: str | Omit = omit,
|
|
320
|
+
tags: SequenceNotStr[str] | Omit = omit,
|
|
321
|
+
views: List[Literal["tasks"]] | Omit = omit,
|
|
311
322
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
312
323
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
313
324
|
extra_headers: Headers | None = None,
|
|
314
325
|
extra_query: Query | None = None,
|
|
315
326
|
extra_body: Body | None = None,
|
|
316
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
327
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
317
328
|
) -> SyncCursorPage[Evaluation]:
|
|
318
329
|
"""
|
|
319
330
|
List Evaluations
|
|
@@ -361,7 +372,7 @@ class EvaluationsResource(SyncAPIResource):
|
|
|
361
372
|
extra_headers: Headers | None = None,
|
|
362
373
|
extra_query: Query | None = None,
|
|
363
374
|
extra_body: Body | None = None,
|
|
364
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
375
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
365
376
|
) -> EvaluationDeleteResponse:
|
|
366
377
|
"""
|
|
367
378
|
Archive Evaluation
|
|
@@ -412,15 +423,16 @@ class AsyncEvaluationsResource(AsyncAPIResource):
|
|
|
412
423
|
*,
|
|
413
424
|
data: Iterable[Dict[str, object]],
|
|
414
425
|
name: str,
|
|
415
|
-
description: str |
|
|
416
|
-
|
|
417
|
-
|
|
426
|
+
description: str | Omit = omit,
|
|
427
|
+
metadata: Dict[str, object] | Omit = omit,
|
|
428
|
+
tags: SequenceNotStr[str] | Omit = omit,
|
|
429
|
+
tasks: Iterable[EvaluationTaskParam] | Omit = omit,
|
|
418
430
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
419
431
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
420
432
|
extra_headers: Headers | None = None,
|
|
421
433
|
extra_query: Query | None = None,
|
|
422
434
|
extra_body: Body | None = None,
|
|
423
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
435
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
424
436
|
) -> Evaluation:
|
|
425
437
|
"""
|
|
426
438
|
Create Evaluation
|
|
@@ -428,6 +440,8 @@ class AsyncEvaluationsResource(AsyncAPIResource):
|
|
|
428
440
|
Args:
|
|
429
441
|
data: Items to be evaluated
|
|
430
442
|
|
|
443
|
+
metadata: Optional metadata key-value pairs for the evaluation
|
|
444
|
+
|
|
431
445
|
tags: The tags associated with the entity
|
|
432
446
|
|
|
433
447
|
tasks: Tasks allow you to augment and evaluate your data
|
|
@@ -448,16 +462,17 @@ class AsyncEvaluationsResource(AsyncAPIResource):
|
|
|
448
462
|
*,
|
|
449
463
|
dataset_id: str,
|
|
450
464
|
name: str,
|
|
451
|
-
data: Iterable[evaluation_create_params.EvaluationFromDatasetCreateRequestData] |
|
|
452
|
-
description: str |
|
|
453
|
-
|
|
454
|
-
|
|
465
|
+
data: Iterable[evaluation_create_params.EvaluationFromDatasetCreateRequestData] | Omit = omit,
|
|
466
|
+
description: str | Omit = omit,
|
|
467
|
+
metadata: Dict[str, object] | Omit = omit,
|
|
468
|
+
tags: SequenceNotStr[str] | Omit = omit,
|
|
469
|
+
tasks: Iterable[EvaluationTaskParam] | Omit = omit,
|
|
455
470
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
456
471
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
457
472
|
extra_headers: Headers | None = None,
|
|
458
473
|
extra_query: Query | None = None,
|
|
459
474
|
extra_body: Body | None = None,
|
|
460
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
475
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
461
476
|
) -> Evaluation:
|
|
462
477
|
"""
|
|
463
478
|
Create Evaluation
|
|
@@ -467,6 +482,8 @@ class AsyncEvaluationsResource(AsyncAPIResource):
|
|
|
467
482
|
|
|
468
483
|
data: Items to be evaluated, including references to the input dataset items
|
|
469
484
|
|
|
485
|
+
metadata: Optional metadata key-value pairs for the evaluation
|
|
486
|
+
|
|
470
487
|
tags: The tags associated with the entity
|
|
471
488
|
|
|
472
489
|
tasks: Tasks allow you to augment and evaluate your data
|
|
@@ -488,15 +505,16 @@ class AsyncEvaluationsResource(AsyncAPIResource):
|
|
|
488
505
|
data: Iterable[Dict[str, object]],
|
|
489
506
|
dataset: evaluation_create_params.EvaluationWithDatasetCreateRequestDataset,
|
|
490
507
|
name: str,
|
|
491
|
-
description: str |
|
|
492
|
-
|
|
493
|
-
|
|
508
|
+
description: str | Omit = omit,
|
|
509
|
+
metadata: Dict[str, object] | Omit = omit,
|
|
510
|
+
tags: SequenceNotStr[str] | Omit = omit,
|
|
511
|
+
tasks: Iterable[EvaluationTaskParam] | Omit = omit,
|
|
494
512
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
495
513
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
496
514
|
extra_headers: Headers | None = None,
|
|
497
515
|
extra_query: Query | None = None,
|
|
498
516
|
extra_body: Body | None = None,
|
|
499
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
517
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
500
518
|
) -> Evaluation:
|
|
501
519
|
"""
|
|
502
520
|
Create Evaluation
|
|
@@ -506,6 +524,8 @@ class AsyncEvaluationsResource(AsyncAPIResource):
|
|
|
506
524
|
|
|
507
525
|
dataset: Create a reusable dataset from items in the `data` field
|
|
508
526
|
|
|
527
|
+
metadata: Optional metadata key-value pairs for the evaluation
|
|
528
|
+
|
|
509
529
|
tags: The tags associated with the entity
|
|
510
530
|
|
|
511
531
|
tasks: Tasks allow you to augment and evaluate your data
|
|
@@ -526,19 +546,20 @@ class AsyncEvaluationsResource(AsyncAPIResource):
|
|
|
526
546
|
*,
|
|
527
547
|
data: Iterable[Dict[str, object]]
|
|
528
548
|
| Iterable[evaluation_create_params.EvaluationFromDatasetCreateRequestData]
|
|
529
|
-
|
|
|
549
|
+
| Omit = omit,
|
|
530
550
|
name: str,
|
|
531
|
-
description: str |
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
551
|
+
description: str | Omit = omit,
|
|
552
|
+
metadata: Dict[str, object] | Omit = omit,
|
|
553
|
+
tags: SequenceNotStr[str] | Omit = omit,
|
|
554
|
+
tasks: Iterable[EvaluationTaskParam] | Omit = omit,
|
|
555
|
+
dataset_id: str | Omit = omit,
|
|
556
|
+
dataset: evaluation_create_params.EvaluationWithDatasetCreateRequestDataset | Omit = omit,
|
|
536
557
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
537
558
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
538
559
|
extra_headers: Headers | None = None,
|
|
539
560
|
extra_query: Query | None = None,
|
|
540
561
|
extra_body: Body | None = None,
|
|
541
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
562
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
542
563
|
) -> Evaluation:
|
|
543
564
|
return await self._post(
|
|
544
565
|
"/v5/evaluations",
|
|
@@ -547,6 +568,7 @@ class AsyncEvaluationsResource(AsyncAPIResource):
|
|
|
547
568
|
"data": data,
|
|
548
569
|
"name": name,
|
|
549
570
|
"description": description,
|
|
571
|
+
"metadata": metadata,
|
|
550
572
|
"tags": tags,
|
|
551
573
|
"tasks": tasks,
|
|
552
574
|
"dataset_id": dataset_id,
|
|
@@ -564,14 +586,14 @@ class AsyncEvaluationsResource(AsyncAPIResource):
|
|
|
564
586
|
self,
|
|
565
587
|
evaluation_id: str,
|
|
566
588
|
*,
|
|
567
|
-
include_archived: bool |
|
|
568
|
-
views: List[Literal["tasks"]] |
|
|
589
|
+
include_archived: bool | Omit = omit,
|
|
590
|
+
views: List[Literal["tasks"]] | Omit = omit,
|
|
569
591
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
570
592
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
571
593
|
extra_headers: Headers | None = None,
|
|
572
594
|
extra_query: Query | None = None,
|
|
573
595
|
extra_body: Body | None = None,
|
|
574
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
596
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
575
597
|
) -> Evaluation:
|
|
576
598
|
"""
|
|
577
599
|
Get Evaluation
|
|
@@ -609,15 +631,15 @@ class AsyncEvaluationsResource(AsyncAPIResource):
|
|
|
609
631
|
self,
|
|
610
632
|
evaluation_id: str,
|
|
611
633
|
*,
|
|
612
|
-
description: str |
|
|
613
|
-
name: str |
|
|
614
|
-
tags:
|
|
634
|
+
description: str | Omit = omit,
|
|
635
|
+
name: str | Omit = omit,
|
|
636
|
+
tags: SequenceNotStr[str] | Omit = omit,
|
|
615
637
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
616
638
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
617
639
|
extra_headers: Headers | None = None,
|
|
618
640
|
extra_query: Query | None = None,
|
|
619
641
|
extra_body: Body | None = None,
|
|
620
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
642
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
621
643
|
) -> Evaluation:
|
|
622
644
|
"""
|
|
623
645
|
Update Evaluation
|
|
@@ -654,20 +676,20 @@ class AsyncEvaluationsResource(AsyncAPIResource):
|
|
|
654
676
|
def list(
|
|
655
677
|
self,
|
|
656
678
|
*,
|
|
657
|
-
ending_before: str |
|
|
658
|
-
include_archived: bool |
|
|
659
|
-
limit: int |
|
|
660
|
-
name: str |
|
|
661
|
-
sort_order: Literal["asc", "desc"] |
|
|
662
|
-
starting_after: str |
|
|
663
|
-
tags:
|
|
664
|
-
views: List[Literal["tasks"]] |
|
|
679
|
+
ending_before: str | Omit = omit,
|
|
680
|
+
include_archived: bool | Omit = omit,
|
|
681
|
+
limit: int | Omit = omit,
|
|
682
|
+
name: str | Omit = omit,
|
|
683
|
+
sort_order: Literal["asc", "desc"] | Omit = omit,
|
|
684
|
+
starting_after: str | Omit = omit,
|
|
685
|
+
tags: SequenceNotStr[str] | Omit = omit,
|
|
686
|
+
views: List[Literal["tasks"]] | Omit = omit,
|
|
665
687
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
666
688
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
667
689
|
extra_headers: Headers | None = None,
|
|
668
690
|
extra_query: Query | None = None,
|
|
669
691
|
extra_body: Body | None = None,
|
|
670
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
692
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
671
693
|
) -> AsyncPaginator[Evaluation, AsyncCursorPage[Evaluation]]:
|
|
672
694
|
"""
|
|
673
695
|
List Evaluations
|
|
@@ -715,7 +737,7 @@ class AsyncEvaluationsResource(AsyncAPIResource):
|
|
|
715
737
|
extra_headers: Headers | None = None,
|
|
716
738
|
extra_query: Query | None = None,
|
|
717
739
|
extra_body: Body | None = None,
|
|
718
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
740
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
719
741
|
) -> EvaluationDeleteResponse:
|
|
720
742
|
"""
|
|
721
743
|
Archive Evaluation
|
|
@@ -4,7 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import httpx
|
|
6
6
|
|
|
7
|
-
from ..._types import
|
|
7
|
+
from ..._types import Body, Query, Headers, NotGiven, not_given
|
|
8
8
|
from ..._compat import cached_property
|
|
9
9
|
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
10
10
|
from ..._response import (
|
|
@@ -47,7 +47,7 @@ class ContentResource(SyncAPIResource):
|
|
|
47
47
|
extra_headers: Headers | None = None,
|
|
48
48
|
extra_query: Query | None = None,
|
|
49
49
|
extra_body: Body | None = None,
|
|
50
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
50
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
51
51
|
) -> object:
|
|
52
52
|
"""
|
|
53
53
|
Get File Content
|
|
@@ -101,7 +101,7 @@ class AsyncContentResource(AsyncAPIResource):
|
|
|
101
101
|
extra_headers: Headers | None = None,
|
|
102
102
|
extra_query: Query | None = None,
|
|
103
103
|
extra_body: Body | None = None,
|
|
104
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
104
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
105
105
|
) -> object:
|
|
106
106
|
"""
|
|
107
107
|
Get File Content
|
|
@@ -16,7 +16,7 @@ from .content import (
|
|
|
16
16
|
ContentResourceWithStreamingResponse,
|
|
17
17
|
AsyncContentResourceWithStreamingResponse,
|
|
18
18
|
)
|
|
19
|
-
from ..._types import
|
|
19
|
+
from ..._types import Body, Omit, Query, Headers, NotGiven, FileTypes, omit, not_given
|
|
20
20
|
from ..._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform
|
|
21
21
|
from ..._compat import cached_property
|
|
22
22
|
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
@@ -67,7 +67,7 @@ class FilesResource(SyncAPIResource):
|
|
|
67
67
|
extra_headers: Headers | None = None,
|
|
68
68
|
extra_query: Query | None = None,
|
|
69
69
|
extra_body: Body | None = None,
|
|
70
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
70
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
71
71
|
) -> File:
|
|
72
72
|
"""
|
|
73
73
|
Upload File
|
|
@@ -106,7 +106,7 @@ class FilesResource(SyncAPIResource):
|
|
|
106
106
|
extra_headers: Headers | None = None,
|
|
107
107
|
extra_query: Query | None = None,
|
|
108
108
|
extra_body: Body | None = None,
|
|
109
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
109
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
110
110
|
) -> File:
|
|
111
111
|
"""
|
|
112
112
|
Get File
|
|
@@ -134,13 +134,13 @@ class FilesResource(SyncAPIResource):
|
|
|
134
134
|
self,
|
|
135
135
|
file_id: str,
|
|
136
136
|
*,
|
|
137
|
-
tags: Dict[str, object] |
|
|
137
|
+
tags: Dict[str, object] | Omit = omit,
|
|
138
138
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
139
139
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
140
140
|
extra_headers: Headers | None = None,
|
|
141
141
|
extra_query: Query | None = None,
|
|
142
142
|
extra_body: Body | None = None,
|
|
143
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
143
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
144
144
|
) -> File:
|
|
145
145
|
"""
|
|
146
146
|
Update File
|
|
@@ -168,16 +168,16 @@ class FilesResource(SyncAPIResource):
|
|
|
168
168
|
def list(
|
|
169
169
|
self,
|
|
170
170
|
*,
|
|
171
|
-
ending_before: str |
|
|
172
|
-
limit: int |
|
|
173
|
-
sort_order: Literal["asc", "desc"] |
|
|
174
|
-
starting_after: str |
|
|
171
|
+
ending_before: str | Omit = omit,
|
|
172
|
+
limit: int | Omit = omit,
|
|
173
|
+
sort_order: Literal["asc", "desc"] | Omit = omit,
|
|
174
|
+
starting_after: str | Omit = omit,
|
|
175
175
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
176
176
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
177
177
|
extra_headers: Headers | None = None,
|
|
178
178
|
extra_query: Query | None = None,
|
|
179
179
|
extra_body: Body | None = None,
|
|
180
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
180
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
181
181
|
) -> SyncCursorPage[File]:
|
|
182
182
|
"""
|
|
183
183
|
List Files
|
|
@@ -221,7 +221,7 @@ class FilesResource(SyncAPIResource):
|
|
|
221
221
|
extra_headers: Headers | None = None,
|
|
222
222
|
extra_query: Query | None = None,
|
|
223
223
|
extra_body: Body | None = None,
|
|
224
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
224
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
225
225
|
) -> FileDeleteResponse:
|
|
226
226
|
"""
|
|
227
227
|
Delete File
|
|
@@ -279,7 +279,7 @@ class AsyncFilesResource(AsyncAPIResource):
|
|
|
279
279
|
extra_headers: Headers | None = None,
|
|
280
280
|
extra_query: Query | None = None,
|
|
281
281
|
extra_body: Body | None = None,
|
|
282
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
282
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
283
283
|
) -> File:
|
|
284
284
|
"""
|
|
285
285
|
Upload File
|
|
@@ -318,7 +318,7 @@ class AsyncFilesResource(AsyncAPIResource):
|
|
|
318
318
|
extra_headers: Headers | None = None,
|
|
319
319
|
extra_query: Query | None = None,
|
|
320
320
|
extra_body: Body | None = None,
|
|
321
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
321
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
322
322
|
) -> File:
|
|
323
323
|
"""
|
|
324
324
|
Get File
|
|
@@ -346,13 +346,13 @@ class AsyncFilesResource(AsyncAPIResource):
|
|
|
346
346
|
self,
|
|
347
347
|
file_id: str,
|
|
348
348
|
*,
|
|
349
|
-
tags: Dict[str, object] |
|
|
349
|
+
tags: Dict[str, object] | Omit = omit,
|
|
350
350
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
351
351
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
352
352
|
extra_headers: Headers | None = None,
|
|
353
353
|
extra_query: Query | None = None,
|
|
354
354
|
extra_body: Body | None = None,
|
|
355
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
355
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
356
356
|
) -> File:
|
|
357
357
|
"""
|
|
358
358
|
Update File
|
|
@@ -380,16 +380,16 @@ class AsyncFilesResource(AsyncAPIResource):
|
|
|
380
380
|
def list(
|
|
381
381
|
self,
|
|
382
382
|
*,
|
|
383
|
-
ending_before: str |
|
|
384
|
-
limit: int |
|
|
385
|
-
sort_order: Literal["asc", "desc"] |
|
|
386
|
-
starting_after: str |
|
|
383
|
+
ending_before: str | Omit = omit,
|
|
384
|
+
limit: int | Omit = omit,
|
|
385
|
+
sort_order: Literal["asc", "desc"] | Omit = omit,
|
|
386
|
+
starting_after: str | Omit = omit,
|
|
387
387
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
388
388
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
389
389
|
extra_headers: Headers | None = None,
|
|
390
390
|
extra_query: Query | None = None,
|
|
391
391
|
extra_body: Body | None = None,
|
|
392
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
392
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
393
393
|
) -> AsyncPaginator[File, AsyncCursorPage[File]]:
|
|
394
394
|
"""
|
|
395
395
|
List Files
|
|
@@ -433,7 +433,7 @@ class AsyncFilesResource(AsyncAPIResource):
|
|
|
433
433
|
extra_headers: Headers | None = None,
|
|
434
434
|
extra_query: Query | None = None,
|
|
435
435
|
extra_body: Body | None = None,
|
|
436
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
436
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
437
437
|
) -> FileDeleteResponse:
|
|
438
438
|
"""
|
|
439
439
|
Delete File
|
|
@@ -7,7 +7,7 @@ from typing import Any, Dict, cast
|
|
|
7
7
|
import httpx
|
|
8
8
|
|
|
9
9
|
from ..types import inference_create_params
|
|
10
|
-
from .._types import
|
|
10
|
+
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
11
11
|
from .._utils import maybe_transform, async_maybe_transform
|
|
12
12
|
from .._compat import cached_property
|
|
13
13
|
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
@@ -47,14 +47,14 @@ class InferenceResource(SyncAPIResource):
|
|
|
47
47
|
self,
|
|
48
48
|
*,
|
|
49
49
|
model: str,
|
|
50
|
-
args: Dict[str, object] |
|
|
51
|
-
inference_configuration: inference_create_params.InferenceConfiguration |
|
|
50
|
+
args: Dict[str, object] | Omit = omit,
|
|
51
|
+
inference_configuration: inference_create_params.InferenceConfiguration | Omit = omit,
|
|
52
52
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
53
53
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
54
54
|
extra_headers: Headers | None = None,
|
|
55
55
|
extra_query: Query | None = None,
|
|
56
56
|
extra_body: Body | None = None,
|
|
57
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
57
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
58
58
|
) -> InferenceCreateResponse:
|
|
59
59
|
"""Generic Inference
|
|
60
60
|
|
|
@@ -121,14 +121,14 @@ class AsyncInferenceResource(AsyncAPIResource):
|
|
|
121
121
|
self,
|
|
122
122
|
*,
|
|
123
123
|
model: str,
|
|
124
|
-
args: Dict[str, object] |
|
|
125
|
-
inference_configuration: inference_create_params.InferenceConfiguration |
|
|
124
|
+
args: Dict[str, object] | Omit = omit,
|
|
125
|
+
inference_configuration: inference_create_params.InferenceConfiguration | Omit = omit,
|
|
126
126
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
127
127
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
128
128
|
extra_headers: Headers | None = None,
|
|
129
129
|
extra_query: Query | None = None,
|
|
130
130
|
extra_body: Body | None = None,
|
|
131
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
131
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
132
132
|
) -> InferenceCreateResponse:
|
|
133
133
|
"""Generic Inference
|
|
134
134
|
|