scale-gp-beta 0.1.0a11__py3-none-any.whl → 0.1.0a13__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 (44) 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/resources/chat/completions.py +136 -2
  6. scale_gp_beta/resources/dataset_items.py +11 -11
  7. scale_gp_beta/resources/datasets.py +13 -5
  8. scale_gp_beta/resources/evaluation_items.py +6 -8
  9. scale_gp_beta/resources/evaluations.py +138 -21
  10. scale_gp_beta/resources/files/files.py +5 -5
  11. scale_gp_beta/resources/models.py +31 -35
  12. scale_gp_beta/resources/spans.py +42 -22
  13. scale_gp_beta/types/__init__.py +8 -1
  14. scale_gp_beta/types/chat/__init__.py +2 -0
  15. scale_gp_beta/types/chat/completion_models_params.py +29 -0
  16. scale_gp_beta/types/chat/model_definition.py +32 -0
  17. scale_gp_beta/types/component.py +18 -0
  18. scale_gp_beta/types/component_param.py +19 -0
  19. scale_gp_beta/types/container.py +35 -0
  20. scale_gp_beta/types/container_param.py +28 -0
  21. scale_gp_beta/types/dataset_item_list_params.py +4 -5
  22. scale_gp_beta/types/dataset_item_retrieve_params.py +1 -2
  23. scale_gp_beta/types/dataset_list_params.py +7 -3
  24. scale_gp_beta/types/evaluation.py +12 -2
  25. scale_gp_beta/types/evaluation_create_params.py +5 -5
  26. scale_gp_beta/types/{evaluation_archive_response.py → evaluation_delete_response.py} +2 -2
  27. scale_gp_beta/types/evaluation_item_list_params.py +3 -4
  28. scale_gp_beta/types/evaluation_list_params.py +7 -3
  29. scale_gp_beta/types/evaluation_task.py +232 -33
  30. scale_gp_beta/types/evaluation_task_param.py +176 -33
  31. scale_gp_beta/types/evaluation_update_params.py +17 -0
  32. scale_gp_beta/types/file_list_params.py +2 -3
  33. scale_gp_beta/types/inference_model.py +0 -4
  34. scale_gp_beta/types/item_locator.py +7 -0
  35. scale_gp_beta/types/item_locator_template.py +7 -0
  36. scale_gp_beta/types/model_list_params.py +15 -18
  37. scale_gp_beta/types/span.py +40 -1
  38. scale_gp_beta/types/span_create_params.py +13 -5
  39. scale_gp_beta/types/span_list_params.py +4 -5
  40. scale_gp_beta/types/span_update_params.py +5 -3
  41. {scale_gp_beta-0.1.0a11.dist-info → scale_gp_beta-0.1.0a13.dist-info}/METADATA +1 -1
  42. {scale_gp_beta-0.1.0a11.dist-info → scale_gp_beta-0.1.0a13.dist-info}/RECORD +44 -34
  43. {scale_gp_beta-0.1.0a11.dist-info → scale_gp_beta-0.1.0a13.dist-info}/WHEEL +0 -0
  44. {scale_gp_beta-0.1.0a11.dist-info → scale_gp_beta-0.1.0a13.dist-info}/licenses/LICENSE +0 -0
@@ -2,12 +2,17 @@
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
6
  from typing_extensions import Literal, overload
7
7
 
8
8
  import httpx
9
9
 
10
- from ..types import evaluation_list_params, evaluation_create_params, evaluation_retrieve_params
10
+ from ..types import (
11
+ evaluation_list_params,
12
+ evaluation_create_params,
13
+ evaluation_update_params,
14
+ evaluation_retrieve_params,
15
+ )
11
16
  from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
12
17
  from .._utils import required_args, maybe_transform, async_maybe_transform
13
18
  from .._compat import cached_property
@@ -22,7 +27,7 @@ from ..pagination import SyncCursorPage, AsyncCursorPage
22
27
  from .._base_client import AsyncPaginator, make_request_options
23
28
  from ..types.evaluation import Evaluation
24
29
  from ..types.evaluation_task_param import EvaluationTaskParam
25
- from ..types.evaluation_archive_response import EvaluationArchiveResponse
30
+ from ..types.evaluation_delete_response import EvaluationDeleteResponse
26
31
 
27
32
  __all__ = ["EvaluationsResource", "AsyncEvaluationsResource"]
28
33
 
