scale-gp-beta 0.1.0a31__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 (34) hide show
  1. scale_gp_beta/__init__.py +3 -1
  2. scale_gp_beta/_base_client.py +9 -9
  3. scale_gp_beta/_client.py +12 -12
  4. scale_gp_beta/_models.py +10 -4
  5. scale_gp_beta/_qs.py +7 -7
  6. scale_gp_beta/_types.py +18 -11
  7. scale_gp_beta/_utils/_transform.py +2 -2
  8. scale_gp_beta/_utils/_utils.py +4 -4
  9. scale_gp_beta/_version.py +1 -1
  10. scale_gp_beta/resources/chat/completions.py +235 -235
  11. scale_gp_beta/resources/completions.py +133 -133
  12. scale_gp_beta/resources/dataset_items.py +27 -27
  13. scale_gp_beta/resources/datasets.py +37 -37
  14. scale_gp_beta/resources/evaluation_items.py +19 -19
  15. scale_gp_beta/resources/evaluations.py +83 -83
  16. scale_gp_beta/resources/files/content.py +3 -3
  17. scale_gp_beta/resources/files/files.py +21 -21
  18. scale_gp_beta/resources/inference.py +7 -7
  19. scale_gp_beta/resources/models.py +71 -73
  20. scale_gp_beta/resources/questions.py +43 -43
  21. scale_gp_beta/resources/responses.py +33 -33
  22. scale_gp_beta/resources/spans.py +81 -81
  23. scale_gp_beta/types/chat/chat_completion.py +114 -19
  24. scale_gp_beta/types/chat/chat_completion_chunk.py +84 -14
  25. scale_gp_beta/types/completion.py +36 -6
  26. scale_gp_beta/types/evaluation.py +3 -0
  27. scale_gp_beta/types/evaluation_task.py +6 -1
  28. scale_gp_beta/types/inference_model.py +6 -1
  29. scale_gp_beta/types/response.py +852 -142
  30. scale_gp_beta/types/response_create_response.py +6072 -1012
  31. {scale_gp_beta-0.1.0a31.dist-info → scale_gp_beta-0.1.0a32.dist-info}/METADATA +1 -1
  32. {scale_gp_beta-0.1.0a31.dist-info → scale_gp_beta-0.1.0a32.dist-info}/RECORD +34 -34
  33. {scale_gp_beta-0.1.0a31.dist-info → scale_gp_beta-0.1.0a32.dist-info}/WHEEL +0 -0
  34. {scale_gp_beta-0.1.0a31.dist-info → scale_gp_beta-0.1.0a32.dist-info}/licenses/LICENSE +0 -0
@@ -7,7 +7,7 @@ from typing_extensions import Literal, overload
7
7
 
8
8
  import httpx
9
9
 
10
- from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr
10
+ from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
11
11
  from ..._utils import required_args, maybe_transform, async_maybe_transform
12
12
  from ..._compat import cached_property
13
13
  from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -53,39 +53,39 @@ class CompletionsResource(SyncAPIResource):
53
53
  *,
54
54
  messages: Iterable[Dict[str, object]],
55
55
  model: str,
