scale-gp-beta 0.1.0a30__py3-none-any.whl → 0.1.0a32__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. scale_gp_beta/__init__.py +3 -1
  2. scale_gp_beta/_base_client.py +12 -12
  3. scale_gp_beta/_client.py +20 -20
  4. scale_gp_beta/_compat.py +48 -48
  5. scale_gp_beta/_models.py +51 -45
  6. scale_gp_beta/_qs.py +7 -7
  7. scale_gp_beta/_types.py +53 -12
  8. scale_gp_beta/_utils/__init__.py +9 -2
  9. scale_gp_beta/_utils/_compat.py +45 -0
  10. scale_gp_beta/_utils/_datetime_parse.py +136 -0
  11. scale_gp_beta/_utils/_transform.py +13 -3
  12. scale_gp_beta/_utils/_typing.py +6 -1
  13. scale_gp_beta/_utils/_utils.py +4 -5
  14. scale_gp_beta/_version.py +1 -1
  15. scale_gp_beta/resources/__init__.py +6 -6
  16. scale_gp_beta/resources/chat/completions.py +236 -236
  17. scale_gp_beta/resources/completions.py +142 -142
  18. scale_gp_beta/resources/dataset_items.py +27 -27
  19. scale_gp_beta/resources/datasets.py +38 -38
  20. scale_gp_beta/resources/evaluation_items.py +19 -19
  21. scale_gp_beta/resources/evaluations.py +97 -75
  22. scale_gp_beta/resources/files/content.py +3 -3
  23. scale_gp_beta/resources/files/files.py +21 -21
  24. scale_gp_beta/resources/inference.py +7 -7
  25. scale_gp_beta/resources/models.py +71 -73
  26. scale_gp_beta/resources/questions.py +43 -43
  27. scale_gp_beta/resources/responses.py +34 -34
  28. scale_gp_beta/resources/spans.py +81 -81
  29. scale_gp_beta/types/__init__.py +4 -4
  30. scale_gp_beta/types/chat/chat_completion.py +114 -19
  31. scale_gp_beta/types/chat/chat_completion_chunk.py +84 -14
  32. scale_gp_beta/types/chat/completion_create_params.py +5 -3
  33. scale_gp_beta/types/completion.py +36 -6
  34. scale_gp_beta/types/completion_create_params.py +5 -3
  35. scale_gp_beta/types/container.py +2 -2
  36. scale_gp_beta/types/container_param.py +2 -2
  37. scale_gp_beta/types/dataset_create_params.py +4 -2
  38. scale_gp_beta/types/dataset_list_params.py +3 -2
  39. scale_gp_beta/types/dataset_update_params.py +3 -2
  40. scale_gp_beta/types/evaluation.py +7 -1
  41. scale_gp_beta/types/evaluation_create_params.py +17 -6
  42. scale_gp_beta/types/evaluation_list_params.py +3 -1
  43. scale_gp_beta/types/evaluation_task.py +6 -1
  44. scale_gp_beta/types/evaluation_task_param.py +4 -3
  45. scale_gp_beta/types/evaluation_update_params.py +3 -2
  46. scale_gp_beta/types/inference_model.py +10 -1
  47. scale_gp_beta/types/model_create_params.py +6 -4
  48. scale_gp_beta/types/model_update_params.py +6 -4
  49. scale_gp_beta/types/question_create_params.py +4 -2
  50. scale_gp_beta/types/response.py +852 -142
  51. scale_gp_beta/types/response_create_params.py +7 -5
  52. scale_gp_beta/types/response_create_response.py +6072 -1012
  53. scale_gp_beta/types/span_search_params.py +8 -7
  54. {scale_gp_beta-0.1.0a30.dist-info → scale_gp_beta-0.1.0a32.dist-info}/METADATA +1 -1
  55. {scale_gp_beta-0.1.0a30.dist-info → scale_gp_beta-0.1.0a32.dist-info}/RECORD +57 -55
  56. {scale_gp_beta-0.1.0a30.dist-info → scale_gp_beta-0.1.0a32.dist-info}/WHEEL +0 -0
  57. {scale_gp_beta-0.1.0a30.dist-info → scale_gp_beta-0.1.0a32.dist-info}/licenses/LICENSE +0 -0