@@ -246,13 +251,61 @@ class EvaluationsResource(SyncAPIResource):
246
251
  cast_to=Evaluation,
247
252
  )
248
253
 
254
+ def update(
255
+ self,
256
+ evaluation_id: str,
257
+ *,
258
+ description: str | NotGiven = NOT_GIVEN,
259
+ name: str | NotGiven = NOT_GIVEN,
260
+ tags: List[str] | NotGiven = NOT_GIVEN,
261
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
262
+ # The extra values given here take precedence over values defined on the client or passed to this method.
263
+ extra_headers: Headers | None = None,
264
+ extra_query: Query | None = None,
265
+ extra_body: Body | None = None,
266
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
267
+ ) -> Evaluation:
268
+ """
269
+ Update Evaluation
270
+
271
+ Args:
272
+ tags: The tags associated with the entity
273
+
274
+ extra_headers: Send extra headers
275
+
276
+ extra_query: Add additional query parameters to the request
277
+
278
+ extra_body: Add additional JSON properties to the request
279
+
280
+ timeout: Override the client-level default timeout for this request, in seconds
281
+ """
282
+ if not evaluation_id:
283
+ raise ValueError(f"Expected a non-empty value for `evaluation_id` but received {evaluation_id!r}")
284
+ return self._patch(
285
+ f"/v5/evaluations/{evaluation_id}",
286
+ body=maybe_transform(
287
+ {
288
+ "description": description,
289
+ "name": name,
290
+ "tags": tags,
291
+ },
292
+ evaluation_update_params.EvaluationUpdateParams,
293
+ ),
294
+ options=make_request_options(
295
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
296
+ ),
297
+ cast_to=Evaluation,
298
+ )
299
+
249
300
  def list(
250
301
  self,
251
302
  *,
252
- ending_before: Optional[str] | NotGiven = NOT_GIVEN,
303
+ ending_before: str | NotGiven = NOT_GIVEN,
253
304
  include_archived: bool | NotGiven = NOT_GIVEN,
254
305
  limit: int | NotGiven = NOT_GIVEN,
255
- starting_after: Optional[str] | NotGiven = NOT_GIVEN,
306
+ name: str | NotGiven = NOT_GIVEN,
307
+ starting_after: str | NotGiven = NOT_GIVEN,
308
+ tags: List[str] | NotGiven = NOT_GIVEN,
256
309
  views: List[Literal["tasks"]] | NotGiven = NOT_GIVEN,
257
310
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
258
311
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -286,7 +339,9 @@ class EvaluationsResource(SyncAPIResource):
286
339
  "ending_before": ending_before,
287
340
  "include_archived": include_archived,
288
341
  "limit": limit,
342
+ "name": name,
289
343
  "starting_after": starting_after,
344
+ "tags": tags,
290
345
  "views": views,
291
346
  },
292
347
  evaluation_list_params.EvaluationListParams,
@@ -295,7 +350,7 @@ class EvaluationsResource(SyncAPIResource):
295
350
  model=Evaluation,
296
351
  )
297
352
 