56
- audio: Dict[str, object] | NotGiven = NOT_GIVEN,
57
- frequency_penalty: float | NotGiven = NOT_GIVEN,
58
- function_call: Dict[str, object] | NotGiven = NOT_GIVEN,
59
- functions: Iterable[Dict[str, object]] | NotGiven = NOT_GIVEN,
60
- logit_bias: Dict[str, int] | NotGiven = NOT_GIVEN,
61
- logprobs: bool | NotGiven = NOT_GIVEN,
62
- max_completion_tokens: int | NotGiven = NOT_GIVEN,
63
- max_tokens: int | NotGiven = NOT_GIVEN,
64
- metadata: Dict[str, str] | NotGiven = NOT_GIVEN,
65
- modalities: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
66
- n: int | NotGiven = NOT_GIVEN,
67
- parallel_tool_calls: bool | NotGiven = NOT_GIVEN,
68
- prediction: Dict[str, object] | NotGiven = NOT_GIVEN,
69
- presence_penalty: float | NotGiven = NOT_GIVEN,
70
- reasoning_effort: str | NotGiven = NOT_GIVEN,
71
- response_format: Dict[str, object] | NotGiven = NOT_GIVEN,
72
- seed: int | NotGiven = NOT_GIVEN,
73
- stop: Union[str, SequenceNotStr[str]] | NotGiven = NOT_GIVEN,
74
- store: bool | NotGiven = NOT_GIVEN,
75
- stream: Literal[False] | NotGiven = NOT_GIVEN,
76
- stream_options: Dict[str, object] | NotGiven = NOT_GIVEN,
77
- temperature: float | NotGiven = NOT_GIVEN,
78
- tool_choice: Union[str, Dict[str, object]] | NotGiven = NOT_GIVEN,
79
- tools: Iterable[Dict[str, object]] | NotGiven = NOT_GIVEN,
80
- top_k: int | NotGiven = NOT_GIVEN,
81
- top_logprobs: int | NotGiven = NOT_GIVEN,
82
- top_p: float | NotGiven = NOT_GIVEN,
56
+ audio: Dict[str, object] | Omit = omit,
57
+ frequency_penalty: float | Omit = omit,
58
+ function_call: Dict[str, object] | Omit = omit,
59
+ functions: Iterable[Dict[str, object]] | Omit = omit,
60
+ logit_bias: Dict[str, int] | Omit = omit,
61
+ logprobs: bool | Omit = omit,
62
+ max_completion_tokens: int | Omit = omit,
63
+ max_tokens: int | Omit = omit,
64
+ metadata: Dict[str, str] | Omit = omit,
65
+ modalities: SequenceNotStr[str] | Omit = omit,
66
+ n: int | Omit = omit,
67
+ parallel_tool_calls: bool | Omit = omit,
68
+ prediction: Dict[str, object] | Omit = omit,
69
+ presence_penalty: float | Omit = omit,
70
+ reasoning_effort: str | Omit = omit,
71
+ response_format: Dict[str, object] | Omit = omit,
72
+ seed: int | Omit = omit,
73
+ stop: Union[str, SequenceNotStr[str]] | Omit = omit,
74
+ store: bool | Omit = omit,
75
+ stream: Literal[False] | Omit = omit,
76
+ stream_options: Dict[str, object] | Omit = omit,
77
+ temperature: float | Omit = omit,
78
+ tool_choice: Union[str, Dict[str, object]] | Omit = omit,
79
+ tools: Iterable[Dict[str, object]] | Omit = omit,
80
+ top_k: int | Omit = omit,
81
+ top_logprobs: int | Omit = omit,
82
+ top_p: float | Omit = omit,
83
83
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
84
84
  # The extra values given here take precedence over values defined on the client or passed to this method.
85
85
  extra_headers: Headers | None = None,
86
86
  extra_query: Query | None = None,
87
87
  extra_body: Body | None = None,
88
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
88
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
89
89
  ) -> CompletionCreateResponse:
90
90
  """
91
91
  Chat Completions
@@ -182,38 +182,38 @@ class CompletionsResource(SyncAPIResource):
182
182
  messages: Iterable[Dict[str, object]],
183
183
  model: str,
184
184
  stream: Literal[True],
185
- audio: Dict[str, object] | NotGiven = NOT_GIVEN,
186
- frequency_penalty: float | NotGiven = NOT_GIVEN,
187
- function_call: Dict[str, object] | NotGiven = NOT_GIVEN,
188
- functions: Iterable[Dict[str, object]] | NotGiven = NOT_GIVEN,
189
- logit_bias: Dict[str, int] | NotGiven = NOT_GIVEN,
190
- logprobs: bool | NotGiven = NOT_GIVEN,
191
- max_completion_tokens: int | NotGiven = NOT_GIVEN,
192
- max_tokens: int | NotGiven = NOT_GIVEN,
193
- metadata: Dict[str, str] | NotGiven = NOT_GIVEN,
194
- modalities: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
195
- n: int | NotGiven = NOT_GIVEN,
196
- parallel_tool_calls: bool | NotGiven = NOT_GIVEN,
197
- prediction: Dict[str, object] | NotGiven = NOT_GIVEN,
198
- presence_penalty: float | NotGiven = NOT_GIVEN,
199
- reasoning_effort: str | NotGiven = NOT_GIVEN,
200
- response_format: Dict[str, object] | NotGiven = NOT_GIVEN,
201
- seed: int | NotGiven = NOT_GIVEN,
202
- stop: Union[str, SequenceNotStr[str]] | NotGiven = NOT_GIVEN,
203
- store: bool | NotGiven = NOT_GIVEN,
204
- stream_options: Dict[str, object] | NotGiven = NOT_GIVEN,
205
- temperature: float | NotGiven = NOT_GIVEN,
206
- tool_choice: Union[str, Dict[str, object]] | NotGiven = NOT_GIVEN,
207
- tools: Iterable[Dict[str, object]] | NotGiven = NOT_GIVEN,
208
- top_k: int | NotGiven = NOT_GIVEN,
209
- top_logprobs: int | NotGiven = NOT_GIVEN,
210
- top_p: float | NotGiven = NOT_GIVEN,
185
+ audio: Dict[str, object] | Omit = omit,
186
+ frequency_penalty: float | Omit = omit,
187
+ function_call: Dict[str, object] | Omit = omit,
188
+ functions: Iterable[Dict[str, object]] | Omit = omit,
189
+ logit_bias: Dict[str, int] | Omit = omit,
190
+ logprobs: bool | Omit = omit,
191
+ max_completion_tokens: int | Omit = omit,
192
+ max_tokens: int | Omit = omit,
193
+ metadata: Dict[str, str] | Omit = omit,
194
+ modalities: SequenceNotStr[str] | Omit = omit,
195
+ n: int | Omit = omit,
196
+ parallel_tool_calls: bool | Omit = omit,
197
+ prediction: Dict[str, object] | Omit = omit,
198
+ presence_penalty: float | Omit = omit,
199
+ reasoning_effort: str | Omit = omit,
200
+ response_format: Dict[str, object] | Omit = omit,
201
+ seed: int | Omit = omit,
202
+ stop: Union[str, SequenceNotStr[str]] | Omit = omit,
203
+ store: bool | Omit = omit,
204
+ stream_options: Dict[str, object] | Omit = omit,
205
+ temperature: float | Omit = omit,
206
+ tool_choice: Union[str, Dict[str, object]] | Omit = omit,
207
+ tools: Iterable[Dict[str, object]] | Omit = omit,
208
+ top_k: int | Omit = omit,
209
+ top_logprobs: int | Omit = omit,
210
+ top_p: float | Omit = omit,
211
211
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
212
212
  # The extra values given here take precedence over values defined on the client or passed to this method.
213
213
  extra_headers: Headers | None = None,
214
214
  extra_query: Query | None = None,
215
215
  extra_body: Body | None = None,
216
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
216
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
217
217
  ) -> Stream[ChatCompletionChunk]:
218
218
  """