@@ -2,13 +2,13 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Dict, List, Union
5
+ from typing import Dict, Union
6
6
  from typing_extensions import Literal, overload
7
7
 
8
8
  import httpx
9
9
 
10
10
  from ..types import completion_create_params
11
- from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
11
+ from .._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
12
12
  from .._utils import required_args, maybe_transform, async_maybe_transform
13
13
  from .._compat import cached_property
14
14
  from .._resource import SyncAPIResource, AsyncAPIResource
@@ -50,29 +50,29 @@ class CompletionsResource(SyncAPIResource):
50
50
  self,
51
51
  *,
52
52
  model: str,
53
- prompt: Union[str, List[str]],
54
- best_of: int | NotGiven = NOT_GIVEN,
55
- echo: bool | NotGiven = NOT_GIVEN,
56
- frequency_penalty: float | NotGiven = NOT_GIVEN,
57
- logit_bias: Dict[str, int] | NotGiven = NOT_GIVEN,
58
- logprobs: int | NotGiven = NOT_GIVEN,
59
- max_tokens: int | NotGiven = NOT_GIVEN,
60
- n: int | NotGiven = NOT_GIVEN,
61
- presence_penalty: float | NotGiven = NOT_GIVEN,
62
- seed: int | NotGiven = NOT_GIVEN,
63
- stop: Union[str, List[str]] | NotGiven = NOT_GIVEN,
64
- stream: Literal[False] | NotGiven = NOT_GIVEN,
65
- stream_options: Dict[str, object] | NotGiven = NOT_GIVEN,
66
- suffix: str | NotGiven = NOT_GIVEN,
67
- temperature: float | NotGiven = NOT_GIVEN,
68
- top_p: float | NotGiven = NOT_GIVEN,
69
- user: str | NotGiven = NOT_GIVEN,
53
+ prompt: Union[str, SequenceNotStr[str]],
54
+ best_of: int | Omit = omit,
55
+ echo: bool | Omit = omit,
56
+ frequency_penalty: float | Omit = omit,
57
+ logit_bias: Dict[str, int] | Omit = omit,
58
+ logprobs: int | Omit = omit,
59
+ max_tokens: int | Omit = omit,
60
+ n: int | Omit = omit,
61
+ presence_penalty: float | Omit = omit,
62
+ seed: int | Omit = omit,
63
+ stop: Union[str, SequenceNotStr[str]] | Omit = omit,
64
+ stream: Literal[False] | Omit = omit,
65
+ stream_options: Dict[str, object] | Omit = omit,
66
+ suffix: str | Omit = omit,
67
+ temperature: float | Omit = omit,
68
+ top_p: float | Omit = omit,
69
+ user: str | Omit = omit,
70
70
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
71
71
  # The extra values given here take precedence over values defined on the client or passed to this method.
72
72
  extra_headers: Headers | None = None,
73
73
  extra_query: Query | None = None,
74
74
  extra_body: Body | None = None,
75
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
75
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
76
76
  ) -> Completion:
77
77
  """
78
78
  Completions
@@ -139,29 +139,29 @@ class CompletionsResource(SyncAPIResource):
139
139
  self,
140
140
  *,
141
141
  model: str,
142
- prompt: Union[str, List[str]],
142
+ prompt: Union[str, SequenceNotStr[str]],
143
143
  stream: Literal[True],
144
- best_of: int | NotGiven = NOT_GIVEN,
145
- echo: bool | NotGiven = NOT_GIVEN,
146
- frequency_penalty: float | NotGiven = NOT_GIVEN,
147
- logit_bias: Dict[str, int] | NotGiven = NOT_GIVEN,
148
- logprobs: int | NotGiven = NOT_GIVEN,
149
- max_tokens: int | NotGiven = NOT_GIVEN,
150
- n: int | NotGiven = NOT_GIVEN,
151
- presence_penalty: float | NotGiven = NOT_GIVEN,
152
- seed: int | NotGiven = NOT_GIVEN,
153
- stop: Union[str, List[str]] | NotGiven = NOT_GIVEN,
154
- stream_options: Dict[str, object] | NotGiven = NOT_GIVEN,
155
- suffix: str | NotGiven = NOT_GIVEN,
156
- temperature: float | NotGiven = NOT_GIVEN,
157
- top_p: float | NotGiven = NOT_GIVEN,
158
- user: str | NotGiven = NOT_GIVEN,
144
+ best_of: int | Omit = omit,
145
+ echo: bool | Omit = omit,
146
+ frequency_penalty: float | Omit = omit,
147
+ logit_bias: Dict[str, int] | Omit = omit,
148
+ logprobs: int | Omit = omit,
149
+ max_tokens: int | Omit = omit,
150
+ n: int | Omit = omit,
151
+ presence_penalty: float | Omit = omit,
152
+ seed: int | Omit = omit,
153
+ stop: Union[str, SequenceNotStr[str]] | Omit = omit,
154
+ stream_options: Dict[str, object] | Omit = omit,
155
+ suffix: str | Omit = omit,
156
+ temperature: float | Omit = omit,
157
+ top_p: float | Omit = omit,
158
+ user: str | Omit = omit,
159
159
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
160
160
  # The extra values given here take precedence over values defined on the client or passed to this method.
161
161
  extra_headers: Headers | None = None,
162
162
  extra_query: Query | None = None,
163
163
  extra_body: Body | None = None,
164
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
164
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
165
165
  ) -> Stream[Completion]:
166
166
  """
167
167
  Completions
@@ -228,29 +228,29 @@ class CompletionsResource(SyncAPIResource):
228
228
  self,
229
229
  *,
230
230
  model: str,
231
- prompt: Union[str, List[str]],
231
+ prompt: Union[str, SequenceNotStr[str]],
232
232
  stream: bool,
233
- best_of: int | NotGiven = NOT_GIVEN,
234
- echo: bool | NotGiven = NOT_GIVEN,
235
- frequency_penalty: float | NotGiven = NOT_GIVEN,
236
- logit_bias: Dict[str, int] | NotGiven = NOT_GIVEN,
237
- logprobs: int | NotGiven = NOT_GIVEN,
238
- max_tokens: int | NotGiven = NOT_GIVEN,
239
- n: int | NotGiven = NOT_GIVEN,
240
- presence_penalty: float | NotGiven = NOT_GIVEN,
241
- seed: int | NotGiven = NOT_GIVEN,
242
- stop: Union[str, List[str]] | NotGiven = NOT_GIVEN,
243
- stream_options: Dict[str, object] | NotGiven = NOT_GIVEN,
244
- suffix: str | NotGiven = NOT_GIVEN,
245
- temperature: float | NotGiven = NOT_GIVEN,
246
- top_p: float | NotGiven = NOT_GIVEN,
247
- user: str | NotGiven = NOT_GIVEN,
233
+ best_of: int | Omit = omit,
234
+ echo: bool | Omit = omit,
235
+ frequency_penalty: float | Omit = omit,
236
+ logit_bias: Dict[str, int] | Omit = omit,
237
+ logprobs: int | Omit = omit,
238
+ max_tokens: int | Omit = omit,
239
+ n: int | Omit = omit,
240
+ presence_penalty: float | Omit = omit,
241
+ seed: int | Omit = omit,
242
+ stop: Union[str, SequenceNotStr[str]] | Omit = omit,
243
+ stream_options: Dict[str, object] | Omit = omit,
244
+ suffix: str | Omit = omit,
245
+ temperature: float | Omit = omit,
246
+ top_p: float | Omit = omit,
247
+ user: str | Omit = omit,
248
248
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
249
249
  # The extra values given here take precedence over values defined on the client or passed to this method.
