scale-gp-beta 0.1.0a8__py3-none-any.whl → 0.1.0a10__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/_base_client.py +40 -2
- scale_gp_beta/_client.py +9 -1
- scale_gp_beta/_models.py +0 -1
- scale_gp_beta/_utils/_transform.py +46 -1
- scale_gp_beta/_utils/_typing.py +3 -1
- scale_gp_beta/_version.py +1 -1
- scale_gp_beta/resources/__init__.py +14 -0
- scale_gp_beta/resources/chat/completions.py +6 -2
- scale_gp_beta/resources/completions.py +6 -2
- scale_gp_beta/resources/datasets.py +17 -1
- scale_gp_beta/resources/evaluations.py +40 -4
- scale_gp_beta/resources/spans.py +654 -0
- scale_gp_beta/types/__init__.py +5 -0
- scale_gp_beta/types/dataset.py +4 -1
- scale_gp_beta/types/dataset_create_params.py +4 -1
- scale_gp_beta/types/dataset_update_params.py +4 -0
- scale_gp_beta/types/evaluation.py +7 -0
- scale_gp_beta/types/evaluation_create_params.py +12 -0
- scale_gp_beta/types/evaluation_list_params.py +4 -2
- scale_gp_beta/types/evaluation_retrieve_params.py +4 -1
- scale_gp_beta/types/evaluation_task.py +205 -0
- scale_gp_beta/types/evaluation_task_param.py +39 -45
- scale_gp_beta/types/span.py +38 -0
- scale_gp_beta/types/span_create_params.py +58 -0
- scale_gp_beta/types/span_list_params.py +27 -0
- scale_gp_beta/types/span_update_params.py +21 -0
- {scale_gp_beta-0.1.0a8.dist-info → scale_gp_beta-0.1.0a10.dist-info}/METADATA +8 -8
- {scale_gp_beta-0.1.0a8.dist-info → scale_gp_beta-0.1.0a10.dist-info}/RECORD +30 -24
- {scale_gp_beta-0.1.0a8.dist-info → scale_gp_beta-0.1.0a10.dist-info}/WHEEL +0 -0
- {scale_gp_beta-0.1.0a8.dist-info → scale_gp_beta-0.1.0a10.dist-info}/licenses/LICENSE +0 -0
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Dict, Iterable, Optional
|
|
6
|
-
from typing_extensions import overload
|
|
5
|
+
from typing import Dict, List, Iterable, Optional
|
|
6
|
+
from typing_extensions import Literal, overload
|
|
7
7
|
|
|
8
8
|
import httpx
|
|
9
9
|
|
|
@@ -58,6 +58,7 @@ class EvaluationsResource(SyncAPIResource):
|
|
|
58
58
|
data: Iterable[Dict[str, object]],
|
|
59
59
|
name: str,
|
|
60
60
|
description: str | NotGiven = NOT_GIVEN,
|
|
61
|
+
tags: List[str] | NotGiven = NOT_GIVEN,
|
|
61
62
|
tasks: Iterable[EvaluationTaskParam] | NotGiven = NOT_GIVEN,
|
|
62
63
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
63
64
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -72,6 +73,8 @@ class EvaluationsResource(SyncAPIResource):
|
|
|
72
73
|
Args:
|
|
73
74
|
data: Items to be evaluated
|
|
74
75
|
|
|
76
|
+
tags: The tags associated with the entity
|
|
77
|
+
|
|
75
78
|
tasks: Tasks allow you to augment and evaluate your data
|
|
76
79
|
|
|
77
80
|
extra_headers: Send extra headers
|
|
@@ -92,6 +95,7 @@ class EvaluationsResource(SyncAPIResource):
|
|
|
92
95
|
name: str,
|
|
93
96
|
data: Iterable[evaluation_create_params.EvaluationFromDatasetCreateRequestData] | NotGiven = NOT_GIVEN,
|
|
94
97
|
description: str | NotGiven = NOT_GIVEN,
|
|
98
|
+
tags: List[str] | NotGiven = NOT_GIVEN,
|
|
95
99
|
tasks: Iterable[EvaluationTaskParam] | NotGiven = NOT_GIVEN,
|
|
96
100
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
97
101
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -108,6 +112,8 @@ class EvaluationsResource(SyncAPIResource):
|
|
|
108
112
|
|
|
109
113
|
data: Items to be evaluated, including references to the input dataset items
|
|
110
114
|
|
|
115
|
+
tags: The tags associated with the entity
|
|
116
|
+
|
|
111
117
|
tasks: Tasks allow you to augment and evaluate your data
|
|
112
118
|
|
|
113
119
|
extra_headers: Send extra headers
|
|
@@ -128,6 +134,7 @@ class EvaluationsResource(SyncAPIResource):
|
|
|
128
134
|
dataset: evaluation_create_params.EvaluationWithDatasetCreateRequestDataset,
|
|
129
135
|
name: str,
|
|
130
136
|
description: str | NotGiven = NOT_GIVEN,
|
|
137
|
+
tags: List[str] | NotGiven = NOT_GIVEN,
|
|
131
138
|
tasks: Iterable[EvaluationTaskParam] | NotGiven = NOT_GIVEN,
|
|
132
139
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
133
140
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -144,6 +151,8 @@ class EvaluationsResource(SyncAPIResource):
|
|
|
144
151
|
|
|
145
152
|
dataset: Create a reusable dataset from items in the `data` field
|
|
146
153
|
|
|
154
|
+
tags: The tags associated with the entity
|
|
155
|
+
|
|
147
156
|
tasks: Tasks allow you to augment and evaluate your data
|
|
148
157
|
|
|
149
158
|
extra_headers: Send extra headers
|
|
@@ -165,6 +174,7 @@ class EvaluationsResource(SyncAPIResource):
|
|
|
165
174
|
| NotGiven = NOT_GIVEN,
|
|
166
175
|
name: str,
|
|
167
176
|
description: str | NotGiven = NOT_GIVEN,
|
|
177
|
+
tags: List[str] | NotGiven = NOT_GIVEN,
|
|
168
178
|
tasks: Iterable[EvaluationTaskParam] | NotGiven = NOT_GIVEN,
|
|
169
179
|
dataset_id: str | NotGiven = NOT_GIVEN,
|
|
170
180
|
dataset: evaluation_create_params.EvaluationWithDatasetCreateRequestDataset | NotGiven = NOT_GIVEN,
|
|
@@ -182,6 +192,7 @@ class EvaluationsResource(SyncAPIResource):
|
|
|
182
192
|
"data": data,
|
|
183
193
|
"name": name,
|
|
184
194
|
"description": description,
|
|
195
|
+
"tags": tags,
|
|
185
196
|
"tasks": tasks,
|
|
186
197
|
"dataset_id": dataset_id,
|
|
187
198
|
"dataset": dataset,
|
|
@@ -199,6 +210,7 @@ class EvaluationsResource(SyncAPIResource):
|
|
|
199
210
|
evaluation_id: str,
|
|
200
211
|
*,
|
|
201
212
|
include_archived: bool | NotGiven = NOT_GIVEN,
|
|
213
|
+
views: List[Literal["tasks"]] | NotGiven = NOT_GIVEN,
|
|
202
214
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
203
215
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
204
216
|
extra_headers: Headers | None = None,
|
|
@@ -228,7 +240,11 @@ class EvaluationsResource(SyncAPIResource):
|
|
|
228
240
|
extra_body=extra_body,
|
|
229
241
|
timeout=timeout,
|
|
230
242
|
query=maybe_transform(
|
|
231
|
-
{
|
|
243
|
+
{
|
|
244
|
+
"include_archived": include_archived,
|
|
245
|
+
"views": views,
|
|
246
|
+
},
|
|
247
|
+
evaluation_retrieve_params.EvaluationRetrieveParams,
|
|
232
248
|
),
|
|
233
249
|
),
|
|
234
250
|
cast_to=Evaluation,
|
|
@@ -241,6 +257,7 @@ class EvaluationsResource(SyncAPIResource):
|
|
|
241
257
|
include_archived: bool | NotGiven = NOT_GIVEN,
|
|
242
258
|
limit: int | NotGiven = NOT_GIVEN,
|
|
243
259
|
starting_after: Optional[str] | NotGiven = NOT_GIVEN,
|
|
260
|
+
views: List[Literal["tasks"]] | NotGiven = NOT_GIVEN,
|
|
244
261
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
245
262
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
246
263
|
extra_headers: Headers | None = None,
|
|
@@ -274,6 +291,7 @@ class EvaluationsResource(SyncAPIResource):
|
|
|
274
291
|
"include_archived": include_archived,
|
|
275
292
|
"limit": limit,
|
|
276
293
|
"starting_after": starting_after,
|
|
294
|
+
"views": views,
|
|
277
295
|
},
|
|
278
296
|
evaluation_list_params.EvaluationListParams,
|
|
279
297
|
),
|
|
@@ -342,6 +360,7 @@ class AsyncEvaluationsResource(AsyncAPIResource):
|
|
|
342
360
|
data: Iterable[Dict[str, object]],
|
|
343
361
|
name: str,
|
|
344
362
|
description: str | NotGiven = NOT_GIVEN,
|
|
363
|
+
tags: List[str] | NotGiven = NOT_GIVEN,
|
|
345
364
|
tasks: Iterable[EvaluationTaskParam] | NotGiven = NOT_GIVEN,
|
|
346
365
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
347
366
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -356,6 +375,8 @@ class AsyncEvaluationsResource(AsyncAPIResource):
|
|
|
356
375
|
Args:
|
|
357
376
|
data: Items to be evaluated
|
|
358
377
|
|
|
378
|
+
tags: The tags associated with the entity
|
|
379
|
+
|
|
359
380
|
tasks: Tasks allow you to augment and evaluate your data
|
|
360
381
|
|
|
361
382
|
extra_headers: Send extra headers
|
|
@@ -376,6 +397,7 @@ class AsyncEvaluationsResource(AsyncAPIResource):
|
|
|
376
397
|
name: str,
|
|
377
398
|
data: Iterable[evaluation_create_params.EvaluationFromDatasetCreateRequestData] | NotGiven = NOT_GIVEN,
|
|
378
399
|
description: str | NotGiven = NOT_GIVEN,
|
|
400
|
+
tags: List[str] | NotGiven = NOT_GIVEN,
|
|
379
401
|
tasks: Iterable[EvaluationTaskParam] | NotGiven = NOT_GIVEN,
|
|
380
402
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
381
403
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -392,6 +414,8 @@ class AsyncEvaluationsResource(AsyncAPIResource):
|
|
|
392
414
|
|
|
393
415
|
data: Items to be evaluated, including references to the input dataset items
|
|
394
416
|
|
|
417
|
+
tags: The tags associated with the entity
|
|
418
|
+
|
|
395
419
|
tasks: Tasks allow you to augment and evaluate your data
|
|
396
420
|
|
|
397
421
|
extra_headers: Send extra headers
|
|
@@ -412,6 +436,7 @@ class AsyncEvaluationsResource(AsyncAPIResource):
|
|
|
412
436
|
dataset: evaluation_create_params.EvaluationWithDatasetCreateRequestDataset,
|
|
413
437
|
name: str,
|
|
414
438
|
description: str | NotGiven = NOT_GIVEN,
|
|
439
|
+
tags: List[str] | NotGiven = NOT_GIVEN,
|
|
415
440
|
tasks: Iterable[EvaluationTaskParam] | NotGiven = NOT_GIVEN,
|
|
416
441
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
417
442
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -428,6 +453,8 @@ class AsyncEvaluationsResource(AsyncAPIResource):
|
|
|
428
453
|
|
|
429
454
|
dataset: Create a reusable dataset from items in the `data` field
|
|
430
455
|
|
|
456
|
+
tags: The tags associated with the entity
|
|
457
|
+
|
|
431
458
|
tasks: Tasks allow you to augment and evaluate your data
|
|
432
459
|
|
|
433
460
|
extra_headers: Send extra headers
|
|
@@ -449,6 +476,7 @@ class AsyncEvaluationsResource(AsyncAPIResource):
|
|
|
449
476
|
| NotGiven = NOT_GIVEN,
|
|
450
477
|
name: str,
|
|
451
478
|
description: str | NotGiven = NOT_GIVEN,
|
|
479
|
+
tags: List[str] | NotGiven = NOT_GIVEN,
|
|
452
480
|
tasks: Iterable[EvaluationTaskParam] | NotGiven = NOT_GIVEN,
|
|
453
481
|
dataset_id: str | NotGiven = NOT_GIVEN,
|
|
454
482
|
dataset: evaluation_create_params.EvaluationWithDatasetCreateRequestDataset | NotGiven = NOT_GIVEN,
|
|
@@ -466,6 +494,7 @@ class AsyncEvaluationsResource(AsyncAPIResource):
|
|
|
466
494
|
"data": data,
|
|
467
495
|
"name": name,
|
|
468
496
|
"description": description,
|
|
497
|
+
"tags": tags,
|
|
469
498
|
"tasks": tasks,
|
|
470
499
|
"dataset_id": dataset_id,
|
|
471
500
|
"dataset": dataset,
|
|
@@ -483,6 +512,7 @@ class AsyncEvaluationsResource(AsyncAPIResource):
|
|
|
483
512
|
evaluation_id: str,
|
|
484
513
|
*,
|
|
485
514
|
include_archived: bool | NotGiven = NOT_GIVEN,
|
|
515
|
+
views: List[Literal["tasks"]] | NotGiven = NOT_GIVEN,
|
|
486
516
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
487
517
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
488
518
|
extra_headers: Headers | None = None,
|
|
@@ -512,7 +542,11 @@ class AsyncEvaluationsResource(AsyncAPIResource):
|
|
|
512
542
|
extra_body=extra_body,
|
|
513
543
|
timeout=timeout,
|
|
514
544
|
query=await async_maybe_transform(
|
|
515
|
-
{
|
|
545
|
+
{
|
|
546
|
+
"include_archived": include_archived,
|
|
547
|
+
"views": views,
|
|
548
|
+
},
|
|
549
|
+
evaluation_retrieve_params.EvaluationRetrieveParams,
|
|
516
550
|
),
|
|
517
551
|
),
|
|
518
552
|
cast_to=Evaluation,
|
|
@@ -525,6 +559,7 @@ class AsyncEvaluationsResource(AsyncAPIResource):
|
|
|
525
559
|
include_archived: bool | NotGiven = NOT_GIVEN,
|
|
526
560
|
limit: int | NotGiven = NOT_GIVEN,
|
|
527
561
|
starting_after: Optional[str] | NotGiven = NOT_GIVEN,
|
|
562
|
+
views: List[Literal["tasks"]] | NotGiven = NOT_GIVEN,
|
|
528
563
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
529
564
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
530
565
|
extra_headers: Headers | None = None,
|
|
@@ -558,6 +593,7 @@ class AsyncEvaluationsResource(AsyncAPIResource):
|
|
|
558
593
|
"include_archived": include_archived,
|
|
559
594
|
"limit": limit,
|
|
560
595
|
"starting_after": starting_after,
|
|
596
|
+
"views": views,
|
|
561
597
|
},
|
|
562
598
|
evaluation_list_params.EvaluationListParams,
|
|
563
599
|
),
|