219
219
  Chat Completions
@@ -310,38 +310,38 @@ class CompletionsResource(SyncAPIResource):
310
310
  messages: Iterable[Dict[str, object]],
311
311
  model: str,
312
312
  stream: bool,
313
- audio: Dict[str, object] | NotGiven = NOT_GIVEN,
314
- frequency_penalty: float | NotGiven = NOT_GIVEN,
315
- function_call: Dict[str, object] | NotGiven = NOT_GIVEN,
316
- functions: Iterable[Dict[str, object]] | NotGiven = NOT_GIVEN,
317
- logit_bias: Dict[str, int] | NotGiven = NOT_GIVEN,
318
- logprobs: bool | NotGiven = NOT_GIVEN,
319
- max_completion_tokens: int | NotGiven = NOT_GIVEN,
320
- max_tokens: int | NotGiven = NOT_GIVEN,
321
- metadata: Dict[str, str] | NotGiven = NOT_GIVEN,
322
- modalities: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
323
- n: int | NotGiven = NOT_GIVEN,
324
- parallel_tool_calls: bool | NotGiven = NOT_GIVEN,
325
- prediction: Dict[str, object] | NotGiven = NOT_GIVEN,
326
- presence_penalty: float | NotGiven = NOT_GIVEN,
327
- reasoning_effort: str | NotGiven = NOT_GIVEN,
328
- response_format: Dict[str, object] | NotGiven = NOT_GIVEN,
329
- seed: int | NotGiven = NOT_GIVEN,
330
- stop: Union[str, SequenceNotStr[str]] | NotGiven = NOT_GIVEN,
331
- store: bool | NotGiven = NOT_GIVEN,
332
- stream_options: Dict[str, object] | NotGiven = NOT_GIVEN,
333
- temperature: float | NotGiven = NOT_GIVEN,
334
- tool_choice: Union[str, Dict[str, object]] | NotGiven = NOT_GIVEN,
335
- tools: Iterable[Dict[str, object]] | NotGiven = NOT_GIVEN,
336
- top_k: int | NotGiven = NOT_GIVEN,
337
- top_logprobs: int | NotGiven = NOT_GIVEN,
338
- top_p: float | NotGiven = NOT_GIVEN,
313
+ audio: Dict[str, object] | Omit = omit,
314
+ frequency_penalty: float | Omit = omit,
315
+ function_call: Dict[str, object] | Omit = omit,
316
+ functions: Iterable[Dict[str, object]] | Omit = omit,
317
+ logit_bias: Dict[str, int] | Omit = omit,
318
+ logprobs: bool | Omit = omit,
319
+ max_completion_tokens: int | Omit = omit,
320
+ max_tokens: int | Omit = omit,
321
+ metadata: Dict[str, str] | Omit = omit,
322
+ modalities: SequenceNotStr[str] | Omit = omit,
323
+ n: int | Omit = omit,
324
+ parallel_tool_calls: bool | Omit = omit,
325
+ prediction: Dict[str, object] | Omit = omit,
326
+ presence_penalty: float | Omit = omit,
327
+ reasoning_effort: str | Omit = omit,
328
+ response_format: Dict[str, object] | Omit = omit,
329
+ seed: int | Omit = omit,
330
+ stop: Union[str, SequenceNotStr[str]] | Omit = omit,
331
+ store: bool | Omit = omit,
332
+ stream_options: Dict[str, object] | Omit = omit,
333
+ temperature: float | Omit = omit,
334
+ tool_choice: Union[str, Dict[str, object]] | Omit = omit,
335
+ tools: Iterable[Dict[str, object]] | Omit = omit,
336
+ top_k: int | Omit = omit,
337
+ top_logprobs: int | Omit = omit,
338
+ top_p: float | Omit = omit,
339
339
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
340
340
  # The extra values given here take precedence over values defined on the client or passed to this method.