250
250
  extra_headers: Headers | None = None,
251
251
  extra_query: Query | None = None,
252
252
  extra_body: Body | None = None,
253
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
253
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
254
254
  ) -> Completion | Stream[Completion]:
255
255
  """
256
256
  Completions
@@ -317,29 +317,29 @@ class CompletionsResource(SyncAPIResource):
317
317
  self,
318
318
  *,
319
319
  model: str,
320
- prompt: Union[str, List[str]],
321
- best_of: int | NotGiven = NOT_GIVEN,
322
- echo: bool | NotGiven = NOT_GIVEN,
323
- frequency_penalty: float | NotGiven = NOT_GIVEN,
324
- logit_bias: Dict[str, int] | NotGiven = NOT_GIVEN,
325
- logprobs: int | NotGiven = NOT_GIVEN,
326
- max_tokens: int | NotGiven = NOT_GIVEN,
327
- n: int | NotGiven = NOT_GIVEN,
328
- presence_penalty: float | NotGiven = NOT_GIVEN,
329
- seed: int | NotGiven = NOT_GIVEN,
330
- stop: Union[str, List[str]] | NotGiven = NOT_GIVEN,
331
- stream: Literal[False] | Literal[True] | NotGiven = NOT_GIVEN,
332
- stream_options: Dict[str, object] | NotGiven = NOT_GIVEN,
333
- suffix: str | NotGiven = NOT_GIVEN,
334
- temperature: float | NotGiven = NOT_GIVEN,
335
- top_p: float | NotGiven = NOT_GIVEN,
336
- user: str | NotGiven = NOT_GIVEN,
320
+ prompt: Union[str, SequenceNotStr[str]],
321
+ best_of: int | Omit = omit,
322
+ echo: bool | Omit = omit,
323
+ frequency_penalty: float | Omit = omit,
324
+ logit_bias: Dict[str, int] | Omit = omit,
325
+ logprobs: int | Omit = omit,
326
+ max_tokens: int | Omit = omit,
327
+ n: int | Omit = omit,
328
+ presence_penalty: float | Omit = omit,
329
+ seed: int | Omit = omit,
330
+ stop: Union[str, SequenceNotStr[str]] | Omit = omit,
331
+ stream: Literal[False] | Literal[True] | Omit = omit,
332
+ stream_options: Dict[str, object] | Omit = omit,
333
+ suffix: str | Omit = omit,
334
+ temperature: float | Omit = omit,
335
+ top_p: float | Omit = omit,
336
+ user: str | Omit = omit,
337
337
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
338
338
  # The extra values given here take precedence over values defined on the client or passed to this method.
339
339
  extra_headers: Headers | None = None,
340
340
  extra_query: Query | None = None,
341
341
  extra_body: Body | None = None,
342
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
342
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
343
343
  ) -> Completion | Stream[Completion]:
344
344
  return self._post(
345
345
  "/v5/completions",
@@ -402,29 +402,29 @@ class AsyncCompletionsResource(AsyncAPIResource):
402
402
  self,
403
403
  *,
404
404
  model: str,
405
- prompt: Union[str, List[str]],
406
- best_of: int | NotGiven = NOT_GIVEN,
407
- echo: bool | NotGiven = NOT_GIVEN,
408
- frequency_penalty: float | NotGiven = NOT_GIVEN,
409
- logit_bias: Dict[str, int] | NotGiven = NOT_GIVEN,
410
- logprobs: int | NotGiven = NOT_GIVEN,
411
- max_tokens: int | NotGiven = NOT_GIVEN,
412
- n: int | NotGiven = NOT_GIVEN,
413
- presence_penalty: float | NotGiven = NOT_GIVEN,
414
- seed: int | NotGiven = NOT_GIVEN,
415
- stop: Union[str, List[str]] | NotGiven = NOT_GIVEN,
416
- stream: Literal[False] | NotGiven = NOT_GIVEN,
417
- stream_options: Dict[str, object] | NotGiven = NOT_GIVEN,
418
- suffix: str | NotGiven = NOT_GIVEN,
419
- temperature: float | NotGiven = NOT_GIVEN,
420
- top_p: float | NotGiven = NOT_GIVEN,
421
- user: str | NotGiven = NOT_GIVEN,
405
+ prompt: Union[str, SequenceNotStr[str]],
406
+ best_of: int | Omit = omit,
407
+ echo: bool | Omit = omit,
408
+ frequency_penalty: float | Omit = omit,
409
+ logit_bias: Dict[str, int] | Omit = omit,
410
+ logprobs: int | Omit = omit,
411
+ max_tokens: int | Omit = omit,
412
+ n: int | Omit = omit,
413
+ presence_penalty: float | Omit = omit,
414
+ seed: int | Omit = omit,
415
+ stop: Union[str, SequenceNotStr[str]] | Omit = omit,
416
+ stream: Literal[False] | Omit = omit,
417
+ stream_options: Dict[str, object] | Omit = omit,
418
+ suffix: str | Omit = omit,
419
+ temperature: float | Omit = omit,
420
+ top_p: float | Omit = omit,
421
+ user: str | Omit = omit,
422
422
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
423
423
  # The extra values given here take precedence over values defined on the client or passed to this method.
424
424
  extra_headers: Headers | None = None,
425
425
  extra_query: Query | None = None,
426
426
  extra_body: Body | None = None,
427
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
427
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
428
428
  ) -> Completion:
429
429
  """
