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.
- scale_gp_beta/__init__.py +3 -1
- scale_gp_beta/_base_client.py +12 -12
- scale_gp_beta/_client.py +20 -20
- scale_gp_beta/_compat.py +48 -48
- scale_gp_beta/_models.py +51 -45
- scale_gp_beta/_qs.py +7 -7
- scale_gp_beta/_types.py +53 -12
- scale_gp_beta/_utils/__init__.py +9 -2
- scale_gp_beta/_utils/_compat.py +45 -0
- scale_gp_beta/_utils/_datetime_parse.py +136 -0
- scale_gp_beta/_utils/_transform.py +13 -3
- scale_gp_beta/_utils/_typing.py +6 -1
- scale_gp_beta/_utils/_utils.py +4 -5
- scale_gp_beta/_version.py +1 -1
- scale_gp_beta/resources/__init__.py +6 -6
- scale_gp_beta/resources/chat/completions.py +236 -236
- scale_gp_beta/resources/completions.py +142 -142
- scale_gp_beta/resources/dataset_items.py +27 -27
- scale_gp_beta/resources/datasets.py +38 -38
- scale_gp_beta/resources/evaluation_items.py +19 -19
- scale_gp_beta/resources/evaluations.py +97 -75
- scale_gp_beta/resources/files/content.py +3 -3
- scale_gp_beta/resources/files/files.py +21 -21
- scale_gp_beta/resources/inference.py +7 -7
- scale_gp_beta/resources/models.py +71 -73
- scale_gp_beta/resources/questions.py +43 -43
- scale_gp_beta/resources/responses.py +34 -34
- scale_gp_beta/resources/spans.py +81 -81
- scale_gp_beta/types/__init__.py +4 -4
- scale_gp_beta/types/chat/chat_completion.py +114 -19
- scale_gp_beta/types/chat/chat_completion_chunk.py +84 -14
- scale_gp_beta/types/chat/completion_create_params.py +5 -3
- scale_gp_beta/types/completion.py +36 -6
- scale_gp_beta/types/completion_create_params.py +5 -3
- scale_gp_beta/types/container.py +2 -2
- scale_gp_beta/types/container_param.py +2 -2
- scale_gp_beta/types/dataset_create_params.py +4 -2
- scale_gp_beta/types/dataset_list_params.py +3 -2
- scale_gp_beta/types/dataset_update_params.py +3 -2
- scale_gp_beta/types/evaluation.py +7 -1
- scale_gp_beta/types/evaluation_create_params.py +17 -6
- scale_gp_beta/types/evaluation_list_params.py +3 -1
- scale_gp_beta/types/evaluation_task.py +6 -1
- scale_gp_beta/types/evaluation_task_param.py +4 -3
- scale_gp_beta/types/evaluation_update_params.py +3 -2
- scale_gp_beta/types/inference_model.py +10 -1
- scale_gp_beta/types/model_create_params.py +6 -4
- scale_gp_beta/types/model_update_params.py +6 -4
- scale_gp_beta/types/question_create_params.py +4 -2
- scale_gp_beta/types/response.py +852 -142
- scale_gp_beta/types/response_create_params.py +7 -5
- scale_gp_beta/types/response_create_response.py +6072 -1012
- scale_gp_beta/types/span_search_params.py +8 -7
- {scale_gp_beta-0.1.0a30.dist-info → scale_gp_beta-0.1.0a32.dist-info}/METADATA +1 -1
- {scale_gp_beta-0.1.0a30.dist-info → scale_gp_beta-0.1.0a32.dist-info}/RECORD +57 -55
- {scale_gp_beta-0.1.0a30.dist-info → scale_gp_beta-0.1.0a32.dist-info}/WHEEL +0 -0
- {scale_gp_beta-0.1.0a30.dist-info → scale_gp_beta-0.1.0a32.dist-info}/licenses/LICENSE +0 -0
|
@@ -8,7 +8,7 @@ from typing_extensions import Literal, overload
|
|
|
8
8
|
import httpx
|
|
9
9
|
|
|
10
10
|
from ..types import model_list_params, model_create_params, model_update_params
|
|
11
|
-
from .._types import
|
|
11
|
+
from .._types import Body, Omit, Query, Headers, NotGiven, 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
|
|
@@ -52,16 +52,16 @@ class ModelsResource(SyncAPIResource):
|
|
|
52
52
|
*,
|
|
53
53
|
name: str,
|
|
54
54
|
vendor_configuration: model_create_params.LaunchModelCreateRequestVendorConfiguration,
|
|
55
|
-
model_metadata: Dict[str, object] |
|
|
56
|
-
model_type: Literal["generic"] |
|
|
57
|
-
model_vendor: Literal["launch"] |
|
|
58
|
-
on_conflict: Literal["error", "update"] |
|
|
55
|
+
model_metadata: Dict[str, object] | Omit = omit,
|
|
56
|
+
model_type: Literal["generic"] | Omit = omit,
|
|
57
|
+
model_vendor: Literal["launch"] | Omit = omit,
|
|
58
|
+
on_conflict: Literal["error", "update"] | Omit = omit,
|
|
59
59
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
60
60
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
61
61
|
extra_headers: Headers | None = None,
|
|
62
62
|
extra_query: Query | None = None,
|
|
63
63
|
extra_body: Body | None = None,
|
|
64
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
64
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
65
65
|
) -> InferenceModel:
|
|
66
66
|
"""
|
|
67
67
|
Create Model
|
|
@@ -85,16 +85,16 @@ class ModelsResource(SyncAPIResource):
|
|
|
85
85
|
*,
|
|
86
86
|
name: str,
|
|
87
87
|
vendor_configuration: model_create_params.LlmEngineModelCreateRequestVendorConfiguration,
|
|
88
|
-
model_metadata: Dict[str, object] |
|
|
89
|
-
model_type: Literal["chat_completion"] |
|
|
90
|
-
model_vendor: Literal["llmengine"] |
|
|
91
|
-
on_conflict: Literal["error", "update"] |
|
|
88
|
+
model_metadata: Dict[str, object] | Omit = omit,
|
|
89
|
+
model_type: Literal["chat_completion"] | Omit = omit,
|
|
90
|
+
model_vendor: Literal["llmengine"] | Omit = omit,
|
|
91
|
+
on_conflict: Literal["error", "update"] | Omit = omit,
|
|
92
92
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
93
93
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
94
94
|
extra_headers: Headers | None = None,
|
|
95
95
|
extra_query: Query | None = None,
|
|
96
96
|
extra_body: Body | None = None,
|
|
97
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
97
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
98
98
|
) -> InferenceModel:
|
|
99
99
|
"""
|
|
100
100
|
Create Model
|
|
@@ -119,16 +119,16 @@ class ModelsResource(SyncAPIResource):
|
|
|
119
119
|
name: str,
|
|
120
120
|
vendor_configuration: model_create_params.LaunchModelCreateRequestVendorConfiguration
|
|
121
121
|
| model_create_params.LlmEngineModelCreateRequestVendorConfiguration,
|
|
122
|
-
model_metadata: Dict[str, object] |
|
|
123
|
-
model_type: Literal["generic"] | Literal["chat_completion"] |
|
|
124
|
-
model_vendor: Literal["launch"] | Literal["llmengine"] |
|
|
125
|
-
on_conflict: Literal["error", "update"] |
|
|
122
|
+
model_metadata: Dict[str, object] | Omit = omit,
|
|
123
|
+
model_type: Literal["generic"] | Literal["chat_completion"] | Omit = omit,
|
|
124
|
+
model_vendor: Literal["launch"] | Literal["llmengine"] | Omit = omit,
|
|
125
|
+
on_conflict: Literal["error", "update"] | Omit = omit,
|
|
126
126
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
127
127
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
128
128
|
extra_headers: Headers | None = None,
|
|
129
129
|
extra_query: Query | None = None,
|
|
130
130
|
extra_body: Body | None = None,
|
|
131
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
131
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
132
132
|
) -> InferenceModel:
|
|
133
133
|
return self._post(
|
|
134
134
|
"/v5/models",
|
|
@@ -158,7 +158,7 @@ class ModelsResource(SyncAPIResource):
|
|
|
158
158
|
extra_headers: Headers | None = None,
|
|
159
159
|
extra_query: Query | None = None,
|
|
160
160
|
extra_body: Body | None = None,
|
|
161
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
161
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
162
162
|
) -> InferenceModel:
|
|
163
163
|
"""
|
|
164
164
|
Get Model
|
|
@@ -187,13 +187,13 @@ class ModelsResource(SyncAPIResource):
|
|
|
187
187
|
self,
|
|
188
188
|
model_id: str,
|
|
189
189
|
*,
|
|
190
|
-
model_metadata: Dict[str, object] |
|
|
190
|
+
model_metadata: Dict[str, object] | Omit = omit,
|
|
191
191
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
192
192
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
193
193
|
extra_headers: Headers | None = None,
|
|
194
194
|
extra_query: Query | None = None,
|
|
195
195
|
extra_body: Body | None = None,
|
|
196
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
196
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
197
197
|
) -> InferenceModel:
|
|
198
198
|
"""
|
|
199
199
|
Update Model
|
|
@@ -215,13 +215,13 @@ class ModelsResource(SyncAPIResource):
|
|
|
215
215
|
model_id: str,
|
|
216
216
|
*,
|
|
217
217
|
vendor_configuration: model_update_params.ModelConfigurationPatchRequestVendorConfiguration,
|
|
218
|
-
model_metadata: Dict[str, object] |
|
|
218
|
+
model_metadata: Dict[str, object] | Omit = omit,
|
|
219
219
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
220
220
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
221
221
|
extra_headers: Headers | None = None,
|
|
222
222
|
extra_query: Query | None = None,
|
|
223
223
|
extra_body: Body | None = None,
|
|
224
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
224
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
225
225
|
) -> InferenceModel:
|
|
226
226
|
"""
|
|
227
227
|
Update Model
|
|
@@ -243,13 +243,13 @@ class ModelsResource(SyncAPIResource):
|
|
|
243
243
|
model_id: str,
|
|
244
244
|
*,
|
|
245
245
|
name: str,
|
|
246
|
-
on_conflict: Literal["error", "swap"] |
|
|
246
|
+
on_conflict: Literal["error", "swap"] | Omit = omit,
|
|
247
247
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
248
248
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
249
249
|
extra_headers: Headers | None = None,
|
|
250
250
|
extra_query: Query | None = None,
|
|
251
251
|
extra_body: Body | None = None,
|
|
252
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
252
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
253
253
|
) -> InferenceModel:
|
|
254
254
|
"""
|
|
255
255
|
Update Model
|
|
@@ -269,17 +269,16 @@ class ModelsResource(SyncAPIResource):
|
|
|
269
269
|
self,
|
|
270
270
|
model_id: str,
|
|
271
271
|
*,
|
|
272
|
-
model_metadata: Dict[str, object] |
|
|
273
|
-
vendor_configuration: model_update_params.ModelConfigurationPatchRequestVendorConfiguration
|
|
274
|
-
|
|
|
275
|
-
|
|
276
|
-
on_conflict: Literal["error", "swap"] | NotGiven = NOT_GIVEN,
|
|
272
|
+
model_metadata: Dict[str, object] | Omit = omit,
|
|
273
|
+
vendor_configuration: model_update_params.ModelConfigurationPatchRequestVendorConfiguration | Omit = omit,
|
|
274
|
+
name: str | Omit = omit,
|
|
275
|
+
on_conflict: Literal["error", "swap"] | Omit = omit,
|
|
277
276
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
278
277
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
279
278
|
extra_headers: Headers | None = None,
|
|
280
279
|
extra_query: Query | None = None,
|
|
281
280
|
extra_body: Body | None = None,
|
|
282
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
281
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
283
282
|
) -> InferenceModel:
|
|
284
283
|
if not model_id:
|
|
285
284
|
raise ValueError(f"Expected a non-empty value for `model_id` but received {model_id!r}")
|
|
@@ -303,8 +302,8 @@ class ModelsResource(SyncAPIResource):
|
|
|
303
302
|
def list(
|
|
304
303
|
self,
|
|
305
304
|
*,
|
|
306
|
-
ending_before: str |
|
|
307
|
-
limit: int |
|
|
305
|
+
ending_before: str | Omit = omit,
|
|
306
|
+
limit: int | Omit = omit,
|
|
308
307
|
model_vendor: Literal[
|
|
309
308
|
"openai",
|
|
310
309
|
"cohere",
|
|
@@ -319,16 +318,16 @@ class ModelsResource(SyncAPIResource):
|
|
|
319
318
|
"xai",
|
|
320
319
|
"fireworks_ai",
|
|
321
320
|
]
|
|
322
|
-
|
|
|
323
|
-
name: str |
|
|
324
|
-
sort_order: Literal["asc", "desc"] |
|
|
325
|
-
starting_after: str |
|
|
321
|
+
| Omit = omit,
|
|
322
|
+
name: str | Omit = omit,
|
|
323
|
+
sort_order: Literal["asc", "desc"] | Omit = omit,
|
|
324
|
+
starting_after: str | Omit = omit,
|
|
326
325
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
327
326
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
328
327
|
extra_headers: Headers | None = None,
|
|
329
328
|
extra_query: Query | None = None,
|
|
330
329
|
extra_body: Body | None = None,
|
|
331
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
330
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
332
331
|
) -> SyncCursorPage[InferenceModel]:
|
|
333
332
|
"""
|
|
334
333
|
List Models
|
|
@@ -374,7 +373,7 @@ class ModelsResource(SyncAPIResource):
|
|
|
374
373
|
extra_headers: Headers | None = None,
|
|
375
374
|
extra_query: Query | None = None,
|
|
376
375
|
extra_body: Body | None = None,
|
|
377
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
376
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
378
377
|
) -> ModelDeleteResponse:
|
|
379
378
|
"""
|
|
380
379
|
Delete Model
|
|
@@ -425,16 +424,16 @@ class AsyncModelsResource(AsyncAPIResource):
|
|
|
425
424
|
*,
|
|
426
425
|
name: str,
|
|
427
426
|
vendor_configuration: model_create_params.LaunchModelCreateRequestVendorConfiguration,
|
|
428
|
-
model_metadata: Dict[str, object] |
|
|
429
|
-
model_type: Literal["generic"] |
|
|
430
|
-
model_vendor: Literal["launch"] |
|
|
431
|
-
on_conflict: Literal["error", "update"] |
|
|
427
|
+
model_metadata: Dict[str, object] | Omit = omit,
|
|
428
|
+
model_type: Literal["generic"] | Omit = omit,
|
|
429
|
+
model_vendor: Literal["launch"] | Omit = omit,
|
|
430
|
+
on_conflict: Literal["error", "update"] | Omit = omit,
|
|
432
431
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
433
432
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
434
433
|
extra_headers: Headers | None = None,
|
|
435
434
|
extra_query: Query | None = None,
|
|
436
435
|
extra_body: Body | None = None,
|
|
437
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
436
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
438
437
|
) -> InferenceModel:
|
|
439
438
|
"""
|
|
440
439
|
Create Model
|
|
@@ -458,16 +457,16 @@ class AsyncModelsResource(AsyncAPIResource):
|
|
|
458
457
|
*,
|
|
459
458
|
name: str,
|
|
460
459
|
vendor_configuration: model_create_params.LlmEngineModelCreateRequestVendorConfiguration,
|
|
461
|
-
model_metadata: Dict[str, object] |
|
|
462
|
-
model_type: Literal["chat_completion"] |
|
|
463
|
-
model_vendor: Literal["llmengine"] |
|
|
464
|
-
on_conflict: Literal["error", "update"] |
|
|
460
|
+
model_metadata: Dict[str, object] | Omit = omit,
|
|
461
|
+
model_type: Literal["chat_completion"] | Omit = omit,
|
|
462
|
+
model_vendor: Literal["llmengine"] | Omit = omit,
|
|
463
|
+
on_conflict: Literal["error", "update"] | Omit = omit,
|
|
465
464
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
466
465
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
467
466
|
extra_headers: Headers | None = None,
|
|
468
467
|
extra_query: Query | None = None,
|
|
469
468
|
extra_body: Body | None = None,
|
|
470
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
469
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
471
470
|
) -> InferenceModel:
|
|
472
471
|
"""
|
|
473
472
|
Create Model
|
|
@@ -492,16 +491,16 @@ class AsyncModelsResource(AsyncAPIResource):
|
|
|
492
491
|
name: str,
|
|
493
492
|
vendor_configuration: model_create_params.LaunchModelCreateRequestVendorConfiguration
|
|
494
493
|
| model_create_params.LlmEngineModelCreateRequestVendorConfiguration,
|
|
495
|
-
model_metadata: Dict[str, object] |
|
|
496
|
-
model_type: Literal["generic"] | Literal["chat_completion"] |
|
|
497
|
-
model_vendor: Literal["launch"] | Literal["llmengine"] |
|
|
498
|
-
on_conflict: Literal["error", "update"] |
|
|
494
|
+
model_metadata: Dict[str, object] | Omit = omit,
|
|
495
|
+
model_type: Literal["generic"] | Literal["chat_completion"] | Omit = omit,
|
|
496
|
+
model_vendor: Literal["launch"] | Literal["llmengine"] | Omit = omit,
|
|
497
|
+
on_conflict: Literal["error", "update"] | Omit = omit,
|
|
499
498
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
500
499
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
501
500
|
extra_headers: Headers | None = None,
|
|
502
501
|
extra_query: Query | None = None,
|
|
503
502
|
extra_body: Body | None = None,
|
|
504
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
503
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
505
504
|
) -> InferenceModel:
|
|
506
505
|
return await self._post(
|
|
507
506
|
"/v5/models",
|
|
@@ -531,7 +530,7 @@ class AsyncModelsResource(AsyncAPIResource):
|
|
|
531
530
|
extra_headers: Headers | None = None,
|
|
532
531
|
extra_query: Query | None = None,
|
|
533
532
|
extra_body: Body | None = None,
|
|
534
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
533
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
535
534
|
) -> InferenceModel:
|
|
536
535
|
"""
|
|
537
536
|
Get Model
|
|
@@ -560,13 +559,13 @@ class AsyncModelsResource(AsyncAPIResource):
|
|
|
560
559
|
self,
|
|
561
560
|
model_id: str,
|
|
562
561
|
*,
|
|
563
|
-
model_metadata: Dict[str, object] |
|
|
562
|
+
model_metadata: Dict[str, object] | Omit = omit,
|
|
564
563
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
565
564
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
566
565
|
extra_headers: Headers | None = None,
|
|
567
566
|
extra_query: Query | None = None,
|
|
568
567
|
extra_body: Body | None = None,
|
|
569
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
568
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
570
569
|
) -> InferenceModel:
|
|
571
570
|
"""
|
|
572
571
|
Update Model
|
|
@@ -588,13 +587,13 @@ class AsyncModelsResource(AsyncAPIResource):
|
|
|
588
587
|
model_id: str,
|
|
589
588
|
*,
|
|
590
589
|
vendor_configuration: model_update_params.ModelConfigurationPatchRequestVendorConfiguration,
|
|
591
|
-
model_metadata: Dict[str, object] |
|
|
590
|
+
model_metadata: Dict[str, object] | Omit = omit,
|
|
592
591
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
593
592
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
594
593
|
extra_headers: Headers | None = None,
|
|
595
594
|
extra_query: Query | None = None,
|
|
596
595
|
extra_body: Body | None = None,
|
|
597
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
596
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
598
597
|
) -> InferenceModel:
|
|
599
598
|
"""
|
|
600
599
|
Update Model
|
|
@@ -616,13 +615,13 @@ class AsyncModelsResource(AsyncAPIResource):
|
|
|
616
615
|
model_id: str,
|
|
617
616
|
*,
|
|
618
617
|
name: str,
|
|
619
|
-
on_conflict: Literal["error", "swap"] |
|
|
618
|
+
on_conflict: Literal["error", "swap"] | Omit = omit,
|
|
620
619
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
621
620
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
622
621
|
extra_headers: Headers | None = None,
|
|
623
622
|
extra_query: Query | None = None,
|
|
624
623
|
extra_body: Body | None = None,
|
|
625
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
624
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
626
625
|
) -> InferenceModel:
|
|
627
626
|
"""
|
|
628
627
|
Update Model
|
|
@@ -642,17 +641,16 @@ class AsyncModelsResource(AsyncAPIResource):
|
|
|
642
641
|
self,
|
|
643
642
|
model_id: str,
|
|
644
643
|
*,
|
|
645
|
-
model_metadata: Dict[str, object] |
|
|
646
|
-
vendor_configuration: model_update_params.ModelConfigurationPatchRequestVendorConfiguration
|
|
647
|
-
|
|
|
648
|
-
|
|
649
|
-
on_conflict: Literal["error", "swap"] | NotGiven = NOT_GIVEN,
|
|
644
|
+
model_metadata: Dict[str, object] | Omit = omit,
|
|
645
|
+
vendor_configuration: model_update_params.ModelConfigurationPatchRequestVendorConfiguration | Omit = omit,
|
|
646
|
+
name: str | Omit = omit,
|
|
647
|
+
on_conflict: Literal["error", "swap"] | Omit = omit,
|
|
650
648
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
651
649
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
652
650
|
extra_headers: Headers | None = None,
|
|
653
651
|
extra_query: Query | None = None,
|
|
654
652
|
extra_body: Body | None = None,
|
|
655
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
653
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
656
654
|
) -> InferenceModel:
|
|
657
655
|
if not model_id:
|
|
658
656
|
raise ValueError(f"Expected a non-empty value for `model_id` but received {model_id!r}")
|
|
@@ -676,8 +674,8 @@ class AsyncModelsResource(AsyncAPIResource):
|
|
|
676
674
|
def list(
|
|
677
675
|
self,
|
|
678
676
|
*,
|
|
679
|
-
ending_before: str |
|
|
680
|
-
limit: int |
|
|
677
|
+
ending_before: str | Omit = omit,
|
|
678
|
+
limit: int | Omit = omit,
|
|
681
679
|
model_vendor: Literal[
|
|
682
680
|
"openai",
|
|
683
681
|
"cohere",
|
|
@@ -692,16 +690,16 @@ class AsyncModelsResource(AsyncAPIResource):
|
|
|
692
690
|
"xai",
|
|
693
691
|
"fireworks_ai",
|
|
694
692
|
]
|
|
695
|
-
|
|
|
696
|
-
name: str |
|
|
697
|
-
sort_order: Literal["asc", "desc"] |
|
|
698
|
-
starting_after: str |
|
|
693
|
+
| Omit = omit,
|
|
694
|
+
name: str | Omit = omit,
|
|
695
|
+
sort_order: Literal["asc", "desc"] | Omit = omit,
|
|
696
|
+
starting_after: str | Omit = omit,
|
|
699
697
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
700
698
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
701
699
|
extra_headers: Headers | None = None,
|
|
702
700
|
extra_query: Query | None = None,
|
|
703
701
|
extra_body: Body | None = None,
|
|
704
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
702
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
705
703
|
) -> AsyncPaginator[InferenceModel, AsyncCursorPage[InferenceModel]]:
|
|
706
704
|
"""
|
|
707
705
|
List Models
|
|
@@ -747,7 +745,7 @@ class AsyncModelsResource(AsyncAPIResource):
|
|
|
747
745
|
extra_headers: Headers | None = None,
|
|
748
746
|
extra_query: Query | None = None,
|
|
749
747
|
extra_body: Body | None = None,
|
|
750
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
748
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
751
749
|
) -> ModelDeleteResponse:
|
|
752
750
|
"""
|
|
753
751
|
Delete Model
|