341
341
  extra_headers: Headers | None = None,
342
342
  extra_query: Query | None = None,
343
343
  extra_body: Body | None = None,
344
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
344
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
345
345
  ) -> CompletionCreateResponse | Stream[ChatCompletionChunk]:
346
346
  """
347
347
  Chat Completions
@@ -437,39 +437,39 @@ class CompletionsResource(SyncAPIResource):
437
437
  *,
438
438
  messages: Iterable[Dict[str, object]],
439
439
  model: str,
440
- audio: Dict[str, object] | NotGiven = NOT_GIVEN,
441
- frequency_penalty: float | NotGiven = NOT_GIVEN,
442
- function_call: Dict[str, object] | NotGiven = NOT_GIVEN,
443
- functions: Iterable[Dict[str, object]] | NotGiven = NOT_GIVEN,
444
- logit_bias: Dict[str, int] | NotGiven = NOT_GIVEN,
445
- logprobs: bool | NotGiven = NOT_GIVEN,
446
- max_completion_tokens: int | NotGiven = NOT_GIVEN,
447
- max_tokens: int | NotGiven = NOT_GIVEN,
448
- metadata: Dict[str, str] | NotGiven = NOT_GIVEN,
449
- modalities: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
450
- n: int | NotGiven = NOT_GIVEN,
451
- parallel_tool_calls: bool | NotGiven = NOT_GIVEN,
452
- prediction: Dict[str, object] | NotGiven = NOT_GIVEN,
453
- presence_penalty: float | NotGiven = NOT_GIVEN,
454
- reasoning_effort: str | NotGiven = NOT_GIVEN,
455
- response_format: Dict[str, object] | NotGiven = NOT_GIVEN,
456
- seed: int | NotGiven = NOT_GIVEN,
457
- stop: Union[str, SequenceNotStr[str]] | NotGiven = NOT_GIVEN,
458
- store: bool | NotGiven = NOT_GIVEN,
459
- stream: Literal[False] | Literal[True] | NotGiven = NOT_GIVEN,
460
- stream_options: Dict[str, object] | NotGiven = NOT_GIVEN,
461
- temperature: float | NotGiven = NOT_GIVEN,
462
- tool_choice: Union[str, Dict[str, object]] | NotGiven = NOT_GIVEN,
463
- tools: Iterable[Dict[str, object]] | NotGiven = NOT_GIVEN,
464
- top_k: int | NotGiven = NOT_GIVEN,
465
- top_logprobs: int | NotGiven = NOT_GIVEN,
466
- top_p: float | NotGiven = NOT_GIVEN,
440
+ audio: Dict[str, object] | Omit = omit,
441
+ frequency_penalty: float | Omit = omit,
442
+ function_call: Dict[str, object] | Omit = omit,
443
+ functions: Iterable[Dict[str, object]] | Omit = omit,
444
+ logit_bias: Dict[str, int] | Omit = omit,
445
+ logprobs: bool | Omit = omit,
446
+ max_completion_tokens: int | Omit = omit,
447
+ max_tokens: int | Omit = omit,
448
+ metadata: Dict[str, str] | Omit = omit,
449
+ modalities: SequenceNotStr[str] | Omit = omit,
450
+ n: int | Omit = omit,
451
+ parallel_tool_calls: bool | Omit = omit,
452
+ prediction: Dict[str, object] | Omit = omit,
453
+ presence_penalty: float | Omit = omit,
454
+ reasoning_effort: str | Omit = omit,
455
+ response_format: Dict[str, object] | Omit = omit,
456
+ seed: int | Omit = omit,
457
+ stop: Union[str, SequenceNotStr[str]] | Omit = omit,
458
+ store: bool | Omit = omit,
459
+ stream: Literal[False] | Literal[True] | Omit = omit,
460
+ stream_options: Dict[str, object] | Omit = omit,
461
+ temperature: float | Omit = omit,
462
+ tool_choice: Union[str, Dict[str, object]] | Omit = omit,
463
+ tools: Iterable[Dict[str, object]] | Omit = omit,
464
+ top_k: int | Omit = omit,
465
+ top_logprobs: int | Omit = omit,
466
+ top_p: float | Omit = omit,
467
467
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
468
468
  # The extra values given here take precedence over values defined on the client or passed to this method.
469
469
  extra_headers: Headers | None = None,
470
470
  extra_query: Query | None = None,
471
471
  extra_body: Body | None = None,
472
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
472
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
473
473
  ) -> CompletionCreateResponse | Stream[ChatCompletionChunk]:
474
474
  return self._post(
475
475
  "/v5/chat/completions",
@@ -522,9 +522,9 @@ class CompletionsResource(SyncAPIResource):
522
522
  def models(
523
523
  self,
524
524
  *,
525
- check_availability: bool | NotGiven = NOT_GIVEN,
526
- ending_before: str | NotGiven = NOT_GIVEN,
527
- limit: int | NotGiven = NOT_GIVEN,
525
+ check_availability: bool | Omit = omit,
526
+ ending_before: str | Omit = omit,
527
+ limit: int | Omit = omit,
528
528
  model_vendor: Literal[
529
529
  "openai",
530
530
  "cohere",
@@ -539,15 +539,15 @@ class CompletionsResource(SyncAPIResource):
539
539
  "xai",
540
540
  "fireworks_ai",
541
541
  ]
542
- | NotGiven = NOT_GIVEN,
543
- sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
544
- starting_after: str | NotGiven = NOT_GIVEN,
542
+ | Omit = omit,
543
+ sort_order: Literal["asc", "desc"] | Omit = omit,
544
+ starting_after: str | Omit = omit,
545
545
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
546
546
  # The extra values given here take precedence over values defined on the client or passed to this method.
547
547
  extra_headers: Headers | None = None,
548
548
  extra_query: Query | None = None,
549
549
  extra_body: Body | None = None,
550
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
550
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
551
551
  ) -> CompletionModelsResponse:
552
552
  """