430
430
  Completions
@@ -491,29 +491,29 @@ class AsyncCompletionsResource(AsyncAPIResource):
491
491
  self,
492
492
  *,
493
493
  model: str,
494
- prompt: Union[str, List[str]],
494
+ prompt: Union[str, SequenceNotStr[str]],
495
495
  stream: Literal[True],
496
- best_of: int | NotGiven = NOT_GIVEN,
497
- echo: bool | NotGiven = NOT_GIVEN,
498
- frequency_penalty: float | NotGiven = NOT_GIVEN,
499
- logit_bias: Dict[str, int] | NotGiven = NOT_GIVEN,
500
- logprobs: int | NotGiven = NOT_GIVEN,
501
- max_tokens: int | NotGiven = NOT_GIVEN,
502
- n: int | NotGiven = NOT_GIVEN,
503
- presence_penalty: float | NotGiven = NOT_GIVEN,
504
- seed: int | NotGiven = NOT_GIVEN,
505
- stop: Union[str, List[str]] | NotGiven = NOT_GIVEN,
506
- stream_options: Dict[str, object] | NotGiven = NOT_GIVEN,
507
- suffix: str | NotGiven = NOT_GIVEN,
508
- temperature: float | NotGiven = NOT_GIVEN,
509
- top_p: float | NotGiven = NOT_GIVEN,
510
- user: str | NotGiven = NOT_GIVEN,
496
+ best_of: int | Omit = omit,
497
+ echo: bool | Omit = omit,
498
+ frequency_penalty: float | Omit = omit,
499
+ logit_bias: Dict[str, int] | Omit = omit,
500
+ logprobs: int | Omit = omit,
501
+ max_tokens: int | Omit = omit,
502
+ n: int | Omit = omit,
503
+ presence_penalty: float | Omit = omit,
504
+ seed: int | Omit = omit,
505
+ stop: Union[str, SequenceNotStr[str]] | Omit = omit,
506
+ stream_options: Dict[str, object] | Omit = omit,
507
+ suffix: str | Omit = omit,
508
+ temperature: float | Omit = omit,
509
+ top_p: float | Omit = omit,
510
+ user: str | Omit = omit,
511
511
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
512
512
  # The extra values given here take precedence over values defined on the client or passed to this method.
513
513
  extra_headers: Headers | None = None,
514
514
  extra_query: Query | None = None,
