scale-gp-beta 0.1.0a39__py3-none-any.whl → 0.1.0a40__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 +8 -2
- scale_gp_beta/_client.py +564 -143
- scale_gp_beta/_streaming.py +12 -10
- scale_gp_beta/_types.py +3 -2
- scale_gp_beta/_version.py +1 -1
- scale_gp_beta/resources/chat/completions.py +4 -0
- scale_gp_beta/resources/credentials.py +4 -0
- scale_gp_beta/resources/dataset_items.py +4 -0
- scale_gp_beta/resources/datasets.py +4 -0
- scale_gp_beta/resources/evaluation_items.py +4 -0
- scale_gp_beta/resources/evaluations.py +4 -0
- scale_gp_beta/resources/files/files.py +4 -0
- scale_gp_beta/resources/models.py +4 -0
- scale_gp_beta/resources/questions.py +4 -0
- scale_gp_beta/resources/spans.py +28 -0
- scale_gp_beta/types/chat/completion_models_params.py +2 -0
- scale_gp_beta/types/credential_list_params.py +2 -0
- scale_gp_beta/types/dataset_item_list_params.py +2 -0
- scale_gp_beta/types/dataset_list_params.py +2 -0
- scale_gp_beta/types/evaluation.py +2 -0
- scale_gp_beta/types/evaluation_create_params.py +2 -0
- scale_gp_beta/types/evaluation_item_list_params.py +2 -0
- scale_gp_beta/types/evaluation_list_params.py +2 -0
- scale_gp_beta/types/evaluation_task.py +5 -1
- scale_gp_beta/types/evaluation_task_param.py +5 -1
- scale_gp_beta/types/file_import_from_cloud_response.py +4 -0
- scale_gp_beta/types/file_list_params.py +2 -0
- scale_gp_beta/types/inference_create_params.py +2 -0
- scale_gp_beta/types/model_list_params.py +2 -0
- scale_gp_beta/types/question_list_params.py +2 -0
- scale_gp_beta/types/span_assessment.py +2 -0
- scale_gp_beta/types/span_search_params.py +11 -0
- {scale_gp_beta-0.1.0a39.dist-info → scale_gp_beta-0.1.0a40.dist-info}/METADATA +3 -40
- {scale_gp_beta-0.1.0a39.dist-info → scale_gp_beta-0.1.0a40.dist-info}/RECORD +36 -36
- {scale_gp_beta-0.1.0a39.dist-info → scale_gp_beta-0.1.0a40.dist-info}/WHEEL +0 -0
- {scale_gp_beta-0.1.0a39.dist-info → scale_gp_beta-0.1.0a40.dist-info}/licenses/LICENSE +0 -0
scale_gp_beta/_streaming.py
CHANGED
|
@@ -54,11 +54,12 @@ class Stream(Generic[_T]):
|
|
|
54
54
|
process_data = self._client._process_response_data
|
|
55
55
|
iterator = self._iter_events()
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
try:
|
|
58
|
+
for sse in iterator:
|
|
59
|
+
yield process_data(data=sse.json(), cast_to=cast_to, response=response)
|
|
60
|
+
finally:
|
|
61
|
+
# Ensure the response is closed even if the consumer doesn't read all data
|
|
62
|
+
response.close()
|
|
62
63
|
|
|
63
64
|
def __enter__(self) -> Self:
|
|
64
65
|
return self
|
|
@@ -117,11 +118,12 @@ class AsyncStream(Generic[_T]):
|
|
|
117
118
|
process_data = self._client._process_response_data
|
|
118
119
|
iterator = self._iter_events()
|
|
119
120
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
121
|
+
try:
|
|
122
|
+
async for sse in iterator:
|
|
123
|
+
yield process_data(data=sse.json(), cast_to=cast_to, response=response)
|
|
124
|
+
finally:
|
|
125
|
+
# Ensure the response is closed even if the consumer doesn't read all data
|
|
126
|
+
await response.aclose()
|
|
125
127
|
|
|
126
128
|
async def __aenter__(self) -> Self:
|
|
127
129
|
return self
|
scale_gp_beta/_types.py
CHANGED
|
@@ -243,6 +243,9 @@ _T_co = TypeVar("_T_co", covariant=True)
|
|
|
243
243
|
if TYPE_CHECKING:
|
|
244
244
|
# This works because str.__contains__ does not accept object (either in typeshed or at runtime)
|
|
245
245
|
# https://github.com/hauntsaninja/useful_types/blob/5e9710f3875107d068e7679fd7fec9cfab0eff3b/useful_types/__init__.py#L285
|
|
246
|
+
#
|
|
247
|
+
# Note: index() and count() methods are intentionally omitted to allow pyright to properly
|
|
248
|
+
# infer TypedDict types when dict literals are used in lists assigned to SequenceNotStr.
|
|
246
249
|
class SequenceNotStr(Protocol[_T_co]):
|
|
247
250
|
@overload
|
|
248
251
|
def __getitem__(self, index: SupportsIndex, /) -> _T_co: ...
|
|
@@ -251,8 +254,6 @@ if TYPE_CHECKING:
|
|
|
251
254
|
def __contains__(self, value: object, /) -> bool: ...
|
|
252
255
|
def __len__(self) -> int: ...
|
|
253
256
|
def __iter__(self) -> Iterator[_T_co]: ...
|
|
254
|
-
def index(self, value: Any, start: int = 0, stop: int = ..., /) -> int: ...
|
|
255
|
-
def count(self, value: Any, /) -> int: ...
|
|
256
257
|
def __reversed__(self) -> Iterator[_T_co]: ...
|
|
257
258
|
else:
|
|
258
259
|
# just point this to a normal `Sequence` at runtime to avoid having to special case
|
scale_gp_beta/_version.py
CHANGED
|
@@ -539,6 +539,7 @@ class CompletionsResource(SyncAPIResource):
|
|
|
539
539
|
"fireworks_ai",
|
|
540
540
|
]
|
|
541
541
|
| Omit = omit,
|
|
542
|
+
sort_by: str | Omit = omit,
|
|
542
543
|
sort_order: Literal["asc", "desc"] | Omit = omit,
|
|
543
544
|
starting_after: str | Omit = omit,
|
|
544
545
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -572,6 +573,7 @@ class CompletionsResource(SyncAPIResource):
|
|
|
572
573
|
"ending_before": ending_before,
|
|
573
574
|
"limit": limit,
|
|
574
575
|
"model_vendor": model_vendor,
|
|
576
|
+
"sort_by": sort_by,
|
|
575
577
|
"sort_order": sort_order,
|
|
576
578
|
"starting_after": starting_after,
|
|
577
579
|
},
|
|
@@ -1094,6 +1096,7 @@ class AsyncCompletionsResource(AsyncAPIResource):
|
|
|
1094
1096
|
"fireworks_ai",
|
|
1095
1097
|
]
|
|
1096
1098
|
| Omit = omit,
|
|
1099
|
+
sort_by: str | Omit = omit,
|
|
1097
1100
|
sort_order: Literal["asc", "desc"] | Omit = omit,
|
|
1098
1101
|
starting_after: str | Omit = omit,
|
|
1099
1102
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -1127,6 +1130,7 @@ class AsyncCompletionsResource(AsyncAPIResource):
|
|
|
1127
1130
|
"ending_before": ending_before,
|
|
1128
1131
|
"limit": limit,
|
|
1129
1132
|
"model_vendor": model_vendor,
|
|
1133
|
+
"sort_by": sort_by,
|
|
1130
1134
|
"sort_order": sort_order,
|
|
1131
1135
|
"starting_after": starting_after,
|
|
1132
1136
|
},
|
|
@@ -201,6 +201,7 @@ class CredentialsResource(SyncAPIResource):
|
|
|
201
201
|
ending_before: str | Omit = omit,
|
|
202
202
|
limit: int | Omit = omit,
|
|
203
203
|
name: str | Omit = omit,
|
|
204
|
+
sort_by: str | Omit = omit,
|
|
204
205
|
sort_order: Literal["asc", "desc"] | Omit = omit,
|
|
205
206
|
starting_after: str | Omit = omit,
|
|
206
207
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -238,6 +239,7 @@ class CredentialsResource(SyncAPIResource):
|
|
|
238
239
|
"ending_before": ending_before,
|
|
239
240
|
"limit": limit,
|
|
240
241
|
"name": name,
|
|
242
|
+
"sort_by": sort_by,
|
|
241
243
|
"sort_order": sort_order,
|
|
242
244
|
"starting_after": starting_after,
|
|
243
245
|
},
|
|
@@ -554,6 +556,7 @@ class AsyncCredentialsResource(AsyncAPIResource):
|
|
|
554
556
|
ending_before: str | Omit = omit,
|
|
555
557
|
limit: int | Omit = omit,
|
|
556
558
|
name: str | Omit = omit,
|
|
559
|
+
sort_by: str | Omit = omit,
|
|
557
560
|
sort_order: Literal["asc", "desc"] | Omit = omit,
|
|
558
561
|
starting_after: str | Omit = omit,
|
|
559
562
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -591,6 +594,7 @@ class AsyncCredentialsResource(AsyncAPIResource):
|
|
|
591
594
|
"ending_before": ending_before,
|
|
592
595
|
"limit": limit,
|
|
593
596
|
"name": name,
|
|
597
|
+
"sort_by": sort_by,
|
|
594
598
|
"sort_order": sort_order,
|
|
595
599
|
"starting_after": starting_after,
|
|
596
600
|
},
|
|
@@ -146,6 +146,7 @@ class DatasetItemsResource(SyncAPIResource):
|
|
|
146
146
|
ending_before: str | Omit = omit,
|
|
147
147
|
include_archived: bool | Omit = omit,
|
|
148
148
|
limit: int | Omit = omit,
|
|
149
|
+
sort_by: str | Omit = omit,
|
|
149
150
|
sort_order: Literal["asc", "desc"] | Omit = omit,
|
|
150
151
|
starting_after: str | Omit = omit,
|
|
151
152
|
version: int | Omit = omit,
|
|
@@ -189,6 +190,7 @@ class DatasetItemsResource(SyncAPIResource):
|
|
|
189
190
|
"ending_before": ending_before,
|
|
190
191
|
"include_archived": include_archived,
|
|
191
192
|
"limit": limit,
|
|
193
|
+
"sort_by": sort_by,
|
|
192
194
|
"sort_order": sort_order,
|
|
193
195
|
"starting_after": starting_after,
|
|
194
196
|
"version": version,
|
|
@@ -396,6 +398,7 @@ class AsyncDatasetItemsResource(AsyncAPIResource):
|
|
|
396
398
|
ending_before: str | Omit = omit,
|
|
397
399
|
include_archived: bool | Omit = omit,
|
|
398
400
|
limit: int | Omit = omit,
|
|
401
|
+
sort_by: str | Omit = omit,
|
|
399
402
|
sort_order: Literal["asc", "desc"] | Omit = omit,
|
|
400
403
|
starting_after: str | Omit = omit,
|
|
401
404
|
version: int | Omit = omit,
|
|
@@ -439,6 +442,7 @@ class AsyncDatasetItemsResource(AsyncAPIResource):
|
|
|
439
442
|
"ending_before": ending_before,
|
|
440
443
|
"include_archived": include_archived,
|
|
441
444
|
"limit": limit,
|
|
445
|
+
"sort_by": sort_by,
|
|
442
446
|
"sort_order": sort_order,
|
|
443
447
|
"starting_after": starting_after,
|
|
444
448
|
"version": version,
|
|
@@ -238,6 +238,7 @@ class DatasetsResource(SyncAPIResource):
|
|
|
238
238
|
include_archived: bool | Omit = omit,
|
|
239
239
|
limit: int | Omit = omit,
|
|
240
240
|
name: str | Omit = omit,
|
|
241
|
+
sort_by: str | Omit = omit,
|
|
241
242
|
sort_order: Literal["asc", "desc"] | Omit = omit,
|
|
242
243
|
starting_after: str | Omit = omit,
|
|
243
244
|
tags: SequenceNotStr[str] | Omit = omit,
|
|
@@ -274,6 +275,7 @@ class DatasetsResource(SyncAPIResource):
|
|
|
274
275
|
"include_archived": include_archived,
|
|
275
276
|
"limit": limit,
|
|
276
277
|
"name": name,
|
|
278
|
+
"sort_by": sort_by,
|
|
277
279
|
"sort_order": sort_order,
|
|
278
280
|
"starting_after": starting_after,
|
|
279
281
|
"tags": tags,
|
|
@@ -530,6 +532,7 @@ class AsyncDatasetsResource(AsyncAPIResource):
|
|
|
530
532
|
include_archived: bool | Omit = omit,
|
|
531
533
|
limit: int | Omit = omit,
|
|
532
534
|
name: str | Omit = omit,
|
|
535
|
+
sort_by: str | Omit = omit,
|
|
533
536
|
sort_order: Literal["asc", "desc"] | Omit = omit,
|
|
534
537
|
starting_after: str | Omit = omit,
|
|
535
538
|
tags: SequenceNotStr[str] | Omit = omit,
|
|
@@ -566,6 +569,7 @@ class AsyncDatasetsResource(AsyncAPIResource):
|
|
|
566
569
|
"include_archived": include_archived,
|
|
567
570
|
"limit": limit,
|
|
568
571
|
"name": name,
|
|
572
|
+
"sort_by": sort_by,
|
|
569
573
|
"sort_order": sort_order,
|
|
570
574
|
"starting_after": starting_after,
|
|
571
575
|
"tags": tags,
|
|
@@ -91,6 +91,7 @@ class EvaluationItemsResource(SyncAPIResource):
|
|
|
91
91
|
evaluation_id: str | Omit = omit,
|
|
92
92
|
include_archived: bool | Omit = omit,
|
|
93
93
|
limit: int | Omit = omit,
|
|
94
|
+
sort_by: str | Omit = omit,
|
|
94
95
|
sort_order: Literal["asc", "desc"] | Omit = omit,
|
|
95
96
|
starting_after: str | Omit = omit,
|
|
96
97
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -126,6 +127,7 @@ class EvaluationItemsResource(SyncAPIResource):
|
|
|
126
127
|
"evaluation_id": evaluation_id,
|
|
127
128
|
"include_archived": include_archived,
|
|
128
129
|
"limit": limit,
|
|
130
|
+
"sort_by": sort_by,
|
|
129
131
|
"sort_order": sort_order,
|
|
130
132
|
"starting_after": starting_after,
|
|
131
133
|
},
|
|
@@ -203,6 +205,7 @@ class AsyncEvaluationItemsResource(AsyncAPIResource):
|
|
|
203
205
|
evaluation_id: str | Omit = omit,
|
|
204
206
|
include_archived: bool | Omit = omit,
|
|
205
207
|
limit: int | Omit = omit,
|
|
208
|
+
sort_by: str | Omit = omit,
|
|
206
209
|
sort_order: Literal["asc", "desc"] | Omit = omit,
|
|
207
210
|
starting_after: str | Omit = omit,
|
|
208
211
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -238,6 +241,7 @@ class AsyncEvaluationItemsResource(AsyncAPIResource):
|
|
|
238
241
|
"evaluation_id": evaluation_id,
|
|
239
242
|
"include_archived": include_archived,
|
|
240
243
|
"limit": limit,
|
|
244
|
+
"sort_by": sort_by,
|
|
241
245
|
"sort_order": sort_order,
|
|
242
246
|
"starting_after": starting_after,
|
|
243
247
|
},
|
|
@@ -370,6 +370,7 @@ class EvaluationsResource(SyncAPIResource):
|
|
|
370
370
|
include_archived: bool | Omit = omit,
|
|
371
371
|
limit: int | Omit = omit,
|
|
372
372
|
name: str | Omit = omit,
|
|
373
|
+
sort_by: str | Omit = omit,
|
|
373
374
|
sort_order: Literal["asc", "desc"] | Omit = omit,
|
|
374
375
|
starting_after: str | Omit = omit,
|
|
375
376
|
tags: SequenceNotStr[str] | Omit = omit,
|
|
@@ -407,6 +408,7 @@ class EvaluationsResource(SyncAPIResource):
|
|
|
407
408
|
"include_archived": include_archived,
|
|
408
409
|
"limit": limit,
|
|
409
410
|
"name": name,
|
|
411
|
+
"sort_by": sort_by,
|
|
410
412
|
"sort_order": sort_order,
|
|
411
413
|
"starting_after": starting_after,
|
|
412
414
|
"tags": tags,
|
|
@@ -791,6 +793,7 @@ class AsyncEvaluationsResource(AsyncAPIResource):
|
|
|
791
793
|
include_archived: bool | Omit = omit,
|
|
792
794
|
limit: int | Omit = omit,
|
|
793
795
|
name: str | Omit = omit,
|
|
796
|
+
sort_by: str | Omit = omit,
|
|
794
797
|
sort_order: Literal["asc", "desc"] | Omit = omit,
|
|
795
798
|
starting_after: str | Omit = omit,
|
|
796
799
|
tags: SequenceNotStr[str] | Omit = omit,
|
|
@@ -828,6 +831,7 @@ class AsyncEvaluationsResource(AsyncAPIResource):
|
|
|
828
831
|
"include_archived": include_archived,
|
|
829
832
|
"limit": limit,
|
|
830
833
|
"name": name,
|
|
834
|
+
"sort_by": sort_by,
|
|
831
835
|
"sort_order": sort_order,
|
|
832
836
|
"starting_after": starting_after,
|
|
833
837
|
"tags": tags,
|
|
@@ -172,6 +172,7 @@ class FilesResource(SyncAPIResource):
|
|
|
172
172
|
ending_before: str | Omit = omit,
|
|
173
173
|
filename: str | Omit = omit,
|
|
174
174
|
limit: int | Omit = omit,
|
|
175
|
+
sort_by: str | Omit = omit,
|
|
175
176
|
sort_order: Literal["asc", "desc"] | Omit = omit,
|
|
176
177
|
starting_after: str | Omit = omit,
|
|
177
178
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -208,6 +209,7 @@ class FilesResource(SyncAPIResource):
|
|
|
208
209
|
"ending_before": ending_before,
|
|
209
210
|
"filename": filename,
|
|
210
211
|
"limit": limit,
|
|
212
|
+
"sort_by": sort_by,
|
|
211
213
|
"sort_order": sort_order,
|
|
212
214
|
"starting_after": starting_after,
|
|
213
215
|
},
|
|
@@ -422,6 +424,7 @@ class AsyncFilesResource(AsyncAPIResource):
|
|
|
422
424
|
ending_before: str | Omit = omit,
|
|
423
425
|
filename: str | Omit = omit,
|
|
424
426
|
limit: int | Omit = omit,
|
|
427
|
+
sort_by: str | Omit = omit,
|
|
425
428
|
sort_order: Literal["asc", "desc"] | Omit = omit,
|
|
426
429
|
starting_after: str | Omit = omit,
|
|
427
430
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -458,6 +461,7 @@ class AsyncFilesResource(AsyncAPIResource):
|
|
|
458
461
|
"ending_before": ending_before,
|
|
459
462
|
"filename": filename,
|
|
460
463
|
"limit": limit,
|
|
464
|
+
"sort_by": sort_by,
|
|
461
465
|
"sort_order": sort_order,
|
|
462
466
|
"starting_after": starting_after,
|
|
463
467
|
},
|
|
@@ -320,6 +320,7 @@ class ModelsResource(SyncAPIResource):
|
|
|
320
320
|
]
|
|
321
321
|
| Omit = omit,
|
|
322
322
|
name: str | Omit = omit,
|
|
323
|
+
sort_by: str | Omit = omit,
|
|
323
324
|
sort_order: Literal["asc", "desc"] | Omit = omit,
|
|
324
325
|
starting_after: str | Omit = omit,
|
|
325
326
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -355,6 +356,7 @@ class ModelsResource(SyncAPIResource):
|
|
|
355
356
|
"limit": limit,
|
|
356
357
|
"model_vendor": model_vendor,
|
|
357
358
|
"name": name,
|
|
359
|
+
"sort_by": sort_by,
|
|
358
360
|
"sort_order": sort_order,
|
|
359
361
|
"starting_after": starting_after,
|
|
360
362
|
},
|
|
@@ -692,6 +694,7 @@ class AsyncModelsResource(AsyncAPIResource):
|
|
|
692
694
|
]
|
|
693
695
|
| Omit = omit,
|
|
694
696
|
name: str | Omit = omit,
|
|
697
|
+
sort_by: str | Omit = omit,
|
|
695
698
|
sort_order: Literal["asc", "desc"] | Omit = omit,
|
|
696
699
|
starting_after: str | Omit = omit,
|
|
697
700
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -727,6 +730,7 @@ class AsyncModelsResource(AsyncAPIResource):
|
|
|
727
730
|
"limit": limit,
|
|
728
731
|
"model_vendor": model_vendor,
|
|
729
732
|
"name": name,
|
|
733
|
+
"sort_by": sort_by,
|
|
730
734
|
"sort_order": sort_order,
|
|
731
735
|
"starting_after": starting_after,
|
|
732
736
|
},
|
|
@@ -339,6 +339,7 @@ class QuestionsResource(SyncAPIResource):
|
|
|
339
339
|
*,
|
|
340
340
|
ending_before: str | Omit = omit,
|
|
341
341
|
limit: int | Omit = omit,
|
|
342
|
+
sort_by: str | Omit = omit,
|
|
342
343
|
sort_order: Literal["asc", "desc"] | Omit = omit,
|
|
343
344
|
starting_after: str | Omit = omit,
|
|
344
345
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -372,6 +373,7 @@ class QuestionsResource(SyncAPIResource):
|
|
|
372
373
|
{
|
|
373
374
|
"ending_before": ending_before,
|
|
374
375
|
"limit": limit,
|
|
376
|
+
"sort_by": sort_by,
|
|
375
377
|
"sort_order": sort_order,
|
|
376
378
|
"starting_after": starting_after,
|
|
377
379
|
},
|
|
@@ -696,6 +698,7 @@ class AsyncQuestionsResource(AsyncAPIResource):
|
|
|
696
698
|
*,
|
|
697
699
|
ending_before: str | Omit = omit,
|
|
698
700
|
limit: int | Omit = omit,
|
|
701
|
+
sort_by: str | Omit = omit,
|
|
699
702
|
sort_order: Literal["asc", "desc"] | Omit = omit,
|
|
700
703
|
starting_after: str | Omit = omit,
|
|
701
704
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -729,6 +732,7 @@ class AsyncQuestionsResource(AsyncAPIResource):
|
|
|
729
732
|
{
|
|
730
733
|
"ending_before": ending_before,
|
|
731
734
|
"limit": limit,
|
|
735
|
+
"sort_by": sort_by,
|
|
732
736
|
"sort_order": sort_order,
|
|
733
737
|
"starting_after": starting_after,
|
|
734
738
|
},
|
scale_gp_beta/resources/spans.py
CHANGED
|
@@ -252,9 +252,13 @@ class SpansResource(SyncAPIResource):
|
|
|
252
252
|
ending_before: str | Omit = omit,
|
|
253
253
|
from_ts: Union[str, datetime] | Omit = omit,
|
|
254
254
|
limit: int | Omit = omit,
|
|
255
|
+
sort_by: str | Omit = omit,
|
|
255
256
|
sort_order: Literal["asc", "desc"] | Omit = omit,
|
|
256
257
|
starting_after: str | Omit = omit,
|
|
257
258
|
to_ts: Union[str, datetime] | Omit = omit,
|
|
259
|
+
acp_types: SequenceNotStr[str] | Omit = omit,
|
|
260
|
+
agentex_agent_ids: SequenceNotStr[str] | Omit = omit,
|
|
261
|
+
agentex_agent_names: SequenceNotStr[str] | Omit = omit,
|
|
258
262
|
application_variant_ids: SequenceNotStr[str] | Omit = omit,
|
|
259
263
|
assessment_types: SequenceNotStr[str] | Omit = omit,
|
|
260
264
|
excluded_span_ids: SequenceNotStr[str] | Omit = omit,
|
|
@@ -285,6 +289,12 @@ class SpansResource(SyncAPIResource):
|
|
|
285
289
|
|
|
286
290
|
to_ts: The ending (most recent) timestamp in ISO format.
|
|
287
291
|
|
|
292
|
+
acp_types: Filter by ACP types
|
|
293
|
+
|
|
294
|
+
agentex_agent_ids: Filter by Agentex agent IDs
|
|
295
|
+
|
|
296
|
+
agentex_agent_names: Filter by Agentex agent names
|
|
297
|
+
|
|
288
298
|
application_variant_ids: Filter by application variant IDs
|
|
289
299
|
|
|
290
300
|
assessment_types: Filter spans by traces that have assessments of these types
|
|
@@ -326,6 +336,9 @@ class SpansResource(SyncAPIResource):
|
|
|
326
336
|
page=SyncCursorPage[Span],
|
|
327
337
|
body=maybe_transform(
|
|
328
338
|
{
|
|
339
|
+
"acp_types": acp_types,
|
|
340
|
+
"agentex_agent_ids": agentex_agent_ids,
|
|
341
|
+
"agentex_agent_names": agentex_agent_names,
|
|
329
342
|
"application_variant_ids": application_variant_ids,
|
|
330
343
|
"assessment_types": assessment_types,
|
|
331
344
|
"excluded_span_ids": excluded_span_ids,
|
|
@@ -354,6 +367,7 @@ class SpansResource(SyncAPIResource):
|
|
|
354
367
|
"ending_before": ending_before,
|
|
355
368
|
"from_ts": from_ts,
|
|
356
369
|
"limit": limit,
|
|
370
|
+
"sort_by": sort_by,
|
|
357
371
|
"sort_order": sort_order,
|
|
358
372
|
"starting_after": starting_after,
|
|
359
373
|
"to_ts": to_ts,
|
|
@@ -612,9 +626,13 @@ class AsyncSpansResource(AsyncAPIResource):
|
|
|
612
626
|
ending_before: str | Omit = omit,
|
|
613
627
|
from_ts: Union[str, datetime] | Omit = omit,
|
|
614
628
|
limit: int | Omit = omit,
|
|
629
|
+
sort_by: str | Omit = omit,
|
|
615
630
|
sort_order: Literal["asc", "desc"] | Omit = omit,
|
|
616
631
|
starting_after: str | Omit = omit,
|
|
617
632
|
to_ts: Union[str, datetime] | Omit = omit,
|
|
633
|
+
acp_types: SequenceNotStr[str] | Omit = omit,
|
|
634
|
+
agentex_agent_ids: SequenceNotStr[str] | Omit = omit,
|
|
635
|
+
agentex_agent_names: SequenceNotStr[str] | Omit = omit,
|
|
618
636
|
application_variant_ids: SequenceNotStr[str] | Omit = omit,
|
|
619
637
|
assessment_types: SequenceNotStr[str] | Omit = omit,
|
|
620
638
|
excluded_span_ids: SequenceNotStr[str] | Omit = omit,
|
|
@@ -645,6 +663,12 @@ class AsyncSpansResource(AsyncAPIResource):
|
|
|
645
663
|
|
|
646
664
|
to_ts: The ending (most recent) timestamp in ISO format.
|
|
647
665
|
|
|
666
|
+
acp_types: Filter by ACP types
|
|
667
|
+
|
|
668
|
+
agentex_agent_ids: Filter by Agentex agent IDs
|
|
669
|
+
|
|
670
|
+
agentex_agent_names: Filter by Agentex agent names
|
|
671
|
+
|
|
648
672
|
application_variant_ids: Filter by application variant IDs
|
|
649
673
|
|
|
650
674
|
assessment_types: Filter spans by traces that have assessments of these types
|
|
@@ -686,6 +710,9 @@ class AsyncSpansResource(AsyncAPIResource):
|
|
|
686
710
|
page=AsyncCursorPage[Span],
|
|
687
711
|
body=maybe_transform(
|
|
688
712
|
{
|
|
713
|
+
"acp_types": acp_types,
|
|
714
|
+
"agentex_agent_ids": agentex_agent_ids,
|
|
715
|
+
"agentex_agent_names": agentex_agent_names,
|
|
689
716
|
"application_variant_ids": application_variant_ids,
|
|
690
717
|
"assessment_types": assessment_types,
|
|
691
718
|
"excluded_span_ids": excluded_span_ids,
|
|
@@ -714,6 +741,7 @@ class AsyncSpansResource(AsyncAPIResource):
|
|
|
714
741
|
"ending_before": ending_before,
|
|
715
742
|
"from_ts": from_ts,
|
|
716
743
|
"limit": limit,
|
|
744
|
+
"sort_by": sort_by,
|
|
717
745
|
"sort_order": sort_order,
|
|
718
746
|
"starting_after": starting_after,
|
|
719
747
|
"to_ts": to_ts,
|
|
@@ -93,6 +93,8 @@ class EvaluationWithDatasetCreateRequest(TypedDict, total=False):
|
|
|
93
93
|
|
|
94
94
|
|
|
95
95
|
class EvaluationWithDatasetCreateRequestDataset(TypedDict, total=False):
|
|
96
|
+
"""Create a reusable dataset from items in the `data` field"""
|
|
97
|
+
|
|
96
98
|
name: Required[str]
|
|
97
99
|
|
|
98
100
|
description: str
|
|
@@ -210,6 +210,8 @@ class ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplication
|
|
|
210
210
|
|
|
211
211
|
|
|
212
212
|
class ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverrides(BaseModel):
|
|
213
|
+
"""Execution override options for agentic applications"""
|
|
214
|
+
|
|
213
215
|
concurrent: Optional[bool] = None
|
|
214
216
|
|
|
215
217
|
initial_state: Optional[
|
|
@@ -259,7 +261,9 @@ class ApplicationVariantV1EvaluationTask(BaseModel):
|
|
|
259
261
|
class AgentexOutputEvaluationTaskConfiguration(BaseModel):
|
|
260
262
|
agentex_agent_id: str
|
|
261
263
|
|
|
262
|
-
input_column:
|
|
264
|
+
input_column: Union[ItemLocator, object]
|
|
265
|
+
|
|
266
|
+
include_traces: Union[bool, ItemLocator, None] = None
|
|
263
267
|
|
|
264
268
|
|
|
265
269
|
class AgentexOutputEvaluationTask(BaseModel):
|
|
@@ -206,6 +206,8 @@ class ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplication
|
|
|
206
206
|
|
|
207
207
|
|
|
208
208
|
class ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverrides(TypedDict, total=False):
|
|
209
|
+
"""Execution override options for agentic applications"""
|
|
210
|
+
|
|
209
211
|
concurrent: bool
|
|
210
212
|
|
|
211
213
|
initial_state: ApplicationVariantV1EvaluationTaskConfigurationOverridesAgenticApplicationOverridesInitialState
|
|
@@ -251,7 +253,9 @@ class ApplicationVariantV1EvaluationTask(TypedDict, total=False):
|
|
|
251
253
|
class AgentexOutputEvaluationTaskConfiguration(TypedDict, total=False):
|
|
252
254
|
agentex_agent_id: Required[str]
|
|
253
255
|
|
|
254
|
-
input_column: Required[
|
|
256
|
+
input_column: Required[Union[ItemLocator, object]]
|
|
257
|
+
|
|
258
|
+
include_traces: Union[bool, ItemLocator]
|
|
255
259
|
|
|
256
260
|
|
|
257
261
|
class AgentexOutputEvaluationTask(TypedDict, total=False):
|
|
@@ -10,6 +10,10 @@ __all__ = ["FileImportFromCloudResponse", "Result", "ResultFile", "ResultFile_Fa
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class ResultFile_FailedFile(BaseModel):
|
|
13
|
+
"""
|
|
14
|
+
Minimal file representation for failed uploads containing only essential information.
|
|
15
|
+
"""
|
|
16
|
+
|
|
13
17
|
filename: str
|
|
14
18
|
"""The original filename from the request"""
|
|
15
19
|
|
|
@@ -22,6 +22,8 @@ class SpanSearchParams(TypedDict, total=False):
|
|
|
22
22
|
|
|
23
23
|
limit: int
|
|
24
24
|
|
|
25
|
+
sort_by: str
|
|
26
|
+
|
|
25
27
|
sort_order: Literal["asc", "desc"]
|
|
26
28
|
|
|
27
29
|
starting_after: str
|
|
@@ -29,6 +31,15 @@ class SpanSearchParams(TypedDict, total=False):
|
|
|
29
31
|
to_ts: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
|
|
30
32
|
"""The ending (most recent) timestamp in ISO format."""
|
|
31
33
|
|
|
34
|
+
acp_types: SequenceNotStr[str]
|
|
35
|
+
"""Filter by ACP types"""
|
|
36
|
+
|
|
37
|
+
agentex_agent_ids: SequenceNotStr[str]
|
|
38
|
+
"""Filter by Agentex agent IDs"""
|
|
39
|
+
|
|
40
|
+
agentex_agent_names: SequenceNotStr[str]
|
|
41
|
+
"""Filter by Agentex agent names"""
|
|
42
|
+
|
|
32
43
|
application_variant_ids: SequenceNotStr[str]
|
|
33
44
|
"""Filter by application variant IDs"""
|
|
34
45
|
|