scale-gp-beta 0.1.0a15__py3-none-any.whl → 0.1.0a16__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.
@@ -960,6 +960,9 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
960
960
  if self.custom_auth is not None:
961
961
  kwargs["auth"] = self.custom_auth
962
962
 
963
+ if options.follow_redirects is not None:
964
+ kwargs["follow_redirects"] = options.follow_redirects
965
+
963
966
  log.debug("Sending HTTP Request: %s %s", request.method, request.url)
964
967
 
965
968
  response = None
@@ -1460,6 +1463,9 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
1460
1463
  if self.custom_auth is not None:
1461
1464
  kwargs["auth"] = self.custom_auth
1462
1465
 
1466
+ if options.follow_redirects is not None:
1467
+ kwargs["follow_redirects"] = options.follow_redirects
1468
+
1463
1469
  log.debug("Sending HTTP Request: %s %s", request.method, request.url)
1464
1470
 
1465
1471
  response = None
scale_gp_beta/_models.py CHANGED
@@ -737,6 +737,7 @@ class FinalRequestOptionsInput(TypedDict, total=False):
737
737
  idempotency_key: str
738
738
  json_data: Body
739
739
  extra_json: AnyMapping
740
+ follow_redirects: bool
740
741
 
741
742
 
742
743
  @final
@@ -750,6 +751,7 @@ class FinalRequestOptions(pydantic.BaseModel):
750
751
  files: Union[HttpxRequestFiles, None] = None
751
752
  idempotency_key: Union[str, None] = None
752
753
  post_parser: Union[Callable[[Any], Any], NotGiven] = NotGiven()
754
+ follow_redirects: Union[bool, None] = None
753
755
 
754
756
  # It should be noted that we cannot use `json` here as that would override
755
757
  # a BaseModel method in an incompatible fashion.
scale_gp_beta/_types.py CHANGED
@@ -100,6 +100,7 @@ class RequestOptions(TypedDict, total=False):
100
100
  params: Query
101
101
  extra_json: AnyMapping
102
102
  idempotency_key: str
103
+ follow_redirects: bool
103
104
 
104
105
 
105
106
  # Sentinel class used until PEP 0661 is accepted
@@ -215,3 +216,4 @@ class _GenericAlias(Protocol):
215
216
 
216
217
  class HttpxSendArgs(TypedDict, total=False):
217
218
  auth: httpx.Auth
219
+ follow_redirects: bool
scale_gp_beta/_version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "scale_gp_beta"
4
- __version__ = "0.1.0-alpha.15" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.16" # x-release-please-version
@@ -23,10 +23,11 @@ from .._response import (
23
23
  async_to_raw_response_wrapper,
24
24
  async_to_streamed_response_wrapper,
25
25
  )
26
- from ..pagination import SyncCursorPage, AsyncCursorPage, SyncAPIListPage, AsyncAPIListPage
26
+ from ..pagination import SyncCursorPage, AsyncCursorPage
27
27
  from .._base_client import AsyncPaginator, make_request_options
28
28
  from ..types.dataset_item import DatasetItem
29
29
  from ..types.dataset_item_delete_response import DatasetItemDeleteResponse
30
+ from ..types.dataset_item_batch_create_response import DatasetItemBatchCreateResponse
30
31
 
31
32
  __all__ = ["DatasetItemsResource", "AsyncDatasetItemsResource"]
32
33
 
@@ -233,7 +234,7 @@ class DatasetItemsResource(SyncAPIResource):
233
234
  extra_query: Query | None = None,
234
235
  extra_body: Body | None = None,
235
236
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
236
- ) -> SyncAPIListPage[DatasetItem]:
237
+ ) -> DatasetItemBatchCreateResponse:
237
238
  """
238
239
  Batch Create Dataset Items
239
240
 
@@ -250,9 +251,8 @@ class DatasetItemsResource(SyncAPIResource):
250
251
 
251
252
  timeout: Override the client-level default timeout for this request, in seconds
252
253
  """