298
- def archive(
353
+ def delete(
299
354
  self,
300
355
  evaluation_id: str,
301
356
  *,
@@ -305,7 +360,7 @@ class EvaluationsResource(SyncAPIResource):
305
360
  extra_query: Query | None = None,
306
361
  extra_body: Body | None = None,
307
362
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
308
- ) -> EvaluationArchiveResponse:
363
+ ) -> EvaluationDeleteResponse:
309
364
  """
310
365
  Archive Evaluation
311
366
 
@@ -325,7 +380,7 @@ class EvaluationsResource(SyncAPIResource):
325
380
  options=make_request_options(
326
381
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
327
382
  ),
328
- cast_to=EvaluationArchiveResponse,
383
+ cast_to=EvaluationDeleteResponse,
329
384
  )
330
385
 
331
386
 
@@ -548,13 +603,61 @@ class AsyncEvaluationsResource(AsyncAPIResource):
548
603
  cast_to=Evaluation,
549
604
  )
550
605
 
606
+ async def update(
607
+ self,
608
+ evaluation_id: str,
609
+ *,
610
+ description: str | NotGiven = NOT_GIVEN,
611
+ name: str | NotGiven = NOT_GIVEN,
612
+ tags: List[str] | NotGiven = NOT_GIVEN,
613
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
614
+ # The extra values given here take precedence over values defined on the client or passed to this method.
615
+ extra_headers: Headers | None = None,
616
+ extra_query: Query | None = None,
617
+ extra_body: Body | None = None,
618
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
619
+ ) -> Evaluation:
620
+ """
621
+ Update Evaluation
622
+
623
+ Args:
624
+ tags: The tags associated with the entity
625
+
626
+ extra_headers: Send extra headers
627
+
628
+ extra_query: Add additional query parameters to the request
629
+
630
+ extra_body: Add additional JSON properties to the request
631
+
632
+ timeout: Override the client-level default timeout for this request, in seconds
633
+ """
634
+ if not evaluation_id:
635
+ raise ValueError(f"Expected a non-empty value for `evaluation_id` but received {evaluation_id!r}")
636
+ return await self._patch(
637
+ f"/v5/evaluations/{evaluation_id}",
638
+ body=await async_maybe_transform(
639
+ {
640
+ "description": description,
641
+ "name": name,
642
+ "tags": tags,
643
+ },
644
+ evaluation_update_params.EvaluationUpdateParams,
645
+ ),
646
+ options=make_request_options(
647
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
648
+ ),
649
+ cast_to=Evaluation,
650
+ )
651
+
551
652
  def list(
552
653
  self,
553
654
  *,
554
- ending_before: Optional[str] | NotGiven = NOT_GIVEN,
655
+ ending_before: str | NotGiven = NOT_GIVEN,
555
656
  include_archived: bool | NotGiven = NOT_GIVEN,
556
657
  limit: int | NotGiven = NOT_GIVEN,
557
- starting_after: Optional[str] | NotGiven = NOT_GIVEN,
658
+ name: str | NotGiven = NOT_GIVEN,
659
+ starting_after: str | NotGiven = NOT_GIVEN,
660
+ tags: List[str] | NotGiven = NOT_GIVEN,
558
661
  views: List[Literal["tasks"]] | NotGiven = NOT_GIVEN,
559
662
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
560
663
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -588,7 +691,9 @@ class AsyncEvaluationsResource(AsyncAPIResource):
588
691
  "ending_before": ending_before,
589
692
  "include_archived": include_archived,
590
693
  "limit": limit,
694
+ "name": name,
591
695
  "starting_after": starting_after,
696
+ "tags": tags,
592
697
  "views": views,
593
698
  },
594
699
  evaluation_list_params.EvaluationListParams,
@@ -597,7 +702,7 @@ class AsyncEvaluationsResource(AsyncAPIResource):
597
702
  model=Evaluation,
598
703
  )
599
704
 
600
- async def archive(
705
+ async def delete(
601
706
  self,
602
707
  evaluation_id: str,
603
708
  *,
@@ -607,7 +712,7 @@ class AsyncEvaluationsResource(AsyncAPIResource):
607
712
  extra_query: Query | None = None,
608
713
  extra_body: Body | None = None,
609
714
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
610
- ) -> EvaluationArchiveResponse:
715
+ ) -> EvaluationDeleteResponse:
611
716
  """
612
717
  Archive Evaluation
613
718
 
@@ -627,7 +732,7 @@ class AsyncEvaluationsResource(AsyncAPIResource):
627
732
  options=make_request_options(
628
733
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
629
734
  ),
630
- cast_to=EvaluationArchiveResponse,
735
+ cast_to=EvaluationDeleteResponse,
631
736
  )
632
737
 
633
738
 
@@ -641,11 +746,14 @@ class EvaluationsResourceWithRawResponse:
641
746
  self.retrieve = to_raw_response_wrapper(
642
747
  evaluations.retrieve,
643
748
  )
749
+ self.update = to_raw_response_wrapper(
750
+ evaluations.update,
751
+ )
644
752
  self.list = to_raw_response_wrapper(
645
753
  evaluations.list,
646
754
  )