553
553
  List Chat Completion Models
@@ -610,39 +610,39 @@ class AsyncCompletionsResource(AsyncAPIResource):
610
610
  *,
611
611
  messages: Iterable[Dict[str, object]],
612
612
  model: str,
613
- audio: Dict[str, object] | NotGiven = NOT_GIVEN,
614
- frequency_penalty: float | NotGiven = NOT_GIVEN,
615
- function_call: Dict[str, object] | NotGiven = NOT_GIVEN,
616
- functions: Iterable[Dict[str, object]] | NotGiven = NOT_GIVEN,
617
- logit_bias: Dict[str, int] | NotGiven = NOT_GIVEN,
618
- logprobs: bool | NotGiven = NOT_GIVEN,
619
- max_completion_tokens: int | NotGiven = NOT_GIVEN,
620
- max_tokens: int | NotGiven = NOT_GIVEN,
621
- metadata: Dict[str, str] | NotGiven = NOT_GIVEN,
622
- modalities: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
623
- n: int | NotGiven = NOT_GIVEN,
624
- parallel_tool_calls: bool | NotGiven = NOT_GIVEN,
625
- prediction: Dict[str, object] | NotGiven = NOT_GIVEN,
626
- presence_penalty: float | NotGiven = NOT_GIVEN,
627
- reasoning_effort: str | NotGiven = NOT_GIVEN,
628
- response_format: Dict[str, object] | NotGiven = NOT_GIVEN,
629
- seed: int | NotGiven = NOT_GIVEN,
630
- stop: Union[str, SequenceNotStr[str]] | NotGiven = NOT_GIVEN,
631
- store: bool | NotGiven = NOT_GIVEN,
632
- stream: Literal[False] | NotGiven = NOT_GIVEN,
633
- stream_options: Dict[str, object] | NotGiven = NOT_GIVEN,
634
- temperature: float | NotGiven = NOT_GIVEN,
635
- tool_choice: Union[str, Dict[str, object]] | NotGiven = NOT_GIVEN,
636
- tools: Iterable[Dict[str, object]] | NotGiven = NOT_GIVEN,
637
- top_k: int | NotGiven = NOT_GIVEN,
638
- top_logprobs: int | NotGiven = NOT_GIVEN,
639
- top_p: float | NotGiven = NOT_GIVEN,
613
+ audio: Dict[str, object] | Omit = omit,
614
+ frequency_penalty: float | Omit = omit,
615
+ function_call: Dict[str, object] | Omit = omit,
616
+ functions: Iterable[Dict[str, object]] | Omit = omit,
617
+ logit_bias: Dict[str, int] | Omit = omit,
618
+ logprobs: bool | Omit = omit,
619
+ max_completion_tokens: int | Omit = omit,
620
+ max_tokens: int | Omit = omit,
621
+ metadata: Dict[str, str] | Omit = omit,
622
+ modalities: SequenceNotStr[str] | Omit = omit,
623
+ n: int | Omit = omit,
624
+ parallel_tool_calls: bool | Omit = omit,
625
+ prediction: Dict[str, object] | Omit = omit,
626
+ presence_penalty: float | Omit = omit,
627
+ reasoning_effort: str | Omit = omit,
628
+ response_format: Dict[str, object] | Omit = omit,
629
+ seed: int | Omit = omit,
630
+ stop: Union[str, SequenceNotStr[str]] | Omit = omit,
631
+ store: bool | Omit = omit,
632
+ stream: Literal[False] | Omit = omit,
633
+ stream_options: Dict[str, object] | Omit = omit,
634
+ temperature: float | Omit = omit,
635
+ tool_choice: Union[str, Dict[str, object]] | Omit = omit,
636
+ tools: Iterable[Dict[str, object]] | Omit = omit,
637
+ top_k: int | Omit = omit,
638
+ top_logprobs: int | Omit = omit,
639
+ top_p: float | Omit = omit,
640
640
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
641
641
  # The extra values given here take precedence over values defined on the client or passed to this method.