515
515
  extra_body: Body | None = None,
516
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
516
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
517
517
  ) -> AsyncStream[Completion]:
518
518
  """
519
519
  Completions
@@ -580,29 +580,29 @@ class AsyncCompletionsResource(AsyncAPIResource):
580
580
  self,
581
581
  *,
582
582
  model: str,
583
- prompt: Union[str, List[str]],
583
+ prompt: Union[str, SequenceNotStr[str]],
584
584
  stream: bool,
585
- best_of: int | NotGiven = NOT_GIVEN,
586
- echo: bool | NotGiven = NOT_GIVEN,
587
- frequency_penalty: float | NotGiven = NOT_GIVEN,
588
- logit_bias: Dict[str, int] | NotGiven = NOT_GIVEN,
589
- logprobs: int | NotGiven = NOT_GIVEN,
590
- max_tokens: int | NotGiven = NOT_GIVEN,
591
- n: int | NotGiven = NOT_GIVEN,
592
- presence_penalty: float | NotGiven = NOT_GIVEN,
593
- seed: int | NotGiven = NOT_GIVEN,
594
- stop: Union[str, List[str]] | NotGiven = NOT_GIVEN,
595
- stream_options: Dict[str, object] | NotGiven = NOT_GIVEN,
596
- suffix: str | NotGiven = NOT_GIVEN,
597
- temperature: float | NotGiven = NOT_GIVEN,
598
- top_p: float | NotGiven = NOT_GIVEN,
599
- user: str | NotGiven = NOT_GIVEN,
585
+ best_of: int | Omit = omit,
586
+ echo: bool | Omit = omit,
587
+ frequency_penalty: float | Omit = omit,
588
+ logit_bias: Dict[str, int] | Omit = omit,
589
+ logprobs: int | Omit = omit,
590
+ max_tokens: int | Omit = omit,
591
+ n: int | Omit = omit,
592
+ presence_penalty: float | Omit = omit,
593
+ seed: int | Omit = omit,
594
+ stop: Union[str, SequenceNotStr[str]] | Omit = omit,
595
+ stream_options: Dict[str, object] | Omit = omit,
596
+ suffix: str | Omit = omit,
597
+ temperature: float | Omit = omit,
598
+ top_p: float | Omit = omit,
599
+ user: str | Omit = omit,
600
600
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
601
601
  # The extra values given here take precedence over values defined on the client or passed to this method.
602
602
  extra_headers: Headers | None = None,
603
603
  extra_query: Query | None = None,
604
604
  extra_body: Body | None = None,
605
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
605
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
606
606
  ) -> Completion | AsyncStream[Completion]:
607
607
  """
608
608
  Completions
@@ -669,29 +669,29 @@ class AsyncCompletionsResource(AsyncAPIResource):
669
669
  self,
670
670
  *,
671
671
  model: str,
672
- prompt: Union[str, List[str]],
673
- best_of: int | NotGiven = NOT_GIVEN,
674
- echo: bool | NotGiven = NOT_GIVEN,
675
- frequency_penalty: float | NotGiven = NOT_GIVEN,
676
- logit_bias: Dict[str, int] | NotGiven = NOT_GIVEN,
677
- logprobs: int | NotGiven = NOT_GIVEN,
678
- max_tokens: int | NotGiven = NOT_GIVEN,
679
- n: int | NotGiven = NOT_GIVEN,
680
- presence_penalty: float | NotGiven = NOT_GIVEN,
681
- seed: int | NotGiven = NOT_GIVEN,
682
- stop: Union[str, List[str]] | NotGiven = NOT_GIVEN,
683
- stream: Literal[False] | Literal[True] | NotGiven = NOT_GIVEN,
684
- stream_options: Dict[str, object] | NotGiven = NOT_GIVEN,
685
- suffix: str | NotGiven = NOT_GIVEN,
686
- temperature: float | NotGiven = NOT_GIVEN,
687
- top_p: float | NotGiven = NOT_GIVEN,
688
- user: str | NotGiven = NOT_GIVEN,
672
+ prompt: Union[str, SequenceNotStr[str]],
673
+ best_of: int | Omit = omit,
674
+ echo: bool | Omit = omit,
675
+ frequency_penalty: float | Omit = omit,
676
+ logit_bias: Dict[str, int] | Omit = omit,
677
+ logprobs: int | Omit = omit,
678
+ max_tokens: int | Omit = omit,
679
+ n: int | Omit = omit,
680
+ presence_penalty: float | Omit = omit,
681
+ seed: int | Omit = omit,
682
+ stop: Union[str, SequenceNotStr[str]] | Omit = omit,
683
+ stream: Literal[False] | Literal[True] | Omit = omit,
684
+ stream_options: Dict[str, object] | Omit = omit,
685
+ suffix: str | Omit = omit,
686
+ temperature: float | Omit = omit,
687
+ top_p: float | Omit = omit,
688
+ user: str | Omit = omit,
689
689
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
690
690
  # The extra values given here take precedence over values defined on the client or passed to this method.