647
- self.archive = to_raw_response_wrapper(
648
- evaluations.archive,
755
+ self.delete = to_raw_response_wrapper(
756
+ evaluations.delete,
649
757
  )
650
758
 
651
759
 
@@ -659,11 +767,14 @@ class AsyncEvaluationsResourceWithRawResponse:
659
767
  self.retrieve = async_to_raw_response_wrapper(
660
768
  evaluations.retrieve,
661
769
  )
770
+ self.update = async_to_raw_response_wrapper(
771
+ evaluations.update,
772
+ )
662
773
  self.list = async_to_raw_response_wrapper(
663
774
  evaluations.list,
664
775
  )
665
- self.archive = async_to_raw_response_wrapper(
666
- evaluations.archive,
776
+ self.delete = async_to_raw_response_wrapper(
777
+ evaluations.delete,
667
778
  )
668
779
 
669
780
 
@@ -677,11 +788,14 @@ class EvaluationsResourceWithStreamingResponse:
677
788
  self.retrieve = to_streamed_response_wrapper(
678
789
  evaluations.retrieve,
679
790
  )
791
+ self.update = to_streamed_response_wrapper(
792
+ evaluations.update,
793
+ )
680
794
  self.list = to_streamed_response_wrapper(
681
795
  evaluations.list,
682
796
  )
683
- self.archive = to_streamed_response_wrapper(
684
- evaluations.archive,
797
+ self.delete = to_streamed_response_wrapper(
798
+ evaluations.delete,
685
799
  )
686
800
 
687
801
 
@@ -695,9 +809,12 @@ class AsyncEvaluationsResourceWithStreamingResponse:
695
809
  self.retrieve = async_to_streamed_response_wrapper(
696
810
  evaluations.retrieve,
697
811
  )
812
+ self.update = async_to_streamed_response_wrapper(
813
+ evaluations.update,
814
+ )
698
815
  self.list = async_to_streamed_response_wrapper(
699
816
  evaluations.list,
700
817
  )
701
- self.archive = async_to_streamed_response_wrapper(
702
- evaluations.archive,
818
+ self.delete = async_to_streamed_response_wrapper(
819
+ evaluations.delete,
703
820
  )
@@ -2,7 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Dict, Mapping, Optional, cast
5
+ from typing import Dict, Mapping, cast
6
6
 
7
7
  import httpx
8
8
 
@@ -167,9 +167,9 @@ class FilesResource(SyncAPIResource):
167
167
  def list(
168
168
  self,
169
169
  *,
170
- ending_before: Optional[str] | NotGiven = NOT_GIVEN,
170
+ ending_before: str | NotGiven = NOT_GIVEN,
171
171
  limit: int | NotGiven = NOT_GIVEN,
172
- starting_after: Optional[str] | NotGiven = NOT_GIVEN,
172
+ starting_after: str | NotGiven = NOT_GIVEN,
173
173
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
174
174
  # The extra values given here take precedence over values defined on the client or passed to this method.
175
175
  extra_headers: Headers | None = None,
@@ -377,9 +377,9 @@ class AsyncFilesResource(AsyncAPIResource):
377
377
  def list(
378
378
  self,
379
379
  *,
380
- ending_before: Optional[str] | NotGiven = NOT_GIVEN,
380
+ ending_before: str | NotGiven = NOT_GIVEN,
381
381
  limit: int | NotGiven = NOT_GIVEN,
382
- starting_after: Optional[str] | NotGiven = NOT_GIVEN,
382
+ starting_after: str | NotGiven = NOT_GIVEN,
383
383
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
384
384
  # The extra values given here take precedence over values defined on the client or passed to this method.
385
385
  extra_headers: Headers | None = None,
@@ -2,7 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Dict, Optional
5
+ from typing import Dict
6
6
  from typing_extensions import Literal, overload
7
7
 
8
8
  import httpx
@@ -303,26 +303,24 @@ class ModelsResource(SyncAPIResource):
303
303
  def list(
304
304
  self,
305
305
  *,
306
- ending_before: Optional[str] | NotGiven = NOT_GIVEN,
306
+ ending_before: str | NotGiven = NOT_GIVEN,
307
307
  limit: int | NotGiven = NOT_GIVEN,
308
- model_vendor: Optional[
309
- Literal[
310
- "openai",
311
- "cohere",
312
- "vertex_ai",
313
- "anthropic",
314
- "azure",
315
- "gemini",
316
- "launch",
317
- "llmengine",
318
- "model_zoo",
319
- "bedrock",
320
- "xai",
321
- ]
308
+ model_vendor: Literal[
309
+ "openai",
310
+ "cohere",
311
+ "vertex_ai",
312
+ "anthropic",
313
+ "azure",
314
+ "gemini",
315
+ "launch",
316
+ "llmengine",
317
+ "model_zoo",
318
+ "bedrock",
319
+ "xai",
322
320
  ]
323
321
  | NotGiven = NOT_GIVEN,
324
- name: Optional[str] | NotGiven = NOT_GIVEN,
325
- starting_after: Optional[str] | NotGiven = NOT_GIVEN,
322
+ name: str | NotGiven = NOT_GIVEN,
323
+ starting_after: str | NotGiven = NOT_GIVEN,
326
324
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
327
325
  # The extra values given here take precedence over values defined on the client or passed to this method.
328
326
  extra_headers: Headers | None = None,
@@ -675,26 +673,24 @@ class AsyncModelsResource(AsyncAPIResource):
675
673
  def list(
676
674
  self,
677
675
  *,
678
- ending_before: Optional[str] | NotGiven = NOT_GIVEN,
676
+ ending_before: str | NotGiven = NOT_GIVEN,
679
677
  limit: int | NotGiven = NOT_GIVEN,
680
- model_vendor: Optional[
681
- Literal[
682
- "openai",
683
- "cohere",
684
- "vertex_ai",
685
- "anthropic",
686
- "azure",
687
- "gemini",
688
- "launch",
689
- "llmengine",
690
- "model_zoo",
691
- "bedrock",
692
- "xai",
693
- ]
678
+ model_vendor: Literal[
679
+ "openai",
680
+ "cohere",
681
+ "vertex_ai",
682
+ "anthropic",
683
+ "azure",
684
+ "gemini",
685
+ "launch",
686
+ "llmengine",
687
+ "model_zoo",
688
+ "bedrock",
689
+ "xai",
694
690
  ]
695
691
  | NotGiven = NOT_GIVEN,
696
- name: Optional[str] | NotGiven = NOT_GIVEN,
697
- starting_after: Optional[str] | NotGiven = NOT_GIVEN,
692
+ name: str | NotGiven = NOT_GIVEN,
693
+ starting_after: str | NotGiven = NOT_GIVEN,
698
694
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
699
695
  # The extra values given here take precedence over values defined on the client or passed to this method.
700
696
  extra_headers: Headers | None = None,
@@ -2,9 +2,9 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Dict, Union, Optional
5
+ from typing import Dict, Union
6
6
  from datetime import datetime
7
- from typing_extensions import overload
7
+ from typing_extensions import Literal, overload
8
8
 
9
9
  import httpx
10
10
 
@@ -53,11 +53,13 @@ class SpansResource(SyncAPIResource):
53
53
  name: str,
54
54
  start_timestamp: Union[str, datetime],
55
55
  trace_id: str,
56
- data: Dict[str, object] | NotGiven = NOT_GIVEN,
57
56
  end_timestamp: Union[str, datetime] | NotGiven = NOT_GIVEN,
58
57
  input: Dict[str, object] | NotGiven = NOT_GIVEN,
58
+ metadata: Dict[str, object] | NotGiven = NOT_GIVEN,
59
59
  output: Dict[str, object] | NotGiven = NOT_GIVEN,
60
60
  parent_id: str | NotGiven = NOT_GIVEN,
61
+ status: Literal["SUCCESS", "ERROR"] | NotGiven = NOT_GIVEN,
62
+ type: str | NotGiven = NOT_GIVEN,
61
63
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
62
64
  # The extra values given here take precedence over values defined on the client or passed to this method.
63
65
  extra_headers: Headers | None = None,
@@ -92,11 +94,13 @@ class SpansResource(SyncAPIResource):
92
94
  name: str,
93
95
  start_timestamp: Union[str, datetime],
94
96
  trace_id: str,
95
- data: Dict[str, object] | NotGiven = NOT_GIVEN,
96
97
  end_timestamp: Union[str, datetime] | NotGiven = NOT_GIVEN,
97
98
  input: Dict[str, object] | NotGiven = NOT_GIVEN,
99
+ metadata: Dict[str, object] | NotGiven = NOT_GIVEN,
98
100
  output: Dict[str, object] | NotGiven = NOT_GIVEN,
99
101
  parent_id: str | NotGiven = NOT_GIVEN,
102
+ status: Literal["SUCCESS", "ERROR"] | NotGiven = NOT_GIVEN,
103
+ type: str | NotGiven = NOT_GIVEN,
100
104
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
101
105
  # The extra values given here take precedence over values defined on the client or passed to this method.
102
106
  extra_headers: Headers | None = None,
@@ -132,11 +136,13 @@ class SpansResource(SyncAPIResource):
132
136
  name: str,
133
137
  start_timestamp: Union[str, datetime],
134
138
  trace_id: str,
135
- data: Dict[str, object] | NotGiven = NOT_GIVEN,
136
139
  end_timestamp: Union[str, datetime] | NotGiven = NOT_GIVEN,
137
140
  input: Dict[str, object] | NotGiven = NOT_GIVEN,
141
+ metadata: Dict[str, object] | NotGiven = NOT_GIVEN,
138
142
  output: Dict[str, object] | NotGiven = NOT_GIVEN,
139
143
  parent_id: str | NotGiven = NOT_GIVEN,
144
+ status: Literal["SUCCESS", "ERROR"] | NotGiven = NOT_GIVEN,
145
+ type: str | NotGiven = NOT_GIVEN,
140
146
  application_interaction_id: str | NotGiven = NOT_GIVEN,
141
147
  application_variant_id: str | NotGiven = NOT_GIVEN,
142
148
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -153,11 +159,13 @@ class SpansResource(SyncAPIResource):
153
159
  "name": name,
154
160
  "start_timestamp": start_timestamp,
155
161
  "trace_id": trace_id,
156
- "data": data,
157
162
  "end_timestamp": end_timestamp,
158
163
  "input": input,
164
+ "metadata": metadata,
159
165
  "output": output,
160
166
  "parent_id": parent_id,
167
+ "status": status,
168
+ "type": type,
161
169
  "application_interaction_id": application_interaction_id,
162
170
  "application_variant_id": application_variant_id,
163
171
  },
@@ -206,10 +214,11 @@ class SpansResource(SyncAPIResource):
206
214
  self,
207
215
  span_id: str,
208
216
  *,
209
- data: Dict[str, object] | NotGiven = NOT_GIVEN,
210
217
  end_timestamp: Union[str, datetime] | NotGiven = NOT_GIVEN,
218
+ metadata: Dict[str, object] | NotGiven = NOT_GIVEN,
211
219
  name: str | NotGiven = NOT_GIVEN,
212
220
  output: Dict[str, object] | NotGiven = NOT_GIVEN,
221
+ status: Literal["SUCCESS", "ERROR"] | NotGiven = NOT_GIVEN,
213
222
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
214
223
  # The extra values given here take precedence over values defined on the client or passed to this method.
215
224
  extra_headers: Headers | None = None,
@@ -235,10 +244,11 @@ class SpansResource(SyncAPIResource):
235
244
  f"/v5/spans/{span_id}",
236
245
  body=maybe_transform(
237
246
  {
238
- "data": data,
239
247
  "end_timestamp": end_timestamp,
248
+ "metadata": metadata,
240
249
  "name": name,
241
250
  "output": output,
251
+ "status": status,
242
252
  },
243
253
  span_update_params.SpanUpdateParams,
244
254
  ),
@@ -251,13 +261,13 @@ class SpansResource(SyncAPIResource):
251
261
  def list(
252
262
  self,
253
263
  *,
254
- ending_before: Optional[str] | NotGiven = NOT_GIVEN,
264
+ ending_before: str | NotGiven = NOT_GIVEN,
255
265
  from_ts: int | NotGiven = NOT_GIVEN,
256
266
  limit: int | NotGiven = NOT_GIVEN,
257
- parents_only: Optional[bool] | NotGiven = NOT_GIVEN,
258
- starting_after: Optional[str] | NotGiven = NOT_GIVEN,
267
+ parents_only: bool | NotGiven = NOT_GIVEN,
268
+ starting_after: str | NotGiven = NOT_GIVEN,
259
269
  to_ts: int | NotGiven = NOT_GIVEN,
260
- trace_id: Optional[str] | NotGiven = NOT_GIVEN,
270
+ trace_id: str | NotGiven = NOT_GIVEN,
261
271
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
262
272
  # The extra values given here take precedence over values defined on the client or passed to this method.
263
273
  extra_headers: Headers | None = None,
@@ -333,11 +343,13 @@ class AsyncSpansResource(AsyncAPIResource):
333
343
  name: str,
334
344
  start_timestamp: Union[str, datetime],
335
345
  trace_id: str,
336
- data: Dict[str, object] | NotGiven = NOT_GIVEN,
337
346
  end_timestamp: Union[str, datetime] | NotGiven = NOT_GIVEN,
338
347
  input: Dict[str, object] | NotGiven = NOT_GIVEN,
348
+ metadata: Dict[str, object] | NotGiven = NOT_GIVEN,
339
349
  output: Dict[str, object] | NotGiven = NOT_GIVEN,
340
350
  parent_id: str | NotGiven = NOT_GIVEN,
351
+ status: Literal["SUCCESS", "ERROR"] | NotGiven = NOT_GIVEN,
352
+ type: str | NotGiven = NOT_GIVEN,
341
353
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
342
354
  # The extra values given here take precedence over values defined on the client or passed to this method.
343
355
  extra_headers: Headers | None = None,
@@ -372,11 +384,13 @@ class AsyncSpansResource(AsyncAPIResource):
372
384
  name: str,
373
385
  start_timestamp: Union[str, datetime],
374
386
  trace_id: str,
375
- data: Dict[str, object] | NotGiven = NOT_GIVEN,
376
387
  end_timestamp: Union[str, datetime] | NotGiven = NOT_GIVEN,
377
388
  input: Dict[str, object] | NotGiven = NOT_GIVEN,
389
+ metadata: Dict[str, object] | NotGiven = NOT_GIVEN,
378
390
  output: Dict[str, object] | NotGiven = NOT_GIVEN,
379
391
  parent_id: str | NotGiven = NOT_GIVEN,
392
+ status: Literal["SUCCESS", "ERROR"] | NotGiven = NOT_GIVEN,
393
+ type: str | NotGiven = NOT_GIVEN,
380
394
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
381
395
  # The extra values given here take precedence over values defined on the client or passed to this method.
382
396
  extra_headers: Headers | None = None,
@@ -412,11 +426,13 @@ class AsyncSpansResource(AsyncAPIResource):
412
426
  name: str,
413
427
  start_timestamp: Union[str, datetime],
414
428
  trace_id: str,
415
- data: Dict[str, object] | NotGiven = NOT_GIVEN,
416
429
  end_timestamp: Union[str, datetime] | NotGiven = NOT_GIVEN,
417
430
  input: Dict[str, object] | NotGiven = NOT_GIVEN,
431
+ metadata: Dict[str, object] | NotGiven = NOT_GIVEN,
418
432
  output: Dict[str, object] | NotGiven = NOT_GIVEN,
419
433
  parent_id: str | NotGiven = NOT_GIVEN,
434
+ status: Literal["SUCCESS", "ERROR"] | NotGiven = NOT_GIVEN,
435
+ type: str | NotGiven = NOT_GIVEN,
420
436
  application_interaction_id: str | NotGiven = NOT_GIVEN,
421
437
  application_variant_id: str | NotGiven = NOT_GIVEN,
422
438
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -433,11 +449,13 @@ class AsyncSpansResource(AsyncAPIResource):
433
449
  "name": name,
434
450
  "start_timestamp": start_timestamp,
435
451
  "trace_id": trace_id,
436
- "data": data,
437
452
  "end_timestamp": end_timestamp,
438
453
  "input": input,
454
+ "metadata": metadata,
439
455
  "output": output,
440
456
  "parent_id": parent_id,
457
+ "status": status,
458
+ "type": type,
441
459
  "application_interaction_id": application_interaction_id,
442
460
  "application_variant_id": application_variant_id,
443
461
  },
@@ -486,10 +504,11 @@ class AsyncSpansResource(AsyncAPIResource):
486
504
  self,
487
505
  span_id: str,
488
506
  *,
489
- data: Dict[str, object] | NotGiven = NOT_GIVEN,
490
507
  end_timestamp: Union[str, datetime] | NotGiven = NOT_GIVEN,
508
+ metadata: Dict[str, object] | NotGiven = NOT_GIVEN,
491
509
  name: str | NotGiven = NOT_GIVEN,
492
510
  output: Dict[str, object] | NotGiven = NOT_GIVEN,
511
+ status: Literal["SUCCESS", "ERROR"] | NotGiven = NOT_GIVEN,
493
512
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
494
513
  # The extra values given here take precedence over values defined on the client or passed to this method.
495
514
  extra_headers: Headers | None = None,
@@ -515,10 +534,11 @@ class AsyncSpansResource(AsyncAPIResource):
515
534
  f"/v5/spans/{span_id}",
516
535
  body=await async_maybe_transform(
517
536
  {
518
- "data": data,
519
537
  "end_timestamp": end_timestamp,
538
+ "metadata": metadata,
520
539
  "name": name,
521
540
  "output": output,
541
+ "status": status,
522
542
  },
523
543
  span_update_params.SpanUpdateParams,
524
544
  ),
@@ -531,13 +551,13 @@ class AsyncSpansResource(AsyncAPIResource):
531
551
  def list(
532
552
  self,
533
553
  *,
534
- ending_before: Optional[str] | NotGiven = NOT_GIVEN,
554
+ ending_before: str | NotGiven = NOT_GIVEN,
535
555
  from_ts: int | NotGiven = NOT_GIVEN,
536
556
  limit: int | NotGiven = NOT_GIVEN,
537
- parents_only: Optional[bool] | NotGiven = NOT_GIVEN,
538
- starting_after: Optional[str] | NotGiven = NOT_GIVEN,
557
+ parents_only: bool | NotGiven = NOT_GIVEN,
558
+ starting_after: str | NotGiven = NOT_GIVEN,
539
559
  to_ts: int | NotGiven = NOT_GIVEN,
540
- trace_id: Optional[str] | NotGiven = NOT_GIVEN,
560
+ trace_id: str | NotGiven = NOT_GIVEN,
541
561
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
542
562
  # The extra values given here take precedence over values defined on the client or passed to this method.
543
563
  extra_headers: Headers | None = None,
@@ -5,10 +5,15 @@ from __future__ import annotations
5
5
  from .file import File as File
6
6
  from .span import Span as Span
7
7
  from .dataset import Dataset as Dataset
8
+ from .component import Component as Component
9
+ from .container import Container as Container
8
10
  from .file_list import FileList as FileList
9
11
  from .completion import Completion as Completion
10
12
  from .evaluation import Evaluation as Evaluation
11
13
  from .dataset_item import DatasetItem as DatasetItem
14
+ from .item_locator import ItemLocator as ItemLocator
15
+ from .component_param import ComponentParam as ComponentParam
16
+ from .container_param import ContainerParam as ContainerParam
12
17
  from .evaluation_item import EvaluationItem as EvaluationItem
13
18
  from .evaluation_task import EvaluationTask as EvaluationTask
14
19
  from .inference_model import InferenceModel as InferenceModel
@@ -28,6 +33,7 @@ from .inference_model_list import InferenceModelList as InferenceModelList
28
33
  from .dataset_create_params import DatasetCreateParams as DatasetCreateParams
29
34
  from .dataset_update_params import DatasetUpdateParams as DatasetUpdateParams
30
35
  from .evaluation_task_param import EvaluationTaskParam as EvaluationTaskParam
36
+ from .item_locator_template import ItemLocatorTemplate as ItemLocatorTemplate
31
37
  from .model_delete_response import ModelDeleteResponse as ModelDeleteResponse
32
38
  from .evaluation_list_params import EvaluationListParams as EvaluationListParams
33
39
  from .dataset_delete_response import DatasetDeleteResponse as DatasetDeleteResponse
@@ -36,11 +42,12 @@ from .inference_create_params import InferenceCreateParams as InferenceCreatePar
36
42
  from .completion_create_params import CompletionCreateParams as CompletionCreateParams
37
43
  from .dataset_item_list_params import DatasetItemListParams as DatasetItemListParams
38
44
  from .evaluation_create_params import EvaluationCreateParams as EvaluationCreateParams
45
+ from .evaluation_update_params import EvaluationUpdateParams as EvaluationUpdateParams
39
46
  from .inference_response_chunk import InferenceResponseChunk as InferenceResponseChunk
40
47
  from .inference_create_response import InferenceCreateResponse as InferenceCreateResponse
41
48
  from .dataset_item_update_params import DatasetItemUpdateParams as DatasetItemUpdateParams
49
+ from .evaluation_delete_response import EvaluationDeleteResponse as EvaluationDeleteResponse
42
50
  from .evaluation_retrieve_params import EvaluationRetrieveParams as EvaluationRetrieveParams
43
- from .evaluation_archive_response import EvaluationArchiveResponse as EvaluationArchiveResponse
44
51
  from .evaluation_item_list_params import EvaluationItemListParams as EvaluationItemListParams
45
52
  from .dataset_item_delete_response import DatasetItemDeleteResponse as DatasetItemDeleteResponse
46
53
  from .dataset_item_retrieve_params import DatasetItemRetrieveParams as DatasetItemRetrieveParams