642
642
  extra_headers: Headers | None = None,
643
643
  extra_query: Query | None = None,
644
644
  extra_body: Body | None = None,
645
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
645
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
646
646
  ) -> CompletionCreateResponse:
647
647
  """
648
648
  Chat Completions
@@ -739,38 +739,38 @@ class AsyncCompletionsResource(AsyncAPIResource):
739
739
  messages: Iterable[Dict[str, object]],
740
740
  model: str,
741
741
  stream: Literal[True],
742
- audio: Dict[str, object] | NotGiven = NOT_GIVEN,
743
- frequency_penalty: float | NotGiven = NOT_GIVEN,
744
- function_call: Dict[str, object] | NotGiven = NOT_GIVEN,
745
- functions: Iterable[Dict[str, object]] | NotGiven = NOT_GIVEN,
746
- logit_bias: Dict[str, int] | NotGiven = NOT_GIVEN,
747
- logprobs: bool | NotGiven = NOT_GIVEN,
748
- max_completion_tokens: int | NotGiven = NOT_GIVEN,
749
- max_tokens: int | NotGiven = NOT_GIVEN,
750
- metadata: Dict[str, str] | NotGiven = NOT_GIVEN,
751
- modalities: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
752
- n: int | NotGiven = NOT_GIVEN,
753
- parallel_tool_calls: bool | NotGiven = NOT_GIVEN,
754
- prediction: Dict[str, object] | NotGiven = NOT_GIVEN,
755
- presence_penalty: float | NotGiven = NOT_GIVEN,
756
- reasoning_effort: str | NotGiven = NOT_GIVEN,
757
- response_format: Dict[str, object] | NotGiven = NOT_GIVEN,
758
- seed: int | NotGiven = NOT_GIVEN,
759
- stop: Union[str, SequenceNotStr[str]] | NotGiven = NOT_GIVEN,
760
- store: bool | NotGiven = NOT_GIVEN,
761
- stream_options: Dict[str, object] | NotGiven = NOT_GIVEN,
762
- temperature: float | NotGiven = NOT_GIVEN,
763
- tool_choice: Union[str, Dict[str, object]] | NotGiven = NOT_GIVEN,
764
- tools: Iterable[Dict[str, object]] | NotGiven = NOT_GIVEN,
765
- top_k: int | NotGiven = NOT_GIVEN,
766
- top_logprobs: int | NotGiven = NOT_GIVEN,
767
- top_p: float | NotGiven = NOT_GIVEN,
742
+ audio: Dict[str, object] | Omit = omit,
743
+ frequency_penalty: float | Omit = omit,
744
+ function_call: Dict[str, object] | Omit = omit,
745
+ functions: Iterable[Dict[str, object]] | Omit = omit,
746
+ logit_bias: Dict[str, int] | Omit = omit,
747
+ logprobs: bool | Omit = omit,
748
+ max_completion_tokens: int | Omit = omit,
749
+ max_tokens: int | Omit = omit,
750
+ metadata: Dict[str, str] | Omit = omit,
751
+ modalities: SequenceNotStr[str] | Omit = omit,
752
+ n: int | Omit = omit,
753
+ parallel_tool_calls: bool | Omit = omit,
754
+ prediction: Dict[str, object] | Omit = omit,
755
+ presence_penalty: float | Omit = omit,
756
+ reasoning_effort: str | Omit = omit,
757
+ response_format: Dict[str, object] | Omit = omit,
758
+ seed: int | Omit = omit,
759
+ stop: Union[str, SequenceNotStr[str]] | Omit = omit,
760
+ store: bool | Omit = omit,
761
+ stream_options: Dict[str, object] | Omit = omit,
762
+ temperature: float | Omit = omit,
763
+ tool_choice: Union[str, Dict[str, object]] | Omit = omit,
764
+ tools: Iterable[Dict[str, object]] | Omit = omit,
765
+ top_k: int | Omit = omit,
766
+ top_logprobs: int | Omit = omit,
767
+ top_p: float | Omit = omit,
768
768
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
769
769
  # The extra values given here take precedence over values defined on the client or passed to this method.
770
770
  extra_headers: Headers | None = None,
771
771
  extra_query: Query | None = None,
772
772
  extra_body: Body | None = None,
773
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
773
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
774
774
  ) -> AsyncStream[ChatCompletionChunk]:
775
775
  """
776
776
  Chat Completions
@@ -867,38 +867,38 @@ class AsyncCompletionsResource(AsyncAPIResource):
867
867
  messages: Iterable[Dict[str, object]],
868
868
  model: str,
869
869
  stream: bool,