253
- return self._get_api_list(
254
+ return self._post(
254
255
  "/v5/dataset-items/batch",
255
- page=SyncAPIListPage[DatasetItem],
256
256
  body=maybe_transform(
257
257
  {
258
258
  "data": data,
@@ -263,8 +263,7 @@ class DatasetItemsResource(SyncAPIResource):
263
263
  options=make_request_options(
264
264
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
265
265
  ),
266
- model=DatasetItem,
267
- method="post",
266
+ cast_to=DatasetItemBatchCreateResponse,
268
267
  )
269
268
 
270
269
 
@@ -461,7 +460,7 @@ class AsyncDatasetItemsResource(AsyncAPIResource):
461
460
  cast_to=DatasetItemDeleteResponse,
462
461
  )
463
462
 
464
- def batch_create(
463
+ async def batch_create(
465
464
  self,
466
465
  *,
467
466
  data: Iterable[Dict[str, object]],
@@ -472,7 +471,7 @@ class AsyncDatasetItemsResource(AsyncAPIResource):
472
471
  extra_query: Query | None = None,
473
472
  extra_body: Body | None = None,
474
473
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
475
- ) -> AsyncPaginator[DatasetItem, AsyncAPIListPage[DatasetItem]]:
474
+ ) -> DatasetItemBatchCreateResponse:
476
475
  """
477
476
  Batch Create Dataset Items
478
477
 
@@ -489,10 +488,9 @@ class AsyncDatasetItemsResource(AsyncAPIResource):
489
488
 
490
489
  timeout: Override the client-level default timeout for this request, in seconds
491
490
  """
492
- return self._get_api_list(
491
+ return await self._post(
493
492
  "/v5/dataset-items/batch",
494
- page=AsyncAPIListPage[DatasetItem],
495
- body=maybe_transform(
493
+ body=await async_maybe_transform(
496
494
  {
497
495
  "data": data,
498
496
  "dataset_id": dataset_id,
@@ -502,8 +500,7 @@ class AsyncDatasetItemsResource(AsyncAPIResource):
502
500
  options=make_request_options(
503
501
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
504
502
  ),
505
- model=DatasetItem,
506
- method="post",
503
+ cast_to=DatasetItemBatchCreateResponse,
507
504
  )
508
505
 
509
506
 
@@ -4,13 +4,13 @@ from __future__ import annotations
4
4
 
5
5
  from typing import Dict, Union, Iterable
6
6
  from datetime import datetime
7
- from typing_extensions import Literal, overload
7
+ from typing_extensions import Literal
8
8
 
9
9
  import httpx
10
10
 
11
- from ..types import span_list_params, span_batch_params, span_create_params, span_update_params
11
+ from ..types import span_batch_params, span_create_params, span_update_params
12
12
  from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
13
- from .._utils import required_args, maybe_transform, async_maybe_transform
13
+ from .._utils import maybe_transform, async_maybe_transform
14
14
  from .._compat import cached_property
15
15
  from .._resource import SyncAPIResource, AsyncAPIResource
16
16
  from .._response import (
@@ -19,9 +19,9 @@ from .._response import (
19
19
  async_to_raw_response_wrapper,
20
20
  async_to_streamed_response_wrapper,
21
21
  )
22
- from ..pagination import SyncCursorPage, AsyncCursorPage, SyncAPIListPage, AsyncAPIListPage
23
22
  from ..types.span import Span
24
- from .._base_client import AsyncPaginator, make_request_options
23
+ from .._base_client import make_request_options
24
+ from ..types.span_batch_response import SpanBatchResponse
25
25
 
26
26
  __all__ = ["SpansResource", "AsyncSpansResource"]
27
27
 
@@ -46,7 +46,6 @@ class SpansResource(SyncAPIResource):
46
46
  """
47
47
  return SpansResourceWithStreamingResponse(self)
48
48
 
49
- @overload
50
49
  def create(
51
50
  self,
52
51
  *,
@@ -54,7 +53,10 @@ class SpansResource(SyncAPIResource):
54
53
  start_timestamp: Union[str, datetime],
55
54
  trace_id: str,
56
55
  id: str | NotGiven = NOT_GIVEN,
56
+ application_interaction_id: str | NotGiven = NOT_GIVEN,
57
+ application_variant_id: str | NotGiven = NOT_GIVEN,
57
58
  end_timestamp: Union[str, datetime] | NotGiven = NOT_GIVEN,
59
+ group_id: str | NotGiven = NOT_GIVEN,
58
60
  input: Dict[str, object] | NotGiven = NOT_GIVEN,
59
61
  metadata: Dict[str, object] | NotGiven = NOT_GIVEN,
60
62
  output: Dict[str, object] | NotGiven = NOT_GIVEN,
@@ -104,77 +106,11 @@ class SpansResource(SyncAPIResource):
104
106
 
105
107
  id: The id of the span
106
108
 
107
- parent_id: Reference to a parent span_id
108
-
109
- extra_headers: Send extra headers
110
-
111
- extra_query: Add additional query parameters to the request
109
+ application_interaction_id: The optional application interaction ID this span belongs to
112
110
 
113
- extra_body: Add additional JSON properties to the request
111
+ application_variant_id: The optional application variant ID this span belongs to
114
112
 
115
- timeout: Override the client-level default timeout for this request, in seconds
116
- """
117
- ...
118
-
119
- @overload
120
- def create(
121
- self,
122
- *,
123
- application_interaction_id: str,
124
- application_variant_id: str,
125
- name: str,
126
- start_timestamp: Union[str, datetime],
127
- trace_id: str,
128
- id: str | NotGiven = NOT_GIVEN,
129
- end_timestamp: Union[str, datetime] | NotGiven = NOT_GIVEN,
130
- input: Dict[str, object] | NotGiven = NOT_GIVEN,
131
- metadata: Dict[str, object] | NotGiven = NOT_GIVEN,
132
- output: Dict[str, object] | NotGiven = NOT_GIVEN,
133
- parent_id: str | NotGiven = NOT_GIVEN,
134
- status: Literal["SUCCESS", "ERROR"] | NotGiven = NOT_GIVEN,
135
- type: Literal[
136
- "TEXT_INPUT",
137
- "TEXT_OUTPUT",
138
- "COMPLETION_INPUT",
139
- "COMPLETION",
140
- "KB_RETRIEVAL",
141
- "KB_INPUT",
142
- "RERANKING",
143
- "EXTERNAL_ENDPOINT",
144
- "PROMPT_ENGINEERING",
145
- "DOCUMENT_INPUT",
146
- "MAP_REDUCE",
147
- "DOCUMENT_SEARCH",
148
- "DOCUMENT_PROMPT",
149
- "CUSTOM",
150
- "INPUT_GUARDRAIL",
151
- "OUTPUT_GUARDRAIL",
152
- "CODE_EXECUTION",
153
- "DATA_MANIPULATION",
154
- "EVALUATION",
155
- "FILE_RETRIEVAL",
156
- "KB_ADD_CHUNK",
157
- "KB_MANAGEMENT",
158
- "TRACER",
159
- "AGENT_TRACER",
160
- "AGENT_WORKFLOW",
161
- "STANDALONE",
162
- ]
163
- | NotGiven = NOT_GIVEN,
164
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
165
- # The extra values given here take precedence over values defined on the client or passed to this method.
166
- extra_headers: Headers | None = None,
167
- extra_query: Query | None = None,
168
- extra_body: Body | None = None,
169
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
170
- ) -> Span:
171
- """
172
- Create Span
173
-
174
- Args:
175
- trace_id: id for grouping traces together, uuid is recommended
176
-
177
- id: The id of the span
113
+ group_id: Reference to a group_id
178
114
 
179
115
  parent_id: Reference to a parent span_id
180
116
 
@@ -186,63 +122,6 @@ class SpansResource(SyncAPIResource):
186
122
 
187
123
  timeout: Override the client-level default timeout for this request, in seconds
188
124
  """
189
- ...
190
-
191
- @required_args(
192
- ["name", "start_timestamp", "trace_id"],
193
- ["application_interaction_id", "application_variant_id", "name", "start_timestamp", "trace_id"],
194
- )
195
- def create(
196
- self,
197
- *,
198
- name: str,
199
- start_timestamp: Union[str, datetime],
200
- trace_id: str,
201
- id: str | NotGiven = NOT_GIVEN,
202
- end_timestamp: Union[str, datetime] | NotGiven = NOT_GIVEN,
203
- input: Dict[str, object] | NotGiven = NOT_GIVEN,
204
- metadata: Dict[str, object] | NotGiven = NOT_GIVEN,
205
- output: Dict[str, object] | NotGiven = NOT_GIVEN,
206
- parent_id: str | NotGiven = NOT_GIVEN,
207
- status: Literal["SUCCESS", "ERROR"] | NotGiven = NOT_GIVEN,
208
- type: Literal[
209
- "TEXT_INPUT",
210
- "TEXT_OUTPUT",
211
- "COMPLETION_INPUT",
212
- "COMPLETION",
213
- "KB_RETRIEVAL",
214
- "KB_INPUT",
215
- "RERANKING",
216
- "EXTERNAL_ENDPOINT",
217
- "PROMPT_ENGINEERING",
218
- "DOCUMENT_INPUT",
219
- "MAP_REDUCE",
220
- "DOCUMENT_SEARCH",
221
- "DOCUMENT_PROMPT",
222
- "CUSTOM",
223
- "INPUT_GUARDRAIL",
224
- "OUTPUT_GUARDRAIL",
225
- "CODE_EXECUTION",
226
- "DATA_MANIPULATION",
227
- "EVALUATION",
228
- "FILE_RETRIEVAL",
229
- "KB_ADD_CHUNK",
230
- "KB_MANAGEMENT",
231
- "TRACER",
232
- "AGENT_TRACER",
233
- "AGENT_WORKFLOW",
234
- "STANDALONE",
235
- ]
236
- | NotGiven = NOT_GIVEN,
237
- application_interaction_id: str | NotGiven = NOT_GIVEN,
238
- application_variant_id: str | NotGiven = NOT_GIVEN,
239
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
240
- # The extra values given here take precedence over values defined on the client or passed to this method.
241
- extra_headers: Headers | None = None,
242
- extra_query: Query | None = None,
243
- extra_body: Body | None = None,
244
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
245
- ) -> Span:
246
125
  return self._post(
247
126
  "/v5/spans",
248
127
  body=maybe_transform(
@@ -251,15 +130,16 @@ class SpansResource(SyncAPIResource):
251
130
  "start_timestamp": start_timestamp,
252
131
  "trace_id": trace_id,
253
132
  "id": id,
133
+ "application_interaction_id": application_interaction_id,
134
+ "application_variant_id": application_variant_id,
254
135
  "end_timestamp": end_timestamp,
136
+ "group_id": group_id,
255
137
  "input": input,
256
138
  "metadata": metadata,
257
139
  "output": output,
258
140
  "parent_id": parent_id,
259
141
  "status": status,
260
142
  "type": type,
261
- "application_interaction_id": application_interaction_id,
262
- "application_variant_id": application_variant_id,
263
143
  },
264
144
  span_create_params.SpanCreateParams,
265
145
  ),
@@ -350,65 +230,6 @@ class SpansResource(SyncAPIResource):
350
230
  cast_to=Span,
351
231
  )
352
232
 
353
- def list(
354
- self,
355
- *,
356
- ending_before: str | NotGiven = NOT_GIVEN,
357
- from_ts: int | NotGiven = NOT_GIVEN,
358
- limit: int | NotGiven = NOT_GIVEN,
359
- parents_only: bool | NotGiven = NOT_GIVEN,
360
- sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
361
- starting_after: str | NotGiven = NOT_GIVEN,
362
- to_ts: int | NotGiven = NOT_GIVEN,
363
- trace_id: str | NotGiven = NOT_GIVEN,
364
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
365
- # The extra values given here take precedence over values defined on the client or passed to this method.
366
- extra_headers: Headers | None = None,
367
- extra_query: Query | None = None,
368
- extra_body: Body | None = None,
369
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
370
- ) -> SyncCursorPage[Span]:
371
- """
372
- List Spans
373
-
374
- Args:
375
- from_ts: The starting (oldest) timestamp window in seconds.
376
-
377
- to_ts: The ending (most recent) timestamp in seconds.
378
-
379
- extra_headers: Send extra headers
380
-
381
- extra_query: Add additional query parameters to the request
382
-
383
- extra_body: Add additional JSON properties to the request
384
-
385
- timeout: Override the client-level default timeout for this request, in seconds
386
- """
387
- return self._get_api_list(
388
- "/v5/spans",
389
- page=SyncCursorPage[Span],
390
- options=make_request_options(
391
- extra_headers=extra_headers,
392
- extra_query=extra_query,
393
- extra_body=extra_body,
394
- timeout=timeout,
395
- query=maybe_transform(
396
- {
397
- "ending_before": ending_before,
398
- "from_ts": from_ts,
399
- "limit": limit,
400
- "parents_only": parents_only,
401
- "sort_order": sort_order,
402
- "starting_after": starting_after,
403
- "to_ts": to_ts,
404
- "trace_id": trace_id,
405
- },
406
- span_list_params.SpanListParams,
407
- ),
408
- ),
409
- model=Span,
410
- )
411
-
412
233
  def batch(
413
234
  self,
414
235
  *,
@@ -419,7 +240,7 @@ class SpansResource(SyncAPIResource):
419
240
  extra_query: Query | None = None,
420
241
  extra_body: Body | None = None,
421
242
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
422
- ) -> SyncAPIListPage[Span]:
243
+ ) -> SpanBatchResponse:
423
244
  """
424
245
  Create Spans in Batch
425
246
 
@@ -432,15 +253,13 @@ class SpansResource(SyncAPIResource):
432
253
 
433
254
  timeout: Override the client-level default timeout for this request, in seconds
434
255
  """
435
- return self._get_api_list(
256
+ return self._post(
436
257
  "/v5/spans/batch",
437
- page=SyncAPIListPage[Span],
438
258
  body=maybe_transform({"items": items}, span_batch_params.SpanBatchParams),
439
259
  options=make_request_options(
440
260
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
441
261
  ),
442
- model=Span,
443
- method="post",
262
+ cast_to=SpanBatchResponse,
444
263
  )
445
264
 
446
265
 
@@ -464,7 +283,6 @@ class AsyncSpansResource(AsyncAPIResource):
464
283
  """
465
284
  return AsyncSpansResourceWithStreamingResponse(self)
466
285
 
467
- @overload
468
286
  async def create(
469
287
  self,
470
288
  *,
@@ -472,7 +290,10 @@ class AsyncSpansResource(AsyncAPIResource):
472
290
  start_timestamp: Union[str, datetime],
473
291
  trace_id: str,
474
292
  id: str | NotGiven = NOT_GIVEN,
293
+ application_interaction_id: str | NotGiven = NOT_GIVEN,
294
+ application_variant_id: str | NotGiven = NOT_GIVEN,
475
295
  end_timestamp: Union[str, datetime] | NotGiven = NOT_GIVEN,
296
+ group_id: str | NotGiven = NOT_GIVEN,
476
297
  input: Dict[str, object] | NotGiven = NOT_GIVEN,
477
298
  metadata: Dict[str, object] | NotGiven = NOT_GIVEN,
478
299
  output: Dict[str, object] | NotGiven = NOT_GIVEN,
@@ -522,77 +343,11 @@ class AsyncSpansResource(AsyncAPIResource):
522
343
 
523
344
  id: The id of the span
524
345
 
525
- parent_id: Reference to a parent span_id
526
-
527
- extra_headers: Send extra headers
346
+ application_interaction_id: The optional application interaction ID this span belongs to
528
347
 
529
- extra_query: Add additional query parameters to the request
530
-
531
- extra_body: Add additional JSON properties to the request
348
+ application_variant_id: The optional application variant ID this span belongs to
532
349
 
533
- timeout: Override the client-level default timeout for this request, in seconds
534
- """
535
- ...
536
-
537
- @overload
538
- async def create(
539
- self,
540
- *,
541
- application_interaction_id: str,
542
- application_variant_id: str,
543
- name: str,
544
- start_timestamp: Union[str, datetime],
545
- trace_id: str,
546
- id: str | NotGiven = NOT_GIVEN,
547
- end_timestamp: Union[str, datetime] | NotGiven = NOT_GIVEN,
548
- input: Dict[str, object] | NotGiven = NOT_GIVEN,
549
- metadata: Dict[str, object] | NotGiven = NOT_GIVEN,
550
- output: Dict[str, object] | NotGiven = NOT_GIVEN,
551
- parent_id: str | NotGiven = NOT_GIVEN,
552
- status: Literal["SUCCESS", "ERROR"] | NotGiven = NOT_GIVEN,
553
- type: Literal[
554
- "TEXT_INPUT",
555
- "TEXT_OUTPUT",
556
- "COMPLETION_INPUT",
557
- "COMPLETION",
558
- "KB_RETRIEVAL",
559
- "KB_INPUT",
560
- "RERANKING",
561
- "EXTERNAL_ENDPOINT",
562
- "PROMPT_ENGINEERING",
563
- "DOCUMENT_INPUT",
564
- "MAP_REDUCE",
565
- "DOCUMENT_SEARCH",
566
- "DOCUMENT_PROMPT",
567
- "CUSTOM",
568
- "INPUT_GUARDRAIL",
569
- "OUTPUT_GUARDRAIL",
570
- "CODE_EXECUTION",
571
- "DATA_MANIPULATION",
572
- "EVALUATION",
573
- "FILE_RETRIEVAL",
574
- "KB_ADD_CHUNK",
575
- "KB_MANAGEMENT",
576
- "TRACER",
577
- "AGENT_TRACER",
578
- "AGENT_WORKFLOW",
579
- "STANDALONE",
580
- ]
581
- | NotGiven = NOT_GIVEN,
582
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
583
- # The extra values given here take precedence over values defined on the client or passed to this method.
584
- extra_headers: Headers | None = None,
585
- extra_query: Query | None = None,
586
- extra_body: Body | None = None,
587
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
588
- ) -> Span:
589
- """
590
- Create Span
591
-
592
- Args:
593
- trace_id: id for grouping traces together, uuid is recommended
594
-
595
- id: The id of the span
350
+ group_id: Reference to a group_id
596
351
 
597
352
  parent_id: Reference to a parent span_id
598
353
 
@@ -604,63 +359,6 @@ class AsyncSpansResource(AsyncAPIResource):
604
359
 
605
360
  timeout: Override the client-level default timeout for this request, in seconds
606
361
  """
607
- ...
608
-
609
- @required_args(
610
- ["name", "start_timestamp", "trace_id"],
611
- ["application_interaction_id", "application_variant_id", "name", "start_timestamp", "trace_id"],
612
- )
613
- async def create(
614
- self,
615
- *,
616
- name: str,
617
- start_timestamp: Union[str, datetime],
618
- trace_id: str,
619
- id: str | NotGiven = NOT_GIVEN,
620
- end_timestamp: Union[str, datetime] | NotGiven = NOT_GIVEN,
621
- input: Dict[str, object] | NotGiven = NOT_GIVEN,
622
- metadata: Dict[str, object] | NotGiven = NOT_GIVEN,
623
- output: Dict[str, object] | NotGiven = NOT_GIVEN,
624
- parent_id: str | NotGiven = NOT_GIVEN,
625
- status: Literal["SUCCESS", "ERROR"] | NotGiven = NOT_GIVEN,
626
- type: Literal[
627
- "TEXT_INPUT",
628
- "TEXT_OUTPUT",
629
- "COMPLETION_INPUT",
630
- "COMPLETION",
631
- "KB_RETRIEVAL",
632
- "KB_INPUT",
633
- "RERANKING",
634
- "EXTERNAL_ENDPOINT",
635
- "PROMPT_ENGINEERING",
636
- "DOCUMENT_INPUT",
637
- "MAP_REDUCE",
638
- "DOCUMENT_SEARCH",
639
- "DOCUMENT_PROMPT",
640
- "CUSTOM",
641
- "INPUT_GUARDRAIL",
642
- "OUTPUT_GUARDRAIL",
643
- "CODE_EXECUTION",
644
- "DATA_MANIPULATION",
645
- "EVALUATION",
646
- "FILE_RETRIEVAL",
647
- "KB_ADD_CHUNK",
648
- "KB_MANAGEMENT",
649
- "TRACER",
650
- "AGENT_TRACER",
651
- "AGENT_WORKFLOW",
652
- "STANDALONE",
653
- ]
654
- | NotGiven = NOT_GIVEN,
655
- application_interaction_id: str | NotGiven = NOT_GIVEN,
656
- application_variant_id: str | NotGiven = NOT_GIVEN,
657
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
658
- # The extra values given here take precedence over values defined on the client or passed to this method.
659
- extra_headers: Headers | None = None,
660
- extra_query: Query | None = None,
661
- extra_body: Body | None = None,
662
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
663
- ) -> Span:
664
362
  return await self._post(
665
363
  "/v5/spans",
666
364
  body=await async_maybe_transform(
@@ -669,15 +367,16 @@ class AsyncSpansResource(AsyncAPIResource):
669
367
  "start_timestamp": start_timestamp,
670
368
  "trace_id": trace_id,
671
369
  "id": id,
370
+ "application_interaction_id": application_interaction_id,
371
+ "application_variant_id": application_variant_id,
672
372
  "end_timestamp": end_timestamp,
373
+ "group_id": group_id,
673
374
  "input": input,
674
375
  "metadata": metadata,
675
376
  "output": output,
676
377
  "parent_id": parent_id,
677
378
  "status": status,
678
379
  "type": type,
679
- "application_interaction_id": application_interaction_id,
680
- "application_variant_id": application_variant_id,
681
380
  },
682
381
  span_create_params.SpanCreateParams,
683
382
  ),
@@ -768,66 +467,7 @@ class AsyncSpansResource(AsyncAPIResource):
768
467
  cast_to=Span,
769
468
  )
770
469
 
771
- def list(
772
- self,
773
- *,
774
- ending_before: str | NotGiven = NOT_GIVEN,
775
- from_ts: int | NotGiven = NOT_GIVEN,
776
- limit: int | NotGiven = NOT_GIVEN,
777
- parents_only: bool | NotGiven = NOT_GIVEN,
778
- sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
779
- starting_after: str | NotGiven = NOT_GIVEN,
780
- to_ts: int | NotGiven = NOT_GIVEN,
781
- trace_id: str | NotGiven = NOT_GIVEN,
782
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
783
- # The extra values given here take precedence over values defined on the client or passed to this method.
784
- extra_headers: Headers | None = None,
785
- extra_query: Query | None = None,
786
- extra_body: Body | None = None,
787
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
788
- ) -> AsyncPaginator[Span, AsyncCursorPage[Span]]:
789
- """
790
- List Spans
791
-
792
- Args:
793
- from_ts: The starting (oldest) timestamp window in seconds.
794
-
795
- to_ts: The ending (most recent) timestamp in seconds.
796
-
797
- extra_headers: Send extra headers
798
-
799
- extra_query: Add additional query parameters to the request
800
-
801
- extra_body: Add additional JSON properties to the request
802
-
803
- timeout: Override the client-level default timeout for this request, in seconds
804
- """
805
- return self._get_api_list(
806
- "/v5/spans",
807
- page=AsyncCursorPage[Span],
808
- options=make_request_options(
809
- extra_headers=extra_headers,
810
- extra_query=extra_query,
811
- extra_body=extra_body,
812
- timeout=timeout,
813
- query=maybe_transform(
814
- {
815
- "ending_before": ending_before,
816
- "from_ts": from_ts,
817
- "limit": limit,
818
- "parents_only": parents_only,
819
- "sort_order": sort_order,
820
- "starting_after": starting_after,
821
- "to_ts": to_ts,
822
- "trace_id": trace_id,
823
- },
824
- span_list_params.SpanListParams,
825
- ),
826
- ),
827
- model=Span,
828
- )
829
-
830
- def batch(
470
+ async def batch(
831
471
  self,
832
472
  *,
833
473
  items: Iterable[span_batch_params.Item],
@@ -837,7 +477,7 @@ class AsyncSpansResource(AsyncAPIResource):
837
477
  extra_query: Query | None = None,
838
478
  extra_body: Body | None = None,
839
479
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
840
- ) -> AsyncPaginator[Span, AsyncAPIListPage[Span]]:
480
+ ) -> SpanBatchResponse:
841
481
  """
842
482
  Create Spans in Batch
843
483
 
@@ -850,15 +490,13 @@ class AsyncSpansResource(AsyncAPIResource):
850
490
 
851
491
  timeout: Override the client-level default timeout for this request, in seconds
852
492
  """
853
- return self._get_api_list(
493
+ return await self._post(
854
494
  "/v5/spans/batch",
855
- page=AsyncAPIListPage[Span],
856
- body=maybe_transform({"items": items}, span_batch_params.SpanBatchParams),
495
+ body=await async_maybe_transform({"items": items}, span_batch_params.SpanBatchParams),
857
496
  options=make_request_options(
858
497
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
859
498
  ),
860
- model=Span,
861
- method="post",
499
+ cast_to=SpanBatchResponse,
862
500
  )
863
501
 
864
502
 
@@ -875,9 +513,6 @@ class SpansResourceWithRawResponse:
875
513
  self.update = to_raw_response_wrapper(
876
514
  spans.update,
877
515
  )
878
- self.list = to_raw_response_wrapper(
879
- spans.list,
880
- )
881
516
  self.batch = to_raw_response_wrapper(
882
517
  spans.batch,
883
518
  )
@@ -896,9 +531,6 @@ class AsyncSpansResourceWithRawResponse:
896
531
  self.update = async_to_raw_response_wrapper(
897
532
  spans.update,
898
533
  )
899
- self.list = async_to_raw_response_wrapper(
900
- spans.list,
901
- )
902
534
  self.batch = async_to_raw_response_wrapper(
903
535
  spans.batch,
904
536
  )
@@ -917,9 +549,6 @@ class SpansResourceWithStreamingResponse:
917
549
  self.update = to_streamed_response_wrapper(
918
550
  spans.update,
919
551
  )
920
- self.list = to_streamed_response_wrapper(
921
- spans.list,
922
- )
923
552
  self.batch = to_streamed_response_wrapper(
924
553
  spans.batch,
925
554
  )
@@ -938,9 +567,6 @@ class AsyncSpansResourceWithStreamingResponse:
938
567
  self.update = async_to_streamed_response_wrapper(
939
568
  spans.update,
940
569
  )
941
- self.list = async_to_streamed_response_wrapper(
942
- spans.list,
943
- )
944
570
  self.batch = async_to_streamed_response_wrapper(
945
571
  spans.batch,
946
572
  )
@@ -18,7 +18,6 @@ from .evaluation_item import EvaluationItem as EvaluationItem
18
18
  from .evaluation_task import EvaluationTask as EvaluationTask
19
19
  from .inference_model import InferenceModel as InferenceModel
20
20
  from .file_list_params import FileListParams as FileListParams
21
- from .span_list_params import SpanListParams as SpanListParams
22
21
  from .model_list_params import ModelListParams as ModelListParams
23
22
  from .span_batch_params import SpanBatchParams as SpanBatchParams
24
23
  from .file_create_params import FileCreateParams as FileCreateParams
@@ -29,6 +28,7 @@ from .span_update_params import SpanUpdateParams as SpanUpdateParams
29
28
  from .dataset_list_params import DatasetListParams as DatasetListParams
30
29
  from .model_create_params import ModelCreateParams as ModelCreateParams
31
30
  from .model_update_params import ModelUpdateParams as ModelUpdateParams
31
+ from .span_batch_response import SpanBatchResponse as SpanBatchResponse
32
32
  from .file_delete_response import FileDeleteResponse as FileDeleteResponse
33
33
  from .inference_model_list import InferenceModelList as InferenceModelList
34
34
  from .dataset_create_params import DatasetCreateParams as DatasetCreateParams
@@ -54,3 +54,4 @@ from .dataset_item_delete_response import DatasetItemDeleteResponse as DatasetIt
54
54
  from .dataset_item_retrieve_params import DatasetItemRetrieveParams as DatasetItemRetrieveParams
55
55
  from .evaluation_item_retrieve_params import EvaluationItemRetrieveParams as EvaluationItemRetrieveParams
56
56
  from .dataset_item_batch_create_params import DatasetItemBatchCreateParams as DatasetItemBatchCreateParams
57
+ from .dataset_item_batch_create_response import DatasetItemBatchCreateResponse as DatasetItemBatchCreateResponse
@@ -0,0 +1,15 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Optional
4
+ from typing_extensions import Literal
5
+
6
+ from .._models import BaseModel
7
+ from .dataset_item import DatasetItem
8
+
9
+ __all__ = ["DatasetItemBatchCreateResponse"]
10
+
11
+
12
+ class DatasetItemBatchCreateResponse(BaseModel):
13
+ items: List[DatasetItem]
14
+
15
+ object: Optional[Literal["list"]] = None
@@ -36,6 +36,8 @@ __all__ = [
36
36
  "MetricEvaluationTaskConfigurationRougeScorerLConfigWithItemLocator",
37
37
  "AutoEvaluationQuestionTask",
38
38
  "AutoEvaluationQuestionTaskConfiguration",
39
+ "AutoEvaluationGuidedDecodingEvaluationTask",
40
+ "AutoEvaluationGuidedDecodingEvaluationTaskConfiguration",
39
41
  "ContributorEvaluationQuestionTask",
40
42
  "ContributorEvaluationQuestionTaskConfiguration",
41
43
  ]
@@ -323,6 +325,33 @@ class AutoEvaluationQuestionTask(BaseModel):
323
325
  task_type: Optional[Literal["auto_evaluation.question"]] = None
324
326
 
325
327
 
328
+ class AutoEvaluationGuidedDecodingEvaluationTaskConfiguration(BaseModel):
329
+ choices: List[str]
330
+ """Choices array cannot be empty"""
331
+
332
+ model: str
333
+ """model specified as `model_vendor/model_name`"""
334
+
335
+ prompt: str
336
+
337
+ inference_args: Optional[Dict[str, object]] = None
338
+ """Additional arguments to pass to the inference request"""
339
+
340
+ system_prompt: Optional[str] = None
341
+
342
+
343
+ class AutoEvaluationGuidedDecodingEvaluationTask(BaseModel):
344
+ configuration: AutoEvaluationGuidedDecodingEvaluationTaskConfiguration
345
+
346
+ alias: Optional[str] = None
347
+ """Alias to title the results column.
348
+
349
+ Defaults to the `auto_evaluation_guided_decoding`
350
+ """
351
+
352
+ task_type: Optional[Literal["auto_evaluation.guided_decoding"]] = None
353
+
354
+
326
355
  class ContributorEvaluationQuestionTaskConfiguration(BaseModel):
327
356
  layout: "Container"
328
357
 
@@ -351,6 +380,7 @@ EvaluationTask: TypeAlias = Annotated[
351
380
  ApplicationVariantV1EvaluationTask,
352
381
  MetricEvaluationTask,
353
382
  AutoEvaluationQuestionTask,
383
+ AutoEvaluationGuidedDecodingEvaluationTask,
354
384
  ContributorEvaluationQuestionTask,
355
385
  ],
356
386
  PropertyInfo(discriminator="task_type"),
@@ -380,6 +410,8 @@ if PYDANTIC_V2:
380
410
  MetricEvaluationTaskConfigurationRougeScorerLConfigWithItemLocator.model_rebuild()
381
411
  AutoEvaluationQuestionTask.model_rebuild()
382
412
  AutoEvaluationQuestionTaskConfiguration.model_rebuild()
413
+ AutoEvaluationGuidedDecodingEvaluationTask.model_rebuild()
414
+ AutoEvaluationGuidedDecodingEvaluationTaskConfiguration.model_rebuild()
383
415
  ContributorEvaluationQuestionTask.model_rebuild()
384
416
  ContributorEvaluationQuestionTaskConfiguration.model_rebuild()
385
417
  else:
@@ -404,5 +436,7 @@ else:
404
436
  MetricEvaluationTaskConfigurationRougeScorerLConfigWithItemLocator.update_forward_refs() # type: ignore
405
437
  AutoEvaluationQuestionTask.update_forward_refs() # type: ignore
406
438
  AutoEvaluationQuestionTaskConfiguration.update_forward_refs() # type: ignore
439
+ AutoEvaluationGuidedDecodingEvaluationTask.update_forward_refs() # type: ignore
440
+ AutoEvaluationGuidedDecodingEvaluationTaskConfiguration.update_forward_refs() # type: ignore
407
441
  ContributorEvaluationQuestionTask.update_forward_refs() # type: ignore
408
442
  ContributorEvaluationQuestionTaskConfiguration.update_forward_refs() # type: ignore
@@ -33,6 +33,8 @@ __all__ = [
33
33
  "MetricEvaluationTaskConfigurationRougeScorerLConfigWithItemLocator",
34
34
  "AutoEvaluationQuestionTask",
35
35
  "AutoEvaluationQuestionTaskConfiguration",
36
+ "AutoEvaluationGuidedDecodingEvaluationTask",
37
+ "AutoEvaluationGuidedDecodingEvaluationTaskConfiguration",
36
38
  "ContributorEvaluationQuestionTask",
37
39
  "ContributorEvaluationQuestionTaskConfiguration",
38
40
  ]
@@ -318,6 +320,33 @@ class AutoEvaluationQuestionTask(TypedDict, total=False):
318
320
  task_type: Literal["auto_evaluation.question"]
319
321
 
320
322
 
323
+ class AutoEvaluationGuidedDecodingEvaluationTaskConfiguration(TypedDict, total=False):
324
+ choices: Required[List[str]]
325
+ """Choices array cannot be empty"""
326
+
327
+ model: Required[str]
328
+ """model specified as `model_vendor/model_name`"""
329
+
330
+ prompt: Required[str]
331
+
332
+ inference_args: Dict[str, object]
333
+ """Additional arguments to pass to the inference request"""
334
+
335
+ system_prompt: str
336
+
337
+
338
+ class AutoEvaluationGuidedDecodingEvaluationTask(TypedDict, total=False):
339
+ configuration: Required[AutoEvaluationGuidedDecodingEvaluationTaskConfiguration]
340
+
341
+ alias: str
342
+ """Alias to title the results column.
343
+
344
+ Defaults to the `auto_evaluation_guided_decoding`
345
+ """
346
+
347
+ task_type: Literal["auto_evaluation.guided_decoding"]
348
+
349
+
321
350
  class ContributorEvaluationQuestionTaskConfiguration(TypedDict, total=False):
322
351
  layout: Required["ContainerParam"]
323
352
 
@@ -345,6 +374,7 @@ EvaluationTaskParam: TypeAlias = Union[
345
374
  ApplicationVariantV1EvaluationTask,
346
375
  MetricEvaluationTask,
347
376
  AutoEvaluationQuestionTask,
377
+ AutoEvaluationGuidedDecodingEvaluationTask,
348
378
  ContributorEvaluationQuestionTask,
349
379
  ]
350
380
 
@@ -32,6 +32,9 @@ class Span(BaseModel):
32
32
 
33
33
  end_timestamp: Optional[datetime] = None
34
34
 
35
+ group_id: Optional[str] = None
36
+ """Reference to a group_id"""
37
+
35
38
  input: Optional[Dict[str, object]] = None
36
39
 
37
40
  metadata: Optional[Dict[str, object]] = None
@@ -4,18 +4,18 @@ from __future__ import annotations
4
4
 
5
5
  from typing import Dict, Union, Iterable
6
6
  from datetime import datetime
7
- from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
7
+ from typing_extensions import Literal, Required, Annotated, TypedDict
8
8
 
9
9
  from .._utils import PropertyInfo
10
10
 
11
- __all__ = ["SpanBatchParams", "Item", "ItemBaseSpanCreateRequest", "ItemLegacyApplicationSpanCreateRequest"]
11
+ __all__ = ["SpanBatchParams", "Item"]
12
12
 
13
13
 
14
14
  class SpanBatchParams(TypedDict, total=False):
15
15
  items: Required[Iterable[Item]]
16
16
 
17
17
 
18
- class ItemBaseSpanCreateRequest(TypedDict, total=False):
18
+ class Item(TypedDict, total=False):
19
19
  name: Required[str]
20
20
 
21
21
  start_timestamp: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
@@ -26,66 +26,17 @@ class ItemBaseSpanCreateRequest(TypedDict, total=False):
26
26
  id: str
27
27
  """The id of the span"""
28
28
 
29
- end_timestamp: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
30
-
31
- input: Dict[str, object]
32
-
33
- metadata: Dict[str, object]
34
-
35
- output: Dict[str, object]
36
-
37
- parent_id: str
38
- """Reference to a parent span_id"""
39
-
40
- status: Literal["SUCCESS", "ERROR"]
41
-
42
- type: Literal[
43
- "TEXT_INPUT",
44
- "TEXT_OUTPUT",
45
- "COMPLETION_INPUT",
46
- "COMPLETION",
47
- "KB_RETRIEVAL",
48
- "KB_INPUT",
49
- "RERANKING",
50
- "EXTERNAL_ENDPOINT",
51
- "PROMPT_ENGINEERING",
52
- "DOCUMENT_INPUT",
53
- "MAP_REDUCE",
54
- "DOCUMENT_SEARCH",
55
- "DOCUMENT_PROMPT",
56
- "CUSTOM",
57
- "INPUT_GUARDRAIL",
58
- "OUTPUT_GUARDRAIL",
59
- "CODE_EXECUTION",
60
- "DATA_MANIPULATION",
61
- "EVALUATION",
62
- "FILE_RETRIEVAL",
63
- "KB_ADD_CHUNK",
64
- "KB_MANAGEMENT",
65
- "TRACER",
66
- "AGENT_TRACER",
67
- "AGENT_WORKFLOW",
68
- "STANDALONE",
69
- ]
70
-
29
+ application_interaction_id: str
30
+ """The optional application interaction ID this span belongs to"""
71
31
 
72
- class ItemLegacyApplicationSpanCreateRequest(TypedDict, total=False):
73
- application_interaction_id: Required[str]
74
-
75
- application_variant_id: Required[str]
76
-
77
- name: Required[str]
78
-
79
- start_timestamp: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
80
-
81
- trace_id: Required[str]
82
- """id for grouping traces together, uuid is recommended"""
83
-
84
- id: str
85
- """The id of the span"""
32
+ application_variant_id: str
33
+ """The optional application variant ID this span belongs to"""
86
34
 
87
35
  end_timestamp: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
88
36
 
37
+ group_id: str
38
+ """Reference to a group_id"""
39
+
89
40
  input: Dict[str, object]
90
41
 
91
42
  metadata: Dict[str, object]
@@ -125,6 +76,3 @@ class ItemLegacyApplicationSpanCreateRequest(TypedDict, total=False):
125
76
  "AGENT_WORKFLOW",
126
77
  "STANDALONE",
127
78
  ]
128
-
129
-
130
- Item: TypeAlias = Union[ItemBaseSpanCreateRequest, ItemLegacyApplicationSpanCreateRequest]
@@ -0,0 +1,15 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Optional
4
+ from typing_extensions import Literal
5
+
6
+ from .span import Span
7
+ from .._models import BaseModel
8
+
9
+ __all__ = ["SpanBatchResponse"]
10
+
11
+
12
+ class SpanBatchResponse(BaseModel):
13
+ items: List[Span]
14
+
15
+ object: Optional[Literal["list"]] = None
@@ -4,14 +4,14 @@ from __future__ import annotations
4
4
 
5
5
  from typing import Dict, Union
6
6
  from datetime import datetime
7
- from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
7
+ from typing_extensions import Literal, Required, Annotated, TypedDict
8
8
 
9
9
  from .._utils import PropertyInfo
10
10
 
11
- __all__ = ["SpanCreateParams", "BaseSpanCreateRequest", "LegacyApplicationSpanCreateRequest"]
11
+ __all__ = ["SpanCreateParams"]
12
12
 
13
13
 
14
- class BaseSpanCreateRequest(TypedDict, total=False):
14
+ class SpanCreateParams(TypedDict, total=False):
15
15
  name: Required[str]
16
16
 
17
17
  start_timestamp: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
@@ -22,66 +22,17 @@ class BaseSpanCreateRequest(TypedDict, total=False):
22
22
  id: str
23
23
  """The id of the span"""
24
24
 
25
- end_timestamp: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
26
-
27
- input: Dict[str, object]
28
-
29
- metadata: Dict[str, object]
30
-
31
- output: Dict[str, object]
32
-
33
- parent_id: str
34
- """Reference to a parent span_id"""
35
-
36
- status: Literal["SUCCESS", "ERROR"]
37
-
38
- type: Literal[
39
- "TEXT_INPUT",
40
- "TEXT_OUTPUT",
41
- "COMPLETION_INPUT",
42
- "COMPLETION",
43
- "KB_RETRIEVAL",
44
- "KB_INPUT",
45
- "RERANKING",
46
- "EXTERNAL_ENDPOINT",
47
- "PROMPT_ENGINEERING",
48
- "DOCUMENT_INPUT",
49
- "MAP_REDUCE",
50
- "DOCUMENT_SEARCH",
51
- "DOCUMENT_PROMPT",
52
- "CUSTOM",
53
- "INPUT_GUARDRAIL",
54
- "OUTPUT_GUARDRAIL",
55
- "CODE_EXECUTION",
56
- "DATA_MANIPULATION",
57
- "EVALUATION",
58
- "FILE_RETRIEVAL",
59
- "KB_ADD_CHUNK",
60
- "KB_MANAGEMENT",
61
- "TRACER",
62
- "AGENT_TRACER",
63
- "AGENT_WORKFLOW",
64
- "STANDALONE",
65
- ]
66
-
25
+ application_interaction_id: str
26
+ """The optional application interaction ID this span belongs to"""
67
27
 
68
- class LegacyApplicationSpanCreateRequest(TypedDict, total=False):
69
- application_interaction_id: Required[str]
70
-
71
- application_variant_id: Required[str]
72
-
73
- name: Required[str]
74
-
75
- start_timestamp: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
76
-
77
- trace_id: Required[str]
78
- """id for grouping traces together, uuid is recommended"""
79
-
80
- id: str
81
- """The id of the span"""
28
+ application_variant_id: str
29
+ """The optional application variant ID this span belongs to"""
82
30
 
83
31
  end_timestamp: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
84
32
 
33
+ group_id: str
34
+ """Reference to a group_id"""
35
+
85
36
  input: Dict[str, object]
86
37
 
87
38
  metadata: Dict[str, object]
@@ -121,6 +72,3 @@ class LegacyApplicationSpanCreateRequest(TypedDict, total=False):
121
72
  "AGENT_WORKFLOW",
122
73
  "STANDALONE",
123
74
  ]
124
-
125
-
126
- SpanCreateParams: TypeAlias = Union[BaseSpanCreateRequest, LegacyApplicationSpanCreateRequest]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: scale-gp-beta
3
- Version: 0.1.0a15
3
+ Version: 0.1.0a16
4
4
  Summary: The official Python library for the Scale GP API
5
5
  Project-URL: Homepage, https://github.com/scaleapi/sgp-python-beta
6
6
  Project-URL: Repository, https://github.com/scaleapi/sgp-python-beta
@@ -242,10 +242,7 @@ client = SGPClient(
242
242
 
243
243
  inference = client.inference.create(
244
244
  model="model",
245
- inference_configuration={
246
- "num_retries": 0,
247
- "timeout_seconds": 0,
248
- },
245
+ inference_configuration={},
249
246
  )
250
247
  print(inference.inference_configuration)
251
248
  ```
@@ -1,17 +1,17 @@
1
1
  scale_gp_beta/__init__.py,sha256=x8toPf2r1c14qt9Fvh5cjeX1tytmAWa3lMc4tg9SYKY,2646
2
- scale_gp_beta/_base_client.py,sha256=8GtHz6aZm1Bzodrvusazgq3JJMpTHsCNyuUEw86he8M,64851
2
+ scale_gp_beta/_base_client.py,sha256=kt2Ghc1tCF5ImtzfGM1y3vvGxsE-KJIqrDcnRfsMaGo,65099
3
3
  scale_gp_beta/_client.py,sha256=3pNXJs9TKLjfYoTjFIIoSdd4mwwX1cc-VUveMBmkl_8,24491
4
4
  scale_gp_beta/_compat.py,sha256=VWemUKbj6DDkQ-O4baSpHVLJafotzeXmCQGJugfVTIw,6580
5
5
  scale_gp_beta/_constants.py,sha256=S14PFzyN9-I31wiV7SmIlL5Ga0MLHxdvegInGdXH7tM,462
6
6
  scale_gp_beta/_exceptions.py,sha256=95GM5CLFtP-QMjjmzsr5ajjZOyEZvyaETfGmqNPR8YM,3226
7
7
  scale_gp_beta/_files.py,sha256=VHiUi-XDLm5MK8EbVoB2TdgX3jbYshIfxYLeKv5jaYI,3620
8
- scale_gp_beta/_models.py,sha256=mB2r2VWQq49jG-F0RIXDrBxPp3v-Eg12wMOtVTNxtv4,29057
8
+ scale_gp_beta/_models.py,sha256=G1vczEodX0vUySeVKbF-mbzlaObNL1oVAYH4c65agRk,29131
9
9
  scale_gp_beta/_qs.py,sha256=AOkSz4rHtK4YI3ZU_kzea-zpwBUgEY8WniGmTPyEimc,4846
10
10
  scale_gp_beta/_resource.py,sha256=siZly_U6D0AOVLAzaOsqUdEFFzVMbWRj-ml30nvRp7E,1118
11
11
  scale_gp_beta/_response.py,sha256=GemuybPk0uemovTlGHyHkj-ScYTTDJA0jqH5FQqIPwQ,28852
12
12
  scale_gp_beta/_streaming.py,sha256=fcCSGXslmi2SmmkM05g2SACXHk2Mj7k1X5uMBu6U5s8,10112
13
- scale_gp_beta/_types.py,sha256=ScQhVBaKbtJrER3NkXbjokWE9DqSqREMIw9LE0NrFfA,6150
14
- scale_gp_beta/_version.py,sha256=ZitPDJnl-R0DCCEo0BOFoEdqTZjSMfheNorjYg3MMJ0,174
13
+ scale_gp_beta/_types.py,sha256=0wSs40TefKMPBj2wQKenEeZ0lzedoHClNJeqrpAgkII,6204
14
+ scale_gp_beta/_version.py,sha256=8MP9LBFokYx5T6qcYHCYoX7nL3ZeJz1c9ZW5XbV4agM,174
15
15
  scale_gp_beta/pagination.py,sha256=t-U86PYxl20VRsz8VXOMJJDe7HxkX7ISFMvRNbBNy9s,4054
16
16
  scale_gp_beta/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  scale_gp_beta/_utils/__init__.py,sha256=PNZ_QJuzZEgyYXqkO1HVhGkj5IU9bglVUcw7H-Knjzw,2062
@@ -27,20 +27,20 @@ scale_gp_beta/_utils/_utils.py,sha256=ts4CiiuNpFiGB6YMdkQRh2SZvYvsl7mAF-JWHCcLDf
27
27
  scale_gp_beta/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
28
28
  scale_gp_beta/resources/__init__.py,sha256=Fyo05_2_pc5orfyTSIpxa3btmBTd45VasgibwSqbbKo,4942
29
29
  scale_gp_beta/resources/completions.py,sha256=4esj9lGTJAxt6wFvON126DvEGkMIChRZ6uZBOf56Aac,31868
30
- scale_gp_beta/resources/dataset_items.py,sha256=tEkpOkv_SzFx6pXZw5ehZ29ndXzoQxP_8tBRPVQDnxY,22584
30
+ scale_gp_beta/resources/dataset_items.py,sha256=2d7O5zmqVEafJTxVwgbRz9yq-4T81dPPfFuPDRAaWqU,22510
31
31
  scale_gp_beta/resources/datasets.py,sha256=CVvokGR-PHgghKPP1Yivrdg6seSIwuaSGCJOHt7Wv_o,21783
32
32
  scale_gp_beta/resources/evaluation_items.py,sha256=Nvz3zKypvYUJWDDDvraaEwzr--Vbj27GAN670Ro5Mqo,11631
33
33
  scale_gp_beta/resources/evaluations.py,sha256=nFWudDB9o8Dc33ypzLfp4B7nJKYDRElxJxjiD-hxpA8,31442
34
34
  scale_gp_beta/resources/inference.py,sha256=w1JD8S5P_SxhOtj1vDyg-23uP72zVVVU6lKU_YbqX4U,7563
35
35
  scale_gp_beta/resources/models.py,sha256=pur_cBP8PHxN1PAiaEVld6OGxTWnwY-DJZQmkyo_lWQ,32645
36
- scale_gp_beta/resources/spans.py,sha256=srcR8IdqtVrEHEOM94eQOm10Zfb7tgbSVtKfp7BicIA,34044
36
+ scale_gp_beta/resources/spans.py,sha256=iFNdSFHB8QypQu-3AloVqiC_MY8WXuPCQSNiInf0nB0,20813
37
37
  scale_gp_beta/resources/chat/__init__.py,sha256=BVAfz9TM3DT5W9f_mt0P9YRxL_MsUxKCWAH6u1iogmA,1041
38
38
  scale_gp_beta/resources/chat/chat.py,sha256=4OG_TrwVqYvV-7Ha8Nbc6iuXQuys9wKXgkxYmE6p6jk,3672
39
39
  scale_gp_beta/resources/chat/completions.py,sha256=JhPNBdjsm5LL4wLLtwLR22cJ5OUEh-JLgJH50aZ2Ln4,51622
40
40
  scale_gp_beta/resources/files/__init__.py,sha256=VgAtqUimN5Kf_-lmEaNBnu_ApGegKsJQ1zNf-42MXFA,1002
41
41
  scale_gp_beta/resources/files/content.py,sha256=oJxb-28ZOUBgzE_MiAaJOcKFmtlB-N5APdhfZBNJna8,5762
42
42
  scale_gp_beta/resources/files/files.py,sha256=yGmHAI8mtO_NjqC5XVk3n2y2ZklzL_qGtnD8OuhDkcQ,20731
43
- scale_gp_beta/types/__init__.py,sha256=4DM257FuCmwf7W09q6aUnoFIf8ncbpIzUclln_wBgR8,3870
43
+ scale_gp_beta/types/__init__.py,sha256=AsUn-S-U_7R48I5jhu5rx3aM9oCoJAB4iSr_y1oxnqE,3992
44
44
  scale_gp_beta/types/completion.py,sha256=5eewo25sdqL4vutqvE8wmugE0Cw6YLzZ0_AD6yjP9NM,3259
45
45
  scale_gp_beta/types/completion_create_params.py,sha256=LE9vna29Kbh7E8qUq7EhQbcu7YuCF_h663maKtzOnhk,3063
46
46
  scale_gp_beta/types/component.py,sha256=0dLrvTEHpF628wZ-CIniOpsOzKfnLlaZy4OPIFDzoF0,403
@@ -52,6 +52,7 @@ scale_gp_beta/types/dataset_create_params.py,sha256=e8AftX5klhylAU-pseKOqaL6Fkdj
52
52
  scale_gp_beta/types/dataset_delete_response.py,sha256=Lc4K761LM__hosWI3gYjYnEl5JXL-cg4DU3lXKhtQoo,345
53
53
  scale_gp_beta/types/dataset_item.py,sha256=PZ6OHxNuvCOsAsLoN9kAqb7KugBe3powNSkDaDTM96k,545
54
54
  scale_gp_beta/types/dataset_item_batch_create_params.py,sha256=ORwWuIFKilxhuVhzcF32HD68E0-n5dnRlbyxUk4H3Ko,478
55
+ scale_gp_beta/types/dataset_item_batch_create_response.py,sha256=tUVLQ7igWxp4Dn0pvi1K6YEf7m8XnsrlyHbBkVq9i6k,402
55
56
  scale_gp_beta/types/dataset_item_delete_response.py,sha256=EffQRHJgGvew_n6XYVdojlC5Ec1oHg91xncrKWkyjGA,358
56
57
  scale_gp_beta/types/dataset_item_list_params.py,sha256=CEB161IozqL-n7YC54g76nFqK0sp7l-A0QB9ET0L86M,661
57
58
  scale_gp_beta/types/dataset_item_retrieve_params.py,sha256=f0kJg0btCGITamo949F7trvR0no7lOuVfoKTpFLJ5Gw,356
@@ -67,8 +68,8 @@ scale_gp_beta/types/evaluation_item_list_params.py,sha256=7sQVVKB87uO45lYuMUhGR6
67
68
  scale_gp_beta/types/evaluation_item_retrieve_params.py,sha256=UYEKIAQ4dy92ZOSV1tWDZcvXG7_0BSpOND5Ehzs7QM4,296
68
69
  scale_gp_beta/types/evaluation_list_params.py,sha256=DMQKsY6Xl5rA7gNngosF85EXuaguaF6U7Dyna3dbErA,489
69
70
  scale_gp_beta/types/evaluation_retrieve_params.py,sha256=_YuT-E2VO-f_SvHaIe24KBbhTNoK8T-3tVB6Ov6cqfg,356
70
- scale_gp_beta/types/evaluation_task.py,sha256=RRnb2J9PW-TJF_ZOz4j0akjayfz9FdNAoCoRNHHeDe4,15124
71
- scale_gp_beta/types/evaluation_task_param.py,sha256=1oPq__iObpOPmChS5KeVY18ilEEJZlVCKlyLbAcBVXE,10626
71
+ scale_gp_beta/types/evaluation_task.py,sha256=RvG1KBXTcRLHPoqjSFEJXjo9DVIypmIOnEsJLsuxoAw,16351
72
+ scale_gp_beta/types/evaluation_task_param.py,sha256=izBsyX4MhxTZssfGwtqTaLBq1RzTWwyOGcriCVV63Hk,11525
72
73
  scale_gp_beta/types/evaluation_update_params.py,sha256=lNbIG4lH5mCW51BJTzQN-RcXVa9JqPhJNFWyJcdAOUc,384
73
74
  scale_gp_beta/types/file.py,sha256=Xkha0eSr1q6hkwjE9e2XNgk8kuHNoTEe1LXNhz6o-1k,528
74
75
  scale_gp_beta/types/file_create_params.py,sha256=KpXv6JCbd8BlgceTmBTewxOky2JTJaTW3mcGiVVU7wE,317
@@ -88,10 +89,10 @@ scale_gp_beta/types/model_create_params.py,sha256=K04FNqloYYTwffMHnNLRnrPNOKPgG7
88
89
  scale_gp_beta/types/model_delete_response.py,sha256=fSpTChRLHPOoc9SJbkS4wcLxVOc3kKBOya8wkGow5pY,339
89
90
  scale_gp_beta/types/model_list_params.py,sha256=T4SXYdaqIwmFCeLw_5ZyEoICykSbRrJkXKJ7QWUZEvg,612
90
91
  scale_gp_beta/types/model_update_params.py,sha256=RFXvs-EIDHmNO-fnPB8H6B9DlK6bYVsiwFDMPPFHGII,3701
91
- scale_gp_beta/types/span.py,sha256=ZyOO7qliKlSSxG2kZ8IzOFwMIWXL3fBdc91rd-2YXSg,1874
92
- scale_gp_beta/types/span_batch_params.py,sha256=r9VTChzF5CdXZIYiBM0pzVvjn25Ow-YaNl9OV6eohdg,3209
93
- scale_gp_beta/types/span_create_params.py,sha256=MUREjuWtg6IvjCalESHjmERNh-ufUuf-_x6r-o4Gc0Y,3095
94
- scale_gp_beta/types/span_list_params.py,sha256=lJUJIX3WAEWQ_41tWnFAhOpBuInmco767tjJE641EB8,549
92
+ scale_gp_beta/types/span.py,sha256=xnvJSu6cNw7pPnRTrJd4nAFlzYr4ITfW5IDKSorZm7o,1944
93
+ scale_gp_beta/types/span_batch_params.py,sha256=Tb58rOX5bfqz17vRiSSM_dh8j58Omw3msF88uCIDNHw,1917
94
+ scale_gp_beta/types/span_batch_response.py,sha256=gNRJL9XVm5ELuIOWTCUbwwetxeD0s-M6JZi11USvBpU,354
95
+ scale_gp_beta/types/span_create_params.py,sha256=0M7Vm0PH8io2yQe36MRbgGhZnrSm3hF0wZ_kwRo4vzs,1827
95
96
  scale_gp_beta/types/span_update_params.py,sha256=UWSKLWtcqMkLYHcY9LsVPSTjmGO-9c7H5zvYmODrCoM,564
96
97
  scale_gp_beta/types/chat/__init__.py,sha256=YmEJo3C_C7aRkImUaKB5BG97oOGkV0q3sHimL8cMa4g,688
97
98
  scale_gp_beta/types/chat/chat_completion.py,sha256=oYOrsTBdGwV9e_mF4F06XmdyZI4pyw06IQ-0mFn0etk,8250
@@ -102,7 +103,7 @@ scale_gp_beta/types/chat/completion_models_params.py,sha256=ETxafJIUx4tTvkiR-ZCr
102
103
  scale_gp_beta/types/chat/completion_models_response.py,sha256=Ctgj6o-QWPSdjBKzG9J4Id0-DjXu4UGGw1NR6-840Ec,403
103
104
  scale_gp_beta/types/chat/model_definition.py,sha256=NNgopTm900GD0Zs2YHkcvoW67uKaWUKVyPbhKBHvKdQ,817
104
105
  scale_gp_beta/types/files/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekDUge2o_4pXQ,122
105
- scale_gp_beta-0.1.0a15.dist-info/METADATA,sha256=MWfAhnmnb4LdqVRgyMDToAeLItsPMEqT_LTPLOHaETs,16942
106
- scale_gp_beta-0.1.0a15.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
107
- scale_gp_beta-0.1.0a15.dist-info/licenses/LICENSE,sha256=x49Bj8r_ZpqfzThbmfHyZ_bE88XvHdIMI_ANyLHFFRE,11338
108
- scale_gp_beta-0.1.0a15.dist-info/RECORD,,
106
+ scale_gp_beta-0.1.0a16.dist-info/METADATA,sha256=5x4nRJXkKSNePi7vTPJ3bELwGP-1EnhwYYlgsbAy68g,16881
107
+ scale_gp_beta-0.1.0a16.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
108
+ scale_gp_beta-0.1.0a16.dist-info/licenses/LICENSE,sha256=x49Bj8r_ZpqfzThbmfHyZ_bE88XvHdIMI_ANyLHFFRE,11338
109
+ scale_gp_beta-0.1.0a16.dist-info/RECORD,,
@@ -1,27 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from __future__ import annotations
4
-
5
- from typing_extensions import Literal, TypedDict
6
-
7
- __all__ = ["SpanListParams"]
8
-
9
-
10
- class SpanListParams(TypedDict, total=False):
11
- ending_before: str
12
-
13
- from_ts: int
14
- """The starting (oldest) timestamp window in seconds."""
15
-
16
- limit: int
17
-
18
- parents_only: bool
19
-
20
- sort_order: Literal["asc", "desc"]
21
-
22
- starting_after: str
23
-
24
- to_ts: int
25
- """The ending (most recent) timestamp in seconds."""
26
-
27
- trace_id: str