691
691
  extra_headers: Headers | None = None,
692
692
  extra_query: Query | None = None,
693
693
  extra_body: Body | None = None,
694
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
694
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
695
695
  ) -> Completion | AsyncStream[Completion]:
696
696
  return await self._post(
697
697
  "/v5/completions",
@@ -13,7 +13,7 @@ from ..types import (
13
13
  dataset_item_retrieve_params,
14
14
  dataset_item_batch_create_params,
15
15
  )
16
- from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
16
+ from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
17
17
  from .._utils import maybe_transform, async_maybe_transform
18
18
  from .._compat import cached_property
19
19
  from .._resource import SyncAPIResource, AsyncAPIResource
@@ -56,13 +56,13 @@ class DatasetItemsResource(SyncAPIResource):
56
56
  self,
57
57
  dataset_item_id: str,
58
58
  *,
59
- version: int | NotGiven = NOT_GIVEN,
59
+ version: int | Omit = omit,
60
60
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
61
61
  # The extra values given here take precedence over values defined on the client or passed to this method.
62
62
  extra_headers: Headers | None = None,
63
63
  extra_query: Query | None = None,
64
64
  extra_body: Body | None = None,
65
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
65
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
66
66
  ) -> DatasetItem:
67
67
  """Get Dataset Item
68
68
 
@@ -103,7 +103,7 @@ class DatasetItemsResource(SyncAPIResource):
103
103
  extra_headers: Headers | None = None,
104
104
  extra_query: Query | None = None,
105
105
  extra_body: Body | None = None,
106
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
106
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
107
107
  ) -> DatasetItem:
108
108
  """
109
109
  Update Dataset Item
@@ -133,19 +133,19 @@ class DatasetItemsResource(SyncAPIResource):
133
133
  def list(
134
134
  self,
135
135
  *,
136
- dataset_id: str | NotGiven = NOT_GIVEN,
137
- ending_before: str | NotGiven = NOT_GIVEN,
138
- include_archived: bool | NotGiven = NOT_GIVEN,
139
- limit: int | NotGiven = NOT_GIVEN,
140
- sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
141
- starting_after: str | NotGiven = NOT_GIVEN,
142
- version: int | NotGiven = NOT_GIVEN,
136
+ dataset_id: str | Omit = omit,
137
+ ending_before: str | Omit = omit,
138
+ include_archived: bool | Omit = omit,
139
+ limit: int | Omit = omit,
140
+ sort_order: Literal["asc", "desc"] | Omit = omit,
141
+ starting_after: str | Omit = omit,
142
+ version: int | Omit = omit,
143
143
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
144
144
  # The extra values given here take precedence over values defined on the client or passed to this method.
145
145
  extra_headers: Headers | None = None,
146
146
  extra_query: Query | None = None,
147
147
  extra_body: Body | None = None,
148
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
148
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
149
149
  ) -> SyncCursorPage[DatasetItem]:
150
150
  """List Dataset Items
151
151
 
@@ -199,7 +199,7 @@ class DatasetItemsResource(SyncAPIResource):
199
199
  extra_headers: Headers | None = None,
200
200
  extra_query: Query | None = None,
201
201
  extra_body: Body | None = None,
202
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
202
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
203
203
  ) -> DatasetItemDeleteResponse:
204
204
  """
205
205
  Delete Dataset Item
@@ -233,7 +233,7 @@ class DatasetItemsResource(SyncAPIResource):
233
233
  extra_headers: Headers | None = None,
234
234
  extra_query: Query | None = None,
235
235
  extra_body: Body | None = None,
236
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
236
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
237
237
  ) -> DatasetItemBatchCreateResponse:
238
238
  """
239
239
  Batch Create Dataset Items
@@ -291,13 +291,13 @@ class AsyncDatasetItemsResource(AsyncAPIResource):
291
291
  self,
292
292
  dataset_item_id: str,
293
293
  *,
294
- version: int | NotGiven = NOT_GIVEN,
294
+ version: int | Omit = omit,
295
295
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
296
296
  # The extra values given here take precedence over values defined on the client or passed to this method.
297
297
  extra_headers: Headers | None = None,
298
298
  extra_query: Query | None = None,
299
299
  extra_body: Body | None = None,
300
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
300
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
301
301
  ) -> DatasetItem:
302
302
  """Get Dataset Item
303
303
 
@@ -340,7 +340,7 @@ class AsyncDatasetItemsResource(AsyncAPIResource):
340
340
  extra_headers: Headers | None = None,
341
341
  extra_query: Query | None = None,
342
342
  extra_body: Body | None = None,
343
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
343
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
344
344
  ) -> DatasetItem:
345
345
  """
346
346
  Update Dataset Item
@@ -370,19 +370,19 @@ class AsyncDatasetItemsResource(AsyncAPIResource):
370
370
  def list(
371
371
  self,
372
372
  *,
373
- dataset_id: str | NotGiven = NOT_GIVEN,
374
- ending_before: str | NotGiven = NOT_GIVEN,
375
- include_archived: bool | NotGiven = NOT_GIVEN,
376
- limit: int | NotGiven = NOT_GIVEN,
377
- sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
378
- starting_after: str | NotGiven = NOT_GIVEN,
379
- version: int | NotGiven = NOT_GIVEN,
373
+ dataset_id: str | Omit = omit,
374
+ ending_before: str | Omit = omit,
375
+ include_archived: bool | Omit = omit,
376
+ limit: int | Omit = omit,
377
+ sort_order: Literal["asc", "desc"] | Omit = omit,
378
+ starting_after: str | Omit = omit,
379
+ version: int | Omit = omit,
380
380
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
381
381
  # The extra values given here take precedence over values defined on the client or passed to this method.
382
382
  extra_headers: Headers | None = None,
383
383
  extra_query: Query | None = None,
384
384
  extra_body: Body | None = None,
385
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
385
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
386
386
  ) -> AsyncPaginator[DatasetItem, AsyncCursorPage[DatasetItem]]:
387
387
  """List Dataset Items
388
388
 
@@ -436,7 +436,7 @@ class AsyncDatasetItemsResource(AsyncAPIResource):
436
436
  extra_headers: Headers | None = None,
437
437
  extra_query: Query | None = None,
438
438
  extra_body: Body | None = None,
439
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
439
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
440
440
  ) -> DatasetItemDeleteResponse:
441
441
  """
442
442
  Delete Dataset Item
@@ -470,7 +470,7 @@ class AsyncDatasetItemsResource(AsyncAPIResource):
470
470
  extra_headers: Headers | None = None,
471
471
  extra_query: Query | None = None,
472
472
  extra_body: Body | None = None,
473
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
473
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
474
474
  ) -> DatasetItemBatchCreateResponse:
475
475
  """
476
476
  Batch Create Dataset Items