870
- audio: Dict[str, object] | NotGiven = NOT_GIVEN,
871
- frequency_penalty: float | NotGiven = NOT_GIVEN,
872
- function_call: Dict[str, object] | NotGiven = NOT_GIVEN,
873
- functions: Iterable[Dict[str, object]] | NotGiven = NOT_GIVEN,
874
- logit_bias: Dict[str, int] | NotGiven = NOT_GIVEN,
875
- logprobs: bool | NotGiven = NOT_GIVEN,
876
- max_completion_tokens: int | NotGiven = NOT_GIVEN,
877
- max_tokens: int | NotGiven = NOT_GIVEN,
878
- metadata: Dict[str, str] | NotGiven = NOT_GIVEN,
879
- modalities: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
880
- n: int | NotGiven = NOT_GIVEN,
881
- parallel_tool_calls: bool | NotGiven = NOT_GIVEN,
882
- prediction: Dict[str, object] | NotGiven = NOT_GIVEN,
883
- presence_penalty: float | NotGiven = NOT_GIVEN,
884
- reasoning_effort: str | NotGiven = NOT_GIVEN,
885
- response_format: Dict[str, object] | NotGiven = NOT_GIVEN,
886
- seed: int | NotGiven = NOT_GIVEN,
887
- stop: Union[str, SequenceNotStr[str]] | NotGiven = NOT_GIVEN,
888
- store: bool | NotGiven = NOT_GIVEN,
889
- stream_options: Dict[str, object] | NotGiven = NOT_GIVEN,
890
- temperature: float | NotGiven = NOT_GIVEN,
891
- tool_choice: Union[str, Dict[str, object]] | NotGiven = NOT_GIVEN,
892
- tools: Iterable[Dict[str, object]] | NotGiven = NOT_GIVEN,
893
- top_k: int | NotGiven = NOT_GIVEN,
894
- top_logprobs: int | NotGiven = NOT_GIVEN,
895
- top_p: float | NotGiven = NOT_GIVEN,
870
+ audio: Dict[str, object] | Omit = omit,
871
+ frequency_penalty: float | Omit = omit,
872
+ function_call: Dict[str, object] | Omit = omit,
873
+ functions: Iterable[Dict[str, object]] | Omit = omit,
874
+ logit_bias: Dict[str, int] | Omit = omit,
875
+ logprobs: bool | Omit = omit,
876
+ max_completion_tokens: int | Omit = omit,
877
+ max_tokens: int | Omit = omit,
878
+ metadata: Dict[str, str] | Omit = omit,
879
+ modalities: SequenceNotStr[str] | Omit = omit,
880
+ n: int | Omit = omit,
881
+ parallel_tool_calls: bool | Omit = omit,
882
+ prediction: Dict[str, object] | Omit = omit,
883
+ presence_penalty: float | Omit = omit,
884
+ reasoning_effort: str | Omit = omit,
885
+ response_format: Dict[str, object] | Omit = omit,
886
+ seed: int | Omit = omit,
887
+ stop: Union[str, SequenceNotStr[str]] | Omit = omit,
888
+ store: bool | Omit = omit,
889
+ stream_options: Dict[str, object] | Omit = omit,
890
+ temperature: float | Omit = omit,
891
+ tool_choice: Union[str, Dict[str, object]] | Omit = omit,
892
+ tools: Iterable[Dict[str, object]] | Omit = omit,
893
+ top_k: int | Omit = omit,
894
+ top_logprobs: int | Omit = omit,
895
+ top_p: float | Omit = omit,
896
896
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
897
897
  # The extra values given here take precedence over values defined on the client or passed to this method.
898
898
  extra_headers: Headers | None = None,
899
899
  extra_query: Query | None = None,
900
900
  extra_body: Body | None = None,
901
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
901
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
902
902
  ) -> CompletionCreateResponse | AsyncStream[ChatCompletionChunk]:
903
903
  """
904
904
  Chat Completions
@@ -994,39 +994,39 @@ class AsyncCompletionsResource(AsyncAPIResource):
994
994
  *,
995
995
  messages: Iterable[Dict[str, object]],
996
996
  model: str,
997
- audio: Dict[str, object] | NotGiven = NOT_GIVEN,
998
- frequency_penalty: float | NotGiven = NOT_GIVEN,
999
- function_call: Dict[str, object] | NotGiven = NOT_GIVEN,
1000
- functions: Iterable[Dict[str, object]] | NotGiven = NOT_GIVEN,
1001
- logit_bias: Dict[str, int] | NotGiven = NOT_GIVEN,
1002
- logprobs: bool | NotGiven = NOT_GIVEN,
1003
- max_completion_tokens: int | NotGiven = NOT_GIVEN,
1004
- max_tokens: int | NotGiven = NOT_GIVEN,
1005
- metadata: Dict[str, str] | NotGiven = NOT_GIVEN,
1006
- modalities: SequenceNotStr[str] | NotGiven = NOT_GIVEN,
1007
- n: int | NotGiven = NOT_GIVEN,
1008
- parallel_tool_calls: bool | NotGiven = NOT_GIVEN,
1009
- prediction: Dict[str, object] | NotGiven = NOT_GIVEN,
1010
- presence_penalty: float | NotGiven = NOT_GIVEN,
1011
- reasoning_effort: str | NotGiven = NOT_GIVEN,
1012
- response_format: Dict[str, object] | NotGiven = NOT_GIVEN,
1013
- seed: int | NotGiven = NOT_GIVEN,
1014
- stop: Union[str, SequenceNotStr[str]] | NotGiven = NOT_GIVEN,
1015
- store: bool | NotGiven = NOT_GIVEN,
1016
- stream: Literal[False] | Literal[True] | NotGiven = NOT_GIVEN,
1017
- stream_options: Dict[str, object] | NotGiven = NOT_GIVEN,
1018
- temperature: float | NotGiven = NOT_GIVEN,
1019
- tool_choice: Union[str, Dict[str, object]] | NotGiven = NOT_GIVEN,
1020
- tools: Iterable[Dict[str, object]] | NotGiven = NOT_GIVEN,
1021
- top_k: int | NotGiven = NOT_GIVEN,
1022
- top_logprobs: int | NotGiven = NOT_GIVEN,
1023
- top_p: float | NotGiven = NOT_GIVEN,
997
+ audio: Dict[str, object] | Omit = omit,
998
+ frequency_penalty: float | Omit = omit,
999
+ function_call: Dict[str, object] | Omit = omit,
1000
+ functions: Iterable[Dict[str, object]] | Omit = omit,
1001
+ logit_bias: Dict[str, int] | Omit = omit,
1002
+ logprobs: bool | Omit = omit,
1003
+ max_completion_tokens: int | Omit = omit,
1004
+ max_tokens: int | Omit = omit,
1005
+ metadata: Dict[str, str] | Omit = omit,
1006
+ modalities: SequenceNotStr[str] | Omit = omit,
1007
+ n: int | Omit = omit,
1008
+ parallel_tool_calls: bool | Omit = omit,
1009
+ prediction: Dict[str, object] | Omit = omit,
1010
+ presence_penalty: float | Omit = omit,
1011
+ reasoning_effort: str | Omit = omit,
1012
+ response_format: Dict[str, object] | Omit = omit,
1013
+ seed: int | Omit = omit,
1014
+ stop: Union[str, SequenceNotStr[str]] | Omit = omit,
1015
+ store: bool | Omit = omit,
1016
+ stream: Literal[False] | Literal[True] | Omit = omit,
1017
+ stream_options: Dict[str, object] | Omit = omit,
1018
+ temperature: float | Omit = omit,
1019
+ tool_choice: Union[str, Dict[str, object]] | Omit = omit,
1020
+ tools: Iterable[Dict[str, object]] | Omit = omit,
1021
+ top_k: int | Omit = omit,
1022
+ top_logprobs: int | Omit = omit,
1023
+ top_p: float | Omit = omit,
1024
1024
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1025
1025
  # The extra values given here take precedence over values defined on the client or passed to this method.
1026
1026
  extra_headers: Headers | None = None,
1027
1027
  extra_query: Query | None = None,
1028
1028
  extra_body: Body | None = None,
1029
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1029
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1030
1030
  ) -> CompletionCreateResponse | AsyncStream[ChatCompletionChunk]:
1031
1031
  return await self._post(
1032
1032
  "/v5/chat/completions",
@@ -1079,9 +1079,9 @@ class AsyncCompletionsResource(AsyncAPIResource):
1079
1079
  async def models(
1080
1080
  self,
1081
1081
  *,
1082
- check_availability: bool | NotGiven = NOT_GIVEN,
1083
- ending_before: str | NotGiven = NOT_GIVEN,
1084
- limit: int | NotGiven = NOT_GIVEN,
1082
+ check_availability: bool | Omit = omit,
1083
+ ending_before: str | Omit = omit,
1084
+ limit: int | Omit = omit,
1085
1085
  model_vendor: Literal[
1086
1086
  "openai",
1087
1087
  "cohere",
@@ -1096,15 +1096,15 @@ class AsyncCompletionsResource(AsyncAPIResource):
1096
1096
  "xai",
1097
1097
  "fireworks_ai",
1098
1098
  ]
1099
- | NotGiven = NOT_GIVEN,
1100
- sort_order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
1101
- starting_after: str | NotGiven = NOT_GIVEN,
1099
+ | Omit = omit,
1100
+ sort_order: Literal["asc", "desc"] | Omit = omit,
1101
+ starting_after: str | Omit = omit,
1102
1102
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1103
1103
  # The extra values given here take precedence over values defined on the client or passed to this method.
1104
1104
  extra_headers: Headers | None = None,
1105
1105
  extra_query: Query | None = None,
1106
1106
  extra_body: Body | None = None,
1107
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1107
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
1108
1108
  ) -> CompletionModelsResponse:
1109
1109
  """
1110
1110
  List Chat Completion Models