crypticorn 2.15.0__py3-none-any.whl → 2.17.0__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.
- crypticorn/__init__.py +2 -2
- crypticorn/auth/client/api/admin_api.py +397 -13
- crypticorn/auth/client/api/auth_api.py +3610 -341
- crypticorn/auth/client/api/service_api.py +249 -7
- crypticorn/auth/client/api/user_api.py +2295 -179
- crypticorn/auth/client/api/wallet_api.py +1468 -81
- crypticorn/auth/client/configuration.py +2 -2
- crypticorn/auth/client/models/create_api_key_request.py +2 -1
- crypticorn/auth/client/models/get_api_keys200_response_inner.py +2 -1
- crypticorn/auth/client/rest.py +23 -4
- crypticorn/auth/main.py +8 -5
- crypticorn/cli/init.py +1 -1
- crypticorn/cli/templates/.env.docker.temp +3 -0
- crypticorn/cli/templates/.env.example.temp +4 -0
- crypticorn/cli/templates/Dockerfile +5 -2
- crypticorn/client.py +226 -59
- crypticorn/common/__init__.py +1 -0
- crypticorn/common/auth.py +45 -14
- crypticorn/common/decorators.py +1 -2
- crypticorn/common/enums.py +0 -2
- crypticorn/common/errors.py +10 -0
- crypticorn/common/metrics.py +30 -0
- crypticorn/common/middleware.py +94 -1
- crypticorn/common/pagination.py +252 -18
- crypticorn/common/router/admin_router.py +2 -2
- crypticorn/common/router/status_router.py +40 -2
- crypticorn/common/scopes.py +2 -0
- crypticorn/common/warnings.py +8 -0
- crypticorn/dex/__init__.py +6 -0
- crypticorn/dex/client/__init__.py +49 -0
- crypticorn/dex/client/api/__init__.py +6 -0
- crypticorn/dex/client/api/admin_api.py +2986 -0
- crypticorn/dex/client/api/signals_api.py +1798 -0
- crypticorn/dex/client/api/status_api.py +892 -0
- crypticorn/dex/client/api_client.py +758 -0
- crypticorn/dex/client/api_response.py +20 -0
- crypticorn/dex/client/configuration.py +620 -0
- crypticorn/dex/client/exceptions.py +220 -0
- crypticorn/dex/client/models/__init__.py +30 -0
- crypticorn/dex/client/models/api_error_identifier.py +121 -0
- crypticorn/dex/client/models/api_error_level.py +37 -0
- crypticorn/dex/client/models/api_error_type.py +37 -0
- crypticorn/dex/client/models/exception_detail.py +117 -0
- crypticorn/dex/client/models/log_level.py +38 -0
- crypticorn/dex/client/models/paginated_response_signal_with_token.py +134 -0
- crypticorn/dex/client/models/risk.py +86 -0
- crypticorn/dex/client/models/signal_overview_stats.py +158 -0
- crypticorn/dex/client/models/signal_volume.py +84 -0
- crypticorn/dex/client/models/signal_with_token.py +163 -0
- crypticorn/dex/client/models/token_data.py +127 -0
- crypticorn/dex/client/models/token_detail.py +116 -0
- crypticorn/dex/client/py.typed +0 -0
- crypticorn/dex/client/rest.py +217 -0
- crypticorn/dex/main.py +1 -0
- crypticorn/hive/client/api/admin_api.py +1173 -47
- crypticorn/hive/client/api/data_api.py +499 -17
- crypticorn/hive/client/api/models_api.py +1595 -87
- crypticorn/hive/client/api/status_api.py +397 -16
- crypticorn/hive/client/api_client.py +0 -5
- crypticorn/hive/client/models/api_error_identifier.py +1 -1
- crypticorn/hive/client/models/coin_info.py +1 -1
- crypticorn/hive/client/models/exception_detail.py +1 -1
- crypticorn/hive/client/models/target_info.py +1 -1
- crypticorn/hive/client/rest.py +23 -4
- crypticorn/hive/main.py +99 -25
- crypticorn/hive/utils.py +2 -2
- crypticorn/klines/client/api/admin_api.py +1173 -47
- crypticorn/klines/client/api/change_in_timeframe_api.py +269 -11
- crypticorn/klines/client/api/funding_rates_api.py +315 -11
- crypticorn/klines/client/api/ohlcv_data_api.py +390 -11
- crypticorn/klines/client/api/status_api.py +397 -16
- crypticorn/klines/client/api/symbols_api.py +216 -11
- crypticorn/klines/client/api/udf_api.py +1268 -51
- crypticorn/klines/client/api_client.py +0 -5
- crypticorn/klines/client/models/api_error_identifier.py +3 -1
- crypticorn/klines/client/models/exception_detail.py +1 -1
- crypticorn/klines/client/models/ohlcv.py +1 -1
- crypticorn/klines/client/models/symbol_group.py +1 -1
- crypticorn/klines/client/models/udf_config.py +1 -1
- crypticorn/klines/client/rest.py +23 -4
- crypticorn/klines/main.py +89 -12
- crypticorn/metrics/client/api/admin_api.py +1173 -47
- crypticorn/metrics/client/api/exchanges_api.py +1370 -145
- crypticorn/metrics/client/api/indicators_api.py +622 -17
- crypticorn/metrics/client/api/logs_api.py +296 -11
- crypticorn/metrics/client/api/marketcap_api.py +1207 -67
- crypticorn/metrics/client/api/markets_api.py +343 -11
- crypticorn/metrics/client/api/quote_currencies_api.py +228 -11
- crypticorn/metrics/client/api/status_api.py +397 -16
- crypticorn/metrics/client/api/tokens_api.py +382 -15
- crypticorn/metrics/client/api_client.py +0 -5
- crypticorn/metrics/client/configuration.py +4 -2
- crypticorn/metrics/client/models/exception_detail.py +1 -1
- crypticorn/metrics/client/models/exchange_mapping.py +1 -1
- crypticorn/metrics/client/models/marketcap_ranking.py +1 -1
- crypticorn/metrics/client/models/marketcap_symbol_ranking.py +1 -1
- crypticorn/metrics/client/models/ohlcv.py +1 -1
- crypticorn/metrics/client/rest.py +23 -4
- crypticorn/metrics/main.py +113 -19
- crypticorn/pay/client/api/admin_api.py +1585 -57
- crypticorn/pay/client/api/now_payments_api.py +961 -39
- crypticorn/pay/client/api/payments_api.py +562 -17
- crypticorn/pay/client/api/products_api.py +880 -30
- crypticorn/pay/client/api/status_api.py +397 -16
- crypticorn/pay/client/api_client.py +0 -5
- crypticorn/pay/client/configuration.py +2 -2
- crypticorn/pay/client/models/api_error_identifier.py +7 -7
- crypticorn/pay/client/models/exception_detail.py +1 -1
- crypticorn/pay/client/models/now_create_invoice_req.py +1 -1
- crypticorn/pay/client/models/now_create_invoice_res.py +1 -1
- crypticorn/pay/client/models/product.py +1 -1
- crypticorn/pay/client/models/product_create.py +1 -1
- crypticorn/pay/client/models/product_update.py +1 -1
- crypticorn/pay/client/models/scope.py +1 -0
- crypticorn/pay/client/rest.py +23 -4
- crypticorn/pay/main.py +10 -6
- crypticorn/trade/client/__init__.py +11 -1
- crypticorn/trade/client/api/__init__.py +0 -1
- crypticorn/trade/client/api/admin_api.py +1184 -55
- crypticorn/trade/client/api/api_keys_api.py +1678 -162
- crypticorn/trade/client/api/bots_api.py +7563 -187
- crypticorn/trade/client/api/exchanges_api.py +565 -19
- crypticorn/trade/client/api/notifications_api.py +1290 -116
- crypticorn/trade/client/api/orders_api.py +393 -55
- crypticorn/trade/client/api/status_api.py +397 -13
- crypticorn/trade/client/api/strategies_api.py +1133 -77
- crypticorn/trade/client/api/trading_actions_api.py +786 -65
- crypticorn/trade/client/models/__init__.py +11 -0
- crypticorn/trade/client/models/actions_count.py +88 -0
- crypticorn/trade/client/models/api_error_identifier.py +8 -7
- crypticorn/trade/client/models/bot.py +7 -18
- crypticorn/trade/client/models/bot_create.py +17 -1
- crypticorn/trade/client/models/bot_update.py +17 -1
- crypticorn/trade/client/models/exchange.py +6 -1
- crypticorn/trade/client/models/exchange_key.py +1 -1
- crypticorn/trade/client/models/exchange_key_balance.py +111 -0
- crypticorn/trade/client/models/exchange_key_create.py +17 -1
- crypticorn/trade/client/models/exchange_key_update.py +17 -1
- crypticorn/trade/client/models/execution_ids.py +1 -1
- crypticorn/trade/client/models/futures_balance.py +27 -25
- crypticorn/trade/client/models/futures_trading_action.py +6 -28
- crypticorn/trade/client/models/futures_trading_action_create.py +10 -13
- crypticorn/trade/client/models/notification.py +17 -1
- crypticorn/trade/client/models/notification_create.py +18 -2
- crypticorn/trade/client/models/notification_update.py +17 -1
- crypticorn/trade/client/models/order.py +2 -14
- crypticorn/trade/client/models/orders_count.py +88 -0
- crypticorn/trade/client/models/paginated_response_futures_trading_action.py +134 -0
- crypticorn/trade/client/models/paginated_response_order.py +134 -0
- crypticorn/trade/client/models/pn_l.py +95 -0
- crypticorn/trade/client/models/post_futures_action.py +1 -1
- crypticorn/trade/client/models/spot_balance.py +109 -0
- crypticorn/trade/client/models/spot_trading_action_create.py +4 -1
- crypticorn/trade/client/models/strategy.py +22 -4
- crypticorn/trade/client/models/strategy_create.py +23 -5
- crypticorn/trade/client/models/strategy_exchange_info.py +16 -4
- crypticorn/trade/client/models/strategy_update.py +19 -3
- crypticorn/trade/client/models/tpsl.py +4 -27
- crypticorn/trade/client/models/tpsl_create.py +6 -19
- crypticorn/trade/client/rest.py +23 -4
- crypticorn/trade/main.py +15 -12
- {crypticorn-2.15.0.dist-info → crypticorn-2.17.0.dist-info}/METADATA +65 -20
- {crypticorn-2.15.0.dist-info → crypticorn-2.17.0.dist-info}/RECORD +167 -132
- crypticorn/trade/client/api/futures_trading_panel_api.py +0 -1285
- {crypticorn-2.15.0.dist-info → crypticorn-2.17.0.dist-info}/WHEEL +0 -0
- {crypticorn-2.15.0.dist-info → crypticorn-2.17.0.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.15.0.dist-info → crypticorn-2.17.0.dist-info}/licenses/LICENSE +0 -0
- {crypticorn-2.15.0.dist-info → crypticorn-2.17.0.dist-info}/top_level.txt +0 -0
@@ -11,14 +11,11 @@ Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
Do not edit the class manually.
|
12
12
|
""" # noqa: E501
|
13
13
|
|
14
|
-
import warnings
|
15
14
|
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
16
15
|
from typing import Any, Dict, List, Optional, Tuple, Union
|
17
16
|
from typing_extensions import Annotated
|
18
17
|
|
19
|
-
from pydantic import
|
20
|
-
from typing import Any, List, Optional
|
21
|
-
from typing_extensions import Annotated
|
18
|
+
from pydantic import StrictBool
|
22
19
|
from crypticorn.hive.client.models.data_version import DataVersion
|
23
20
|
from crypticorn.hive.client.models.evaluation_response import EvaluationResponse
|
24
21
|
from crypticorn.hive.client.models.model_create import ModelCreate
|
@@ -29,6 +26,24 @@ from crypticorn.hive.client.api_client import ApiClient, RequestSerialized
|
|
29
26
|
from crypticorn.hive.client.api_response import ApiResponse
|
30
27
|
from crypticorn.hive.client.rest import RESTResponseType
|
31
28
|
|
29
|
+
# Import async_to_sync for sync methods
|
30
|
+
try:
|
31
|
+
from asgiref.sync import async_to_sync
|
32
|
+
|
33
|
+
_HAS_ASGIREF = True
|
34
|
+
except ImportError:
|
35
|
+
_HAS_ASGIREF = False
|
36
|
+
|
37
|
+
def async_to_sync(async_func):
|
38
|
+
"""Fallback decorator that raises an error if asgiref is not available."""
|
39
|
+
|
40
|
+
def wrapper(*args, **kwargs):
|
41
|
+
raise ImportError(
|
42
|
+
"asgiref is required for sync methods. Install with: pip install asgiref"
|
43
|
+
)
|
44
|
+
|
45
|
+
return wrapper
|
46
|
+
|
32
47
|
|
33
48
|
class ModelsApi:
|
34
49
|
"""NOTE: This class is auto generated by OpenAPI Generator
|
@@ -37,13 +52,126 @@ class ModelsApi:
|
|
37
52
|
Do not edit the class manually.
|
38
53
|
"""
|
39
54
|
|
40
|
-
def __init__(self, api_client=None) -> None:
|
55
|
+
def __init__(self, api_client=None, is_sync: bool = False) -> None:
|
41
56
|
if api_client is None:
|
42
57
|
api_client = ApiClient.get_default()
|
43
58
|
self.api_client = api_client
|
59
|
+
self.is_sync = is_sync
|
60
|
+
|
61
|
+
@validate_call
|
62
|
+
def create_model(
|
63
|
+
self,
|
64
|
+
model_create: ModelCreate,
|
65
|
+
_request_timeout: Union[
|
66
|
+
None,
|
67
|
+
Annotated[StrictFloat, Field(gt=0)],
|
68
|
+
Tuple[
|
69
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
70
|
+
],
|
71
|
+
] = None,
|
72
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
73
|
+
_content_type: Optional[StrictStr] = None,
|
74
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
75
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
76
|
+
) -> ModelRead:
|
77
|
+
"""Create Model"""
|
78
|
+
if self.is_sync:
|
79
|
+
return self._create_model_sync(
|
80
|
+
model_create=model_create,
|
81
|
+
_request_timeout=_request_timeout,
|
82
|
+
_request_auth=_request_auth,
|
83
|
+
_content_type=_content_type,
|
84
|
+
_headers=_headers,
|
85
|
+
_host_index=_host_index,
|
86
|
+
)
|
87
|
+
|
88
|
+
else:
|
89
|
+
return self._create_model_async(
|
90
|
+
model_create=model_create,
|
91
|
+
_request_timeout=_request_timeout,
|
92
|
+
_request_auth=_request_auth,
|
93
|
+
_content_type=_content_type,
|
94
|
+
_headers=_headers,
|
95
|
+
_host_index=_host_index,
|
96
|
+
)
|
97
|
+
|
98
|
+
@validate_call
|
99
|
+
def create_model_with_http_info(
|
100
|
+
self,
|
101
|
+
model_create: ModelCreate,
|
102
|
+
_request_timeout: Union[
|
103
|
+
None,
|
104
|
+
Annotated[StrictFloat, Field(gt=0)],
|
105
|
+
Tuple[
|
106
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
107
|
+
],
|
108
|
+
] = None,
|
109
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
110
|
+
_content_type: Optional[StrictStr] = None,
|
111
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
112
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
113
|
+
) -> ApiResponse[ModelRead]:
|
114
|
+
"""Create Model with HTTP info"""
|
115
|
+
if self.is_sync:
|
116
|
+
return self._create_model_sync_with_http_info(
|
117
|
+
model_create=model_create,
|
118
|
+
_request_timeout=_request_timeout,
|
119
|
+
_request_auth=_request_auth,
|
120
|
+
_content_type=_content_type,
|
121
|
+
_headers=_headers,
|
122
|
+
_host_index=_host_index,
|
123
|
+
)
|
124
|
+
|
125
|
+
else:
|
126
|
+
return self._create_model_async_with_http_info(
|
127
|
+
model_create=model_create,
|
128
|
+
_request_timeout=_request_timeout,
|
129
|
+
_request_auth=_request_auth,
|
130
|
+
_content_type=_content_type,
|
131
|
+
_headers=_headers,
|
132
|
+
_host_index=_host_index,
|
133
|
+
)
|
134
|
+
|
135
|
+
@validate_call
|
136
|
+
def create_model_without_preload_content(
|
137
|
+
self,
|
138
|
+
model_create: ModelCreate,
|
139
|
+
_request_timeout: Union[
|
140
|
+
None,
|
141
|
+
Annotated[StrictFloat, Field(gt=0)],
|
142
|
+
Tuple[
|
143
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
144
|
+
],
|
145
|
+
] = None,
|
146
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
147
|
+
_content_type: Optional[StrictStr] = None,
|
148
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
149
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
150
|
+
) -> RESTResponseType:
|
151
|
+
"""Create Model without preloading content"""
|
152
|
+
if self.is_sync:
|
153
|
+
return self._create_model_sync_without_preload_content(
|
154
|
+
model_create=model_create,
|
155
|
+
_request_timeout=_request_timeout,
|
156
|
+
_request_auth=_request_auth,
|
157
|
+
_content_type=_content_type,
|
158
|
+
_headers=_headers,
|
159
|
+
_host_index=_host_index,
|
160
|
+
)
|
44
161
|
|
162
|
+
else:
|
163
|
+
return self._create_model_async_without_preload_content(
|
164
|
+
model_create=model_create,
|
165
|
+
_request_timeout=_request_timeout,
|
166
|
+
_request_auth=_request_auth,
|
167
|
+
_content_type=_content_type,
|
168
|
+
_headers=_headers,
|
169
|
+
_host_index=_host_index,
|
170
|
+
)
|
171
|
+
|
172
|
+
# Private async implementation methods
|
45
173
|
@validate_call
|
46
|
-
async def
|
174
|
+
async def _create_model_async(
|
47
175
|
self,
|
48
176
|
model_create: ModelCreate,
|
49
177
|
_request_timeout: Union[
|
@@ -107,7 +235,7 @@ class ModelsApi:
|
|
107
235
|
).data
|
108
236
|
|
109
237
|
@validate_call
|
110
|
-
async def
|
238
|
+
async def _create_model_async_with_http_info(
|
111
239
|
self,
|
112
240
|
model_create: ModelCreate,
|
113
241
|
_request_timeout: Union[
|
@@ -166,12 +294,11 @@ class ModelsApi:
|
|
166
294
|
)
|
167
295
|
await response_data.read()
|
168
296
|
return self.api_client.response_deserialize(
|
169
|
-
response_data=response_data,
|
170
|
-
response_types_map=_response_types_map,
|
297
|
+
response_data=response_data, response_types_map=_response_types_map
|
171
298
|
)
|
172
299
|
|
173
300
|
@validate_call
|
174
|
-
async def
|
301
|
+
async def _create_model_async_without_preload_content(
|
175
302
|
self,
|
176
303
|
model_create: ModelCreate,
|
177
304
|
_request_timeout: Union[
|
@@ -228,7 +355,86 @@ class ModelsApi:
|
|
228
355
|
response_data = await self.api_client.call_api(
|
229
356
|
*_param, _request_timeout=_request_timeout
|
230
357
|
)
|
231
|
-
return response_data
|
358
|
+
return response_data
|
359
|
+
|
360
|
+
# Private sync implementation methods
|
361
|
+
@validate_call
|
362
|
+
def _create_model_sync(
|
363
|
+
self,
|
364
|
+
model_create: ModelCreate,
|
365
|
+
_request_timeout: Union[
|
366
|
+
None,
|
367
|
+
Annotated[StrictFloat, Field(gt=0)],
|
368
|
+
Tuple[
|
369
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
370
|
+
],
|
371
|
+
] = None,
|
372
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
373
|
+
_content_type: Optional[StrictStr] = None,
|
374
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
375
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
376
|
+
) -> ModelRead:
|
377
|
+
"""Synchronous version of create_model"""
|
378
|
+
return async_to_sync(self._create_model_async)(
|
379
|
+
model_create=model_create,
|
380
|
+
_request_timeout=_request_timeout,
|
381
|
+
_request_auth=_request_auth,
|
382
|
+
_content_type=_content_type,
|
383
|
+
_headers=_headers,
|
384
|
+
_host_index=_host_index,
|
385
|
+
)
|
386
|
+
|
387
|
+
@validate_call
|
388
|
+
def _create_model_sync_with_http_info(
|
389
|
+
self,
|
390
|
+
model_create: ModelCreate,
|
391
|
+
_request_timeout: Union[
|
392
|
+
None,
|
393
|
+
Annotated[StrictFloat, Field(gt=0)],
|
394
|
+
Tuple[
|
395
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
396
|
+
],
|
397
|
+
] = None,
|
398
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
399
|
+
_content_type: Optional[StrictStr] = None,
|
400
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
401
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
402
|
+
) -> ApiResponse[ModelRead]:
|
403
|
+
"""Synchronous version of create_model_with_http_info"""
|
404
|
+
return async_to_sync(self._create_model_async_with_http_info)(
|
405
|
+
model_create=model_create,
|
406
|
+
_request_timeout=_request_timeout,
|
407
|
+
_request_auth=_request_auth,
|
408
|
+
_content_type=_content_type,
|
409
|
+
_headers=_headers,
|
410
|
+
_host_index=_host_index,
|
411
|
+
)
|
412
|
+
|
413
|
+
@validate_call
|
414
|
+
def _create_model_sync_without_preload_content(
|
415
|
+
self,
|
416
|
+
model_create: ModelCreate,
|
417
|
+
_request_timeout: Union[
|
418
|
+
None,
|
419
|
+
Annotated[StrictFloat, Field(gt=0)],
|
420
|
+
Tuple[
|
421
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
422
|
+
],
|
423
|
+
] = None,
|
424
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
425
|
+
_content_type: Optional[StrictStr] = None,
|
426
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
427
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
428
|
+
) -> RESTResponseType:
|
429
|
+
"""Synchronous version of create_model_without_preload_content"""
|
430
|
+
return async_to_sync(self._create_model_async_without_preload_content)(
|
431
|
+
model_create=model_create,
|
432
|
+
_request_timeout=_request_timeout,
|
433
|
+
_request_auth=_request_auth,
|
434
|
+
_content_type=_content_type,
|
435
|
+
_headers=_headers,
|
436
|
+
_host_index=_host_index,
|
437
|
+
)
|
232
438
|
|
233
439
|
def _create_model_serialize(
|
234
440
|
self,
|
@@ -295,7 +501,119 @@ class ModelsApi:
|
|
295
501
|
)
|
296
502
|
|
297
503
|
@validate_call
|
298
|
-
|
504
|
+
def delete_model(
|
505
|
+
self,
|
506
|
+
id: Annotated[StrictInt, Field(description="The ID of the model to delete.")],
|
507
|
+
_request_timeout: Union[
|
508
|
+
None,
|
509
|
+
Annotated[StrictFloat, Field(gt=0)],
|
510
|
+
Tuple[
|
511
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
512
|
+
],
|
513
|
+
] = None,
|
514
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
515
|
+
_content_type: Optional[StrictStr] = None,
|
516
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
517
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
518
|
+
) -> None:
|
519
|
+
"""Delete Model"""
|
520
|
+
if self.is_sync:
|
521
|
+
return self._delete_model_sync(
|
522
|
+
id=id,
|
523
|
+
_request_timeout=_request_timeout,
|
524
|
+
_request_auth=_request_auth,
|
525
|
+
_content_type=_content_type,
|
526
|
+
_headers=_headers,
|
527
|
+
_host_index=_host_index,
|
528
|
+
)
|
529
|
+
|
530
|
+
else:
|
531
|
+
return self._delete_model_async(
|
532
|
+
id=id,
|
533
|
+
_request_timeout=_request_timeout,
|
534
|
+
_request_auth=_request_auth,
|
535
|
+
_content_type=_content_type,
|
536
|
+
_headers=_headers,
|
537
|
+
_host_index=_host_index,
|
538
|
+
)
|
539
|
+
|
540
|
+
@validate_call
|
541
|
+
def delete_model_with_http_info(
|
542
|
+
self,
|
543
|
+
id: Annotated[StrictInt, Field(description="The ID of the model to delete.")],
|
544
|
+
_request_timeout: Union[
|
545
|
+
None,
|
546
|
+
Annotated[StrictFloat, Field(gt=0)],
|
547
|
+
Tuple[
|
548
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
549
|
+
],
|
550
|
+
] = None,
|
551
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
552
|
+
_content_type: Optional[StrictStr] = None,
|
553
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
554
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
555
|
+
) -> ApiResponse[None]:
|
556
|
+
"""Delete Model with HTTP info"""
|
557
|
+
if self.is_sync:
|
558
|
+
return self._delete_model_sync_with_http_info(
|
559
|
+
id=id,
|
560
|
+
_request_timeout=_request_timeout,
|
561
|
+
_request_auth=_request_auth,
|
562
|
+
_content_type=_content_type,
|
563
|
+
_headers=_headers,
|
564
|
+
_host_index=_host_index,
|
565
|
+
)
|
566
|
+
|
567
|
+
else:
|
568
|
+
return self._delete_model_async_with_http_info(
|
569
|
+
id=id,
|
570
|
+
_request_timeout=_request_timeout,
|
571
|
+
_request_auth=_request_auth,
|
572
|
+
_content_type=_content_type,
|
573
|
+
_headers=_headers,
|
574
|
+
_host_index=_host_index,
|
575
|
+
)
|
576
|
+
|
577
|
+
@validate_call
|
578
|
+
def delete_model_without_preload_content(
|
579
|
+
self,
|
580
|
+
id: Annotated[StrictInt, Field(description="The ID of the model to delete.")],
|
581
|
+
_request_timeout: Union[
|
582
|
+
None,
|
583
|
+
Annotated[StrictFloat, Field(gt=0)],
|
584
|
+
Tuple[
|
585
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
586
|
+
],
|
587
|
+
] = None,
|
588
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
589
|
+
_content_type: Optional[StrictStr] = None,
|
590
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
591
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
592
|
+
) -> RESTResponseType:
|
593
|
+
"""Delete Model without preloading content"""
|
594
|
+
if self.is_sync:
|
595
|
+
return self._delete_model_sync_without_preload_content(
|
596
|
+
id=id,
|
597
|
+
_request_timeout=_request_timeout,
|
598
|
+
_request_auth=_request_auth,
|
599
|
+
_content_type=_content_type,
|
600
|
+
_headers=_headers,
|
601
|
+
_host_index=_host_index,
|
602
|
+
)
|
603
|
+
|
604
|
+
else:
|
605
|
+
return self._delete_model_async_without_preload_content(
|
606
|
+
id=id,
|
607
|
+
_request_timeout=_request_timeout,
|
608
|
+
_request_auth=_request_auth,
|
609
|
+
_content_type=_content_type,
|
610
|
+
_headers=_headers,
|
611
|
+
_host_index=_host_index,
|
612
|
+
)
|
613
|
+
|
614
|
+
# Private async implementation methods
|
615
|
+
@validate_call
|
616
|
+
async def _delete_model_async(
|
299
617
|
self,
|
300
618
|
id: Annotated[StrictInt, Field(description="The ID of the model to delete.")],
|
301
619
|
_request_timeout: Union[
|
@@ -359,7 +677,7 @@ class ModelsApi:
|
|
359
677
|
).data
|
360
678
|
|
361
679
|
@validate_call
|
362
|
-
async def
|
680
|
+
async def _delete_model_async_with_http_info(
|
363
681
|
self,
|
364
682
|
id: Annotated[StrictInt, Field(description="The ID of the model to delete.")],
|
365
683
|
_request_timeout: Union[
|
@@ -418,12 +736,11 @@ class ModelsApi:
|
|
418
736
|
)
|
419
737
|
await response_data.read()
|
420
738
|
return self.api_client.response_deserialize(
|
421
|
-
response_data=response_data,
|
422
|
-
response_types_map=_response_types_map,
|
739
|
+
response_data=response_data, response_types_map=_response_types_map
|
423
740
|
)
|
424
741
|
|
425
742
|
@validate_call
|
426
|
-
async def
|
743
|
+
async def _delete_model_async_without_preload_content(
|
427
744
|
self,
|
428
745
|
id: Annotated[StrictInt, Field(description="The ID of the model to delete.")],
|
429
746
|
_request_timeout: Union[
|
@@ -480,29 +797,108 @@ class ModelsApi:
|
|
480
797
|
response_data = await self.api_client.call_api(
|
481
798
|
*_param, _request_timeout=_request_timeout
|
482
799
|
)
|
483
|
-
return response_data
|
800
|
+
return response_data
|
484
801
|
|
485
|
-
|
802
|
+
# Private sync implementation methods
|
803
|
+
@validate_call
|
804
|
+
def _delete_model_sync(
|
486
805
|
self,
|
487
|
-
id,
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
806
|
+
id: Annotated[StrictInt, Field(description="The ID of the model to delete.")],
|
807
|
+
_request_timeout: Union[
|
808
|
+
None,
|
809
|
+
Annotated[StrictFloat, Field(gt=0)],
|
810
|
+
Tuple[
|
811
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
812
|
+
],
|
813
|
+
] = None,
|
814
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
815
|
+
_content_type: Optional[StrictStr] = None,
|
816
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
817
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
818
|
+
) -> None:
|
819
|
+
"""Synchronous version of delete_model"""
|
820
|
+
return async_to_sync(self._delete_model_async)(
|
821
|
+
id=id,
|
822
|
+
_request_timeout=_request_timeout,
|
823
|
+
_request_auth=_request_auth,
|
824
|
+
_content_type=_content_type,
|
825
|
+
_headers=_headers,
|
826
|
+
_host_index=_host_index,
|
827
|
+
)
|
495
828
|
|
496
|
-
|
829
|
+
@validate_call
|
830
|
+
def _delete_model_sync_with_http_info(
|
831
|
+
self,
|
832
|
+
id: Annotated[StrictInt, Field(description="The ID of the model to delete.")],
|
833
|
+
_request_timeout: Union[
|
834
|
+
None,
|
835
|
+
Annotated[StrictFloat, Field(gt=0)],
|
836
|
+
Tuple[
|
837
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
838
|
+
],
|
839
|
+
] = None,
|
840
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
841
|
+
_content_type: Optional[StrictStr] = None,
|
842
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
843
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
844
|
+
) -> ApiResponse[None]:
|
845
|
+
"""Synchronous version of delete_model_with_http_info"""
|
846
|
+
return async_to_sync(self._delete_model_async_with_http_info)(
|
847
|
+
id=id,
|
848
|
+
_request_timeout=_request_timeout,
|
849
|
+
_request_auth=_request_auth,
|
850
|
+
_content_type=_content_type,
|
851
|
+
_headers=_headers,
|
852
|
+
_host_index=_host_index,
|
853
|
+
)
|
497
854
|
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
855
|
+
@validate_call
|
856
|
+
def _delete_model_sync_without_preload_content(
|
857
|
+
self,
|
858
|
+
id: Annotated[StrictInt, Field(description="The ID of the model to delete.")],
|
859
|
+
_request_timeout: Union[
|
860
|
+
None,
|
861
|
+
Annotated[StrictFloat, Field(gt=0)],
|
862
|
+
Tuple[
|
863
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
864
|
+
],
|
865
|
+
] = None,
|
866
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
867
|
+
_content_type: Optional[StrictStr] = None,
|
868
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
869
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
870
|
+
) -> RESTResponseType:
|
871
|
+
"""Synchronous version of delete_model_without_preload_content"""
|
872
|
+
return async_to_sync(self._delete_model_async_without_preload_content)(
|
873
|
+
id=id,
|
874
|
+
_request_timeout=_request_timeout,
|
875
|
+
_request_auth=_request_auth,
|
876
|
+
_content_type=_content_type,
|
877
|
+
_headers=_headers,
|
878
|
+
_host_index=_host_index,
|
879
|
+
)
|
880
|
+
|
881
|
+
def _delete_model_serialize(
|
882
|
+
self,
|
883
|
+
id,
|
884
|
+
_request_auth,
|
885
|
+
_content_type,
|
886
|
+
_headers,
|
887
|
+
_host_index,
|
888
|
+
) -> RequestSerialized:
|
889
|
+
|
890
|
+
_host = None
|
891
|
+
|
892
|
+
_collection_formats: Dict[str, str] = {}
|
893
|
+
|
894
|
+
_path_params: Dict[str, str] = {}
|
895
|
+
_query_params: List[Tuple[str, str]] = []
|
896
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
897
|
+
_form_params: List[Tuple[str, str]] = []
|
898
|
+
_files: Dict[
|
899
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
900
|
+
] = {}
|
901
|
+
_body_params: Optional[bytes] = None
|
506
902
|
|
507
903
|
# process the path parameters
|
508
904
|
if id is not None:
|
@@ -537,7 +933,158 @@ class ModelsApi:
|
|
537
933
|
)
|
538
934
|
|
539
935
|
@validate_call
|
540
|
-
|
936
|
+
def evaluate_model(
|
937
|
+
self,
|
938
|
+
id: Annotated[
|
939
|
+
StrictInt, Field(description="The ID of the model you want to evaluate.")
|
940
|
+
],
|
941
|
+
request_body: List[Any],
|
942
|
+
version: Annotated[
|
943
|
+
Optional[DataVersion],
|
944
|
+
Field(
|
945
|
+
description="Data version for evaluation. Defaults to latest public version. Using older versions won't affect leaderboard rankings but can be useful for additional model testing."
|
946
|
+
),
|
947
|
+
] = None,
|
948
|
+
_request_timeout: Union[
|
949
|
+
None,
|
950
|
+
Annotated[StrictFloat, Field(gt=0)],
|
951
|
+
Tuple[
|
952
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
953
|
+
],
|
954
|
+
] = None,
|
955
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
956
|
+
_content_type: Optional[StrictStr] = None,
|
957
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
958
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
959
|
+
) -> EvaluationResponse:
|
960
|
+
"""Evaluate Model"""
|
961
|
+
if self.is_sync:
|
962
|
+
return self._evaluate_model_sync(
|
963
|
+
id=id,
|
964
|
+
request_body=request_body,
|
965
|
+
version=version,
|
966
|
+
_request_timeout=_request_timeout,
|
967
|
+
_request_auth=_request_auth,
|
968
|
+
_content_type=_content_type,
|
969
|
+
_headers=_headers,
|
970
|
+
_host_index=_host_index,
|
971
|
+
)
|
972
|
+
|
973
|
+
else:
|
974
|
+
return self._evaluate_model_async(
|
975
|
+
id=id,
|
976
|
+
request_body=request_body,
|
977
|
+
version=version,
|
978
|
+
_request_timeout=_request_timeout,
|
979
|
+
_request_auth=_request_auth,
|
980
|
+
_content_type=_content_type,
|
981
|
+
_headers=_headers,
|
982
|
+
_host_index=_host_index,
|
983
|
+
)
|
984
|
+
|
985
|
+
@validate_call
|
986
|
+
def evaluate_model_with_http_info(
|
987
|
+
self,
|
988
|
+
id: Annotated[
|
989
|
+
StrictInt, Field(description="The ID of the model you want to evaluate.")
|
990
|
+
],
|
991
|
+
request_body: List[Any],
|
992
|
+
version: Annotated[
|
993
|
+
Optional[DataVersion],
|
994
|
+
Field(
|
995
|
+
description="Data version for evaluation. Defaults to latest public version. Using older versions won't affect leaderboard rankings but can be useful for additional model testing."
|
996
|
+
),
|
997
|
+
] = None,
|
998
|
+
_request_timeout: Union[
|
999
|
+
None,
|
1000
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1001
|
+
Tuple[
|
1002
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1003
|
+
],
|
1004
|
+
] = None,
|
1005
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1006
|
+
_content_type: Optional[StrictStr] = None,
|
1007
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1008
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1009
|
+
) -> ApiResponse[EvaluationResponse]:
|
1010
|
+
"""Evaluate Model with HTTP info"""
|
1011
|
+
if self.is_sync:
|
1012
|
+
return self._evaluate_model_sync_with_http_info(
|
1013
|
+
id=id,
|
1014
|
+
request_body=request_body,
|
1015
|
+
version=version,
|
1016
|
+
_request_timeout=_request_timeout,
|
1017
|
+
_request_auth=_request_auth,
|
1018
|
+
_content_type=_content_type,
|
1019
|
+
_headers=_headers,
|
1020
|
+
_host_index=_host_index,
|
1021
|
+
)
|
1022
|
+
|
1023
|
+
else:
|
1024
|
+
return self._evaluate_model_async_with_http_info(
|
1025
|
+
id=id,
|
1026
|
+
request_body=request_body,
|
1027
|
+
version=version,
|
1028
|
+
_request_timeout=_request_timeout,
|
1029
|
+
_request_auth=_request_auth,
|
1030
|
+
_content_type=_content_type,
|
1031
|
+
_headers=_headers,
|
1032
|
+
_host_index=_host_index,
|
1033
|
+
)
|
1034
|
+
|
1035
|
+
@validate_call
|
1036
|
+
def evaluate_model_without_preload_content(
|
1037
|
+
self,
|
1038
|
+
id: Annotated[
|
1039
|
+
StrictInt, Field(description="The ID of the model you want to evaluate.")
|
1040
|
+
],
|
1041
|
+
request_body: List[Any],
|
1042
|
+
version: Annotated[
|
1043
|
+
Optional[DataVersion],
|
1044
|
+
Field(
|
1045
|
+
description="Data version for evaluation. Defaults to latest public version. Using older versions won't affect leaderboard rankings but can be useful for additional model testing."
|
1046
|
+
),
|
1047
|
+
] = None,
|
1048
|
+
_request_timeout: Union[
|
1049
|
+
None,
|
1050
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1051
|
+
Tuple[
|
1052
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1053
|
+
],
|
1054
|
+
] = None,
|
1055
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1056
|
+
_content_type: Optional[StrictStr] = None,
|
1057
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1058
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1059
|
+
) -> RESTResponseType:
|
1060
|
+
"""Evaluate Model without preloading content"""
|
1061
|
+
if self.is_sync:
|
1062
|
+
return self._evaluate_model_sync_without_preload_content(
|
1063
|
+
id=id,
|
1064
|
+
request_body=request_body,
|
1065
|
+
version=version,
|
1066
|
+
_request_timeout=_request_timeout,
|
1067
|
+
_request_auth=_request_auth,
|
1068
|
+
_content_type=_content_type,
|
1069
|
+
_headers=_headers,
|
1070
|
+
_host_index=_host_index,
|
1071
|
+
)
|
1072
|
+
|
1073
|
+
else:
|
1074
|
+
return self._evaluate_model_async_without_preload_content(
|
1075
|
+
id=id,
|
1076
|
+
request_body=request_body,
|
1077
|
+
version=version,
|
1078
|
+
_request_timeout=_request_timeout,
|
1079
|
+
_request_auth=_request_auth,
|
1080
|
+
_content_type=_content_type,
|
1081
|
+
_headers=_headers,
|
1082
|
+
_host_index=_host_index,
|
1083
|
+
)
|
1084
|
+
|
1085
|
+
# Private async implementation methods
|
1086
|
+
@validate_call
|
1087
|
+
async def _evaluate_model_async(
|
541
1088
|
self,
|
542
1089
|
id: Annotated[
|
543
1090
|
StrictInt, Field(description="The ID of the model you want to evaluate.")
|
@@ -616,7 +1163,7 @@ class ModelsApi:
|
|
616
1163
|
).data
|
617
1164
|
|
618
1165
|
@validate_call
|
619
|
-
async def
|
1166
|
+
async def _evaluate_model_async_with_http_info(
|
620
1167
|
self,
|
621
1168
|
id: Annotated[
|
622
1169
|
StrictInt, Field(description="The ID of the model you want to evaluate.")
|
@@ -690,12 +1237,11 @@ class ModelsApi:
|
|
690
1237
|
)
|
691
1238
|
await response_data.read()
|
692
1239
|
return self.api_client.response_deserialize(
|
693
|
-
response_data=response_data,
|
694
|
-
response_types_map=_response_types_map,
|
1240
|
+
response_data=response_data, response_types_map=_response_types_map
|
695
1241
|
)
|
696
1242
|
|
697
1243
|
@validate_call
|
698
|
-
async def
|
1244
|
+
async def _evaluate_model_async_without_preload_content(
|
699
1245
|
self,
|
700
1246
|
id: Annotated[
|
701
1247
|
StrictInt, Field(description="The ID of the model you want to evaluate.")
|
@@ -767,7 +1313,119 @@ class ModelsApi:
|
|
767
1313
|
response_data = await self.api_client.call_api(
|
768
1314
|
*_param, _request_timeout=_request_timeout
|
769
1315
|
)
|
770
|
-
return response_data
|
1316
|
+
return response_data
|
1317
|
+
|
1318
|
+
# Private sync implementation methods
|
1319
|
+
@validate_call
|
1320
|
+
def _evaluate_model_sync(
|
1321
|
+
self,
|
1322
|
+
id: Annotated[
|
1323
|
+
StrictInt, Field(description="The ID of the model you want to evaluate.")
|
1324
|
+
],
|
1325
|
+
request_body: List[Any],
|
1326
|
+
version: Annotated[
|
1327
|
+
Optional[DataVersion],
|
1328
|
+
Field(
|
1329
|
+
description="Data version for evaluation. Defaults to latest public version. Using older versions won't affect leaderboard rankings but can be useful for additional model testing."
|
1330
|
+
),
|
1331
|
+
] = None,
|
1332
|
+
_request_timeout: Union[
|
1333
|
+
None,
|
1334
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1335
|
+
Tuple[
|
1336
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1337
|
+
],
|
1338
|
+
] = None,
|
1339
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1340
|
+
_content_type: Optional[StrictStr] = None,
|
1341
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1342
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1343
|
+
) -> EvaluationResponse:
|
1344
|
+
"""Synchronous version of evaluate_model"""
|
1345
|
+
return async_to_sync(self._evaluate_model_async)(
|
1346
|
+
id=id,
|
1347
|
+
request_body=request_body,
|
1348
|
+
version=version,
|
1349
|
+
_request_timeout=_request_timeout,
|
1350
|
+
_request_auth=_request_auth,
|
1351
|
+
_content_type=_content_type,
|
1352
|
+
_headers=_headers,
|
1353
|
+
_host_index=_host_index,
|
1354
|
+
)
|
1355
|
+
|
1356
|
+
@validate_call
|
1357
|
+
def _evaluate_model_sync_with_http_info(
|
1358
|
+
self,
|
1359
|
+
id: Annotated[
|
1360
|
+
StrictInt, Field(description="The ID of the model you want to evaluate.")
|
1361
|
+
],
|
1362
|
+
request_body: List[Any],
|
1363
|
+
version: Annotated[
|
1364
|
+
Optional[DataVersion],
|
1365
|
+
Field(
|
1366
|
+
description="Data version for evaluation. Defaults to latest public version. Using older versions won't affect leaderboard rankings but can be useful for additional model testing."
|
1367
|
+
),
|
1368
|
+
] = None,
|
1369
|
+
_request_timeout: Union[
|
1370
|
+
None,
|
1371
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1372
|
+
Tuple[
|
1373
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1374
|
+
],
|
1375
|
+
] = None,
|
1376
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1377
|
+
_content_type: Optional[StrictStr] = None,
|
1378
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1379
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1380
|
+
) -> ApiResponse[EvaluationResponse]:
|
1381
|
+
"""Synchronous version of evaluate_model_with_http_info"""
|
1382
|
+
return async_to_sync(self._evaluate_model_async_with_http_info)(
|
1383
|
+
id=id,
|
1384
|
+
request_body=request_body,
|
1385
|
+
version=version,
|
1386
|
+
_request_timeout=_request_timeout,
|
1387
|
+
_request_auth=_request_auth,
|
1388
|
+
_content_type=_content_type,
|
1389
|
+
_headers=_headers,
|
1390
|
+
_host_index=_host_index,
|
1391
|
+
)
|
1392
|
+
|
1393
|
+
@validate_call
|
1394
|
+
def _evaluate_model_sync_without_preload_content(
|
1395
|
+
self,
|
1396
|
+
id: Annotated[
|
1397
|
+
StrictInt, Field(description="The ID of the model you want to evaluate.")
|
1398
|
+
],
|
1399
|
+
request_body: List[Any],
|
1400
|
+
version: Annotated[
|
1401
|
+
Optional[DataVersion],
|
1402
|
+
Field(
|
1403
|
+
description="Data version for evaluation. Defaults to latest public version. Using older versions won't affect leaderboard rankings but can be useful for additional model testing."
|
1404
|
+
),
|
1405
|
+
] = None,
|
1406
|
+
_request_timeout: Union[
|
1407
|
+
None,
|
1408
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1409
|
+
Tuple[
|
1410
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1411
|
+
],
|
1412
|
+
] = None,
|
1413
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1414
|
+
_content_type: Optional[StrictStr] = None,
|
1415
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1416
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1417
|
+
) -> RESTResponseType:
|
1418
|
+
"""Synchronous version of evaluate_model_without_preload_content"""
|
1419
|
+
return async_to_sync(self._evaluate_model_async_without_preload_content)(
|
1420
|
+
id=id,
|
1421
|
+
request_body=request_body,
|
1422
|
+
version=version,
|
1423
|
+
_request_timeout=_request_timeout,
|
1424
|
+
_request_auth=_request_auth,
|
1425
|
+
_content_type=_content_type,
|
1426
|
+
_headers=_headers,
|
1427
|
+
_host_index=_host_index,
|
1428
|
+
)
|
771
1429
|
|
772
1430
|
def _evaluate_model_serialize(
|
773
1431
|
self,
|
@@ -844,7 +1502,7 @@ class ModelsApi:
|
|
844
1502
|
)
|
845
1503
|
|
846
1504
|
@validate_call
|
847
|
-
|
1505
|
+
def get_model(
|
848
1506
|
self,
|
849
1507
|
id: Annotated[StrictInt, Field(description="The ID of the model to retrieve.")],
|
850
1508
|
_request_timeout: Union[
|
@@ -859,30 +1517,142 @@ class ModelsApi:
|
|
859
1517
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
860
1518
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
861
1519
|
) -> ModelRead:
|
862
|
-
"""Get Model
|
1520
|
+
"""Get Model"""
|
1521
|
+
if self.is_sync:
|
1522
|
+
return self._get_model_sync(
|
1523
|
+
id=id,
|
1524
|
+
_request_timeout=_request_timeout,
|
1525
|
+
_request_auth=_request_auth,
|
1526
|
+
_content_type=_content_type,
|
1527
|
+
_headers=_headers,
|
1528
|
+
_host_index=_host_index,
|
1529
|
+
)
|
863
1530
|
|
864
|
-
|
1531
|
+
else:
|
1532
|
+
return self._get_model_async(
|
1533
|
+
id=id,
|
1534
|
+
_request_timeout=_request_timeout,
|
1535
|
+
_request_auth=_request_auth,
|
1536
|
+
_content_type=_content_type,
|
1537
|
+
_headers=_headers,
|
1538
|
+
_host_index=_host_index,
|
1539
|
+
)
|
865
1540
|
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
:
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
1541
|
+
@validate_call
|
1542
|
+
def get_model_with_http_info(
|
1543
|
+
self,
|
1544
|
+
id: Annotated[StrictInt, Field(description="The ID of the model to retrieve.")],
|
1545
|
+
_request_timeout: Union[
|
1546
|
+
None,
|
1547
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1548
|
+
Tuple[
|
1549
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1550
|
+
],
|
1551
|
+
] = None,
|
1552
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1553
|
+
_content_type: Optional[StrictStr] = None,
|
1554
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1555
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1556
|
+
) -> ApiResponse[ModelRead]:
|
1557
|
+
"""Get Model with HTTP info"""
|
1558
|
+
if self.is_sync:
|
1559
|
+
return self._get_model_sync_with_http_info(
|
1560
|
+
id=id,
|
1561
|
+
_request_timeout=_request_timeout,
|
1562
|
+
_request_auth=_request_auth,
|
1563
|
+
_content_type=_content_type,
|
1564
|
+
_headers=_headers,
|
1565
|
+
_host_index=_host_index,
|
1566
|
+
)
|
1567
|
+
|
1568
|
+
else:
|
1569
|
+
return self._get_model_async_with_http_info(
|
1570
|
+
id=id,
|
1571
|
+
_request_timeout=_request_timeout,
|
1572
|
+
_request_auth=_request_auth,
|
1573
|
+
_content_type=_content_type,
|
1574
|
+
_headers=_headers,
|
1575
|
+
_host_index=_host_index,
|
1576
|
+
)
|
1577
|
+
|
1578
|
+
@validate_call
|
1579
|
+
def get_model_without_preload_content(
|
1580
|
+
self,
|
1581
|
+
id: Annotated[StrictInt, Field(description="The ID of the model to retrieve.")],
|
1582
|
+
_request_timeout: Union[
|
1583
|
+
None,
|
1584
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1585
|
+
Tuple[
|
1586
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1587
|
+
],
|
1588
|
+
] = None,
|
1589
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1590
|
+
_content_type: Optional[StrictStr] = None,
|
1591
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1592
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1593
|
+
) -> RESTResponseType:
|
1594
|
+
"""Get Model without preloading content"""
|
1595
|
+
if self.is_sync:
|
1596
|
+
return self._get_model_sync_without_preload_content(
|
1597
|
+
id=id,
|
1598
|
+
_request_timeout=_request_timeout,
|
1599
|
+
_request_auth=_request_auth,
|
1600
|
+
_content_type=_content_type,
|
1601
|
+
_headers=_headers,
|
1602
|
+
_host_index=_host_index,
|
1603
|
+
)
|
1604
|
+
|
1605
|
+
else:
|
1606
|
+
return self._get_model_async_without_preload_content(
|
1607
|
+
id=id,
|
1608
|
+
_request_timeout=_request_timeout,
|
1609
|
+
_request_auth=_request_auth,
|
1610
|
+
_content_type=_content_type,
|
1611
|
+
_headers=_headers,
|
1612
|
+
_host_index=_host_index,
|
1613
|
+
)
|
1614
|
+
|
1615
|
+
# Private async implementation methods
|
1616
|
+
@validate_call
|
1617
|
+
async def _get_model_async(
|
1618
|
+
self,
|
1619
|
+
id: Annotated[StrictInt, Field(description="The ID of the model to retrieve.")],
|
1620
|
+
_request_timeout: Union[
|
1621
|
+
None,
|
1622
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1623
|
+
Tuple[
|
1624
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1625
|
+
],
|
1626
|
+
] = None,
|
1627
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1628
|
+
_content_type: Optional[StrictStr] = None,
|
1629
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1630
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1631
|
+
) -> ModelRead:
|
1632
|
+
"""Get Model
|
1633
|
+
|
1634
|
+
Get a model by ID
|
1635
|
+
|
1636
|
+
:param id: The ID of the model to retrieve. (required)
|
1637
|
+
:type id: int
|
1638
|
+
:param _request_timeout: timeout setting for this request. If one
|
1639
|
+
number provided, it will be total request
|
1640
|
+
timeout. It can also be a pair (tuple) of
|
1641
|
+
(connection, read) timeouts.
|
1642
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1643
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1644
|
+
request; this effectively ignores the
|
1645
|
+
authentication in the spec for a single request.
|
1646
|
+
:type _request_auth: dict, optional
|
1647
|
+
:param _content_type: force content-type for the request.
|
1648
|
+
:type _content_type: str, Optional
|
1649
|
+
:param _headers: set to override the headers for a single
|
1650
|
+
request; this effectively ignores the headers
|
1651
|
+
in the spec for a single request.
|
1652
|
+
:type _headers: dict, optional
|
1653
|
+
:param _host_index: set to override the host_index for a single
|
1654
|
+
request; this effectively ignores the host_index
|
1655
|
+
in the spec for a single request.
|
886
1656
|
:type _host_index: int, optional
|
887
1657
|
:return: Returns the result object.
|
888
1658
|
""" # noqa: E501
|
@@ -908,7 +1678,7 @@ class ModelsApi:
|
|
908
1678
|
).data
|
909
1679
|
|
910
1680
|
@validate_call
|
911
|
-
async def
|
1681
|
+
async def _get_model_async_with_http_info(
|
912
1682
|
self,
|
913
1683
|
id: Annotated[StrictInt, Field(description="The ID of the model to retrieve.")],
|
914
1684
|
_request_timeout: Union[
|
@@ -967,12 +1737,11 @@ class ModelsApi:
|
|
967
1737
|
)
|
968
1738
|
await response_data.read()
|
969
1739
|
return self.api_client.response_deserialize(
|
970
|
-
response_data=response_data,
|
971
|
-
response_types_map=_response_types_map,
|
1740
|
+
response_data=response_data, response_types_map=_response_types_map
|
972
1741
|
)
|
973
1742
|
|
974
1743
|
@validate_call
|
975
|
-
async def
|
1744
|
+
async def _get_model_async_without_preload_content(
|
976
1745
|
self,
|
977
1746
|
id: Annotated[StrictInt, Field(description="The ID of the model to retrieve.")],
|
978
1747
|
_request_timeout: Union[
|
@@ -1029,7 +1798,86 @@ class ModelsApi:
|
|
1029
1798
|
response_data = await self.api_client.call_api(
|
1030
1799
|
*_param, _request_timeout=_request_timeout
|
1031
1800
|
)
|
1032
|
-
return response_data
|
1801
|
+
return response_data
|
1802
|
+
|
1803
|
+
# Private sync implementation methods
|
1804
|
+
@validate_call
|
1805
|
+
def _get_model_sync(
|
1806
|
+
self,
|
1807
|
+
id: Annotated[StrictInt, Field(description="The ID of the model to retrieve.")],
|
1808
|
+
_request_timeout: Union[
|
1809
|
+
None,
|
1810
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1811
|
+
Tuple[
|
1812
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1813
|
+
],
|
1814
|
+
] = None,
|
1815
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1816
|
+
_content_type: Optional[StrictStr] = None,
|
1817
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1818
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1819
|
+
) -> ModelRead:
|
1820
|
+
"""Synchronous version of get_model"""
|
1821
|
+
return async_to_sync(self._get_model_async)(
|
1822
|
+
id=id,
|
1823
|
+
_request_timeout=_request_timeout,
|
1824
|
+
_request_auth=_request_auth,
|
1825
|
+
_content_type=_content_type,
|
1826
|
+
_headers=_headers,
|
1827
|
+
_host_index=_host_index,
|
1828
|
+
)
|
1829
|
+
|
1830
|
+
@validate_call
|
1831
|
+
def _get_model_sync_with_http_info(
|
1832
|
+
self,
|
1833
|
+
id: Annotated[StrictInt, Field(description="The ID of the model to retrieve.")],
|
1834
|
+
_request_timeout: Union[
|
1835
|
+
None,
|
1836
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1837
|
+
Tuple[
|
1838
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1839
|
+
],
|
1840
|
+
] = None,
|
1841
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1842
|
+
_content_type: Optional[StrictStr] = None,
|
1843
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1844
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1845
|
+
) -> ApiResponse[ModelRead]:
|
1846
|
+
"""Synchronous version of get_model_with_http_info"""
|
1847
|
+
return async_to_sync(self._get_model_async_with_http_info)(
|
1848
|
+
id=id,
|
1849
|
+
_request_timeout=_request_timeout,
|
1850
|
+
_request_auth=_request_auth,
|
1851
|
+
_content_type=_content_type,
|
1852
|
+
_headers=_headers,
|
1853
|
+
_host_index=_host_index,
|
1854
|
+
)
|
1855
|
+
|
1856
|
+
@validate_call
|
1857
|
+
def _get_model_sync_without_preload_content(
|
1858
|
+
self,
|
1859
|
+
id: Annotated[StrictInt, Field(description="The ID of the model to retrieve.")],
|
1860
|
+
_request_timeout: Union[
|
1861
|
+
None,
|
1862
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1863
|
+
Tuple[
|
1864
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1865
|
+
],
|
1866
|
+
] = None,
|
1867
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1868
|
+
_content_type: Optional[StrictStr] = None,
|
1869
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1870
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1871
|
+
) -> RESTResponseType:
|
1872
|
+
"""Synchronous version of get_model_without_preload_content"""
|
1873
|
+
return async_to_sync(self._get_model_async_without_preload_content)(
|
1874
|
+
id=id,
|
1875
|
+
_request_timeout=_request_timeout,
|
1876
|
+
_request_auth=_request_auth,
|
1877
|
+
_content_type=_content_type,
|
1878
|
+
_headers=_headers,
|
1879
|
+
_host_index=_host_index,
|
1880
|
+
)
|
1033
1881
|
|
1034
1882
|
def _get_model_serialize(
|
1035
1883
|
self,
|
@@ -1086,7 +1934,119 @@ class ModelsApi:
|
|
1086
1934
|
)
|
1087
1935
|
|
1088
1936
|
@validate_call
|
1089
|
-
|
1937
|
+
def get_model_by_name(
|
1938
|
+
self,
|
1939
|
+
name: Annotated[StrictStr, Field(description="The name of the model to get.")],
|
1940
|
+
_request_timeout: Union[
|
1941
|
+
None,
|
1942
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1943
|
+
Tuple[
|
1944
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1945
|
+
],
|
1946
|
+
] = None,
|
1947
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1948
|
+
_content_type: Optional[StrictStr] = None,
|
1949
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1950
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1951
|
+
) -> ModelRead:
|
1952
|
+
"""Get Model By Name"""
|
1953
|
+
if self.is_sync:
|
1954
|
+
return self._get_model_by_name_sync(
|
1955
|
+
name=name,
|
1956
|
+
_request_timeout=_request_timeout,
|
1957
|
+
_request_auth=_request_auth,
|
1958
|
+
_content_type=_content_type,
|
1959
|
+
_headers=_headers,
|
1960
|
+
_host_index=_host_index,
|
1961
|
+
)
|
1962
|
+
|
1963
|
+
else:
|
1964
|
+
return self._get_model_by_name_async(
|
1965
|
+
name=name,
|
1966
|
+
_request_timeout=_request_timeout,
|
1967
|
+
_request_auth=_request_auth,
|
1968
|
+
_content_type=_content_type,
|
1969
|
+
_headers=_headers,
|
1970
|
+
_host_index=_host_index,
|
1971
|
+
)
|
1972
|
+
|
1973
|
+
@validate_call
|
1974
|
+
def get_model_by_name_with_http_info(
|
1975
|
+
self,
|
1976
|
+
name: Annotated[StrictStr, Field(description="The name of the model to get.")],
|
1977
|
+
_request_timeout: Union[
|
1978
|
+
None,
|
1979
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1980
|
+
Tuple[
|
1981
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1982
|
+
],
|
1983
|
+
] = None,
|
1984
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1985
|
+
_content_type: Optional[StrictStr] = None,
|
1986
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1987
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1988
|
+
) -> ApiResponse[ModelRead]:
|
1989
|
+
"""Get Model By Name with HTTP info"""
|
1990
|
+
if self.is_sync:
|
1991
|
+
return self._get_model_by_name_sync_with_http_info(
|
1992
|
+
name=name,
|
1993
|
+
_request_timeout=_request_timeout,
|
1994
|
+
_request_auth=_request_auth,
|
1995
|
+
_content_type=_content_type,
|
1996
|
+
_headers=_headers,
|
1997
|
+
_host_index=_host_index,
|
1998
|
+
)
|
1999
|
+
|
2000
|
+
else:
|
2001
|
+
return self._get_model_by_name_async_with_http_info(
|
2002
|
+
name=name,
|
2003
|
+
_request_timeout=_request_timeout,
|
2004
|
+
_request_auth=_request_auth,
|
2005
|
+
_content_type=_content_type,
|
2006
|
+
_headers=_headers,
|
2007
|
+
_host_index=_host_index,
|
2008
|
+
)
|
2009
|
+
|
2010
|
+
@validate_call
|
2011
|
+
def get_model_by_name_without_preload_content(
|
2012
|
+
self,
|
2013
|
+
name: Annotated[StrictStr, Field(description="The name of the model to get.")],
|
2014
|
+
_request_timeout: Union[
|
2015
|
+
None,
|
2016
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2017
|
+
Tuple[
|
2018
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
2019
|
+
],
|
2020
|
+
] = None,
|
2021
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2022
|
+
_content_type: Optional[StrictStr] = None,
|
2023
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2024
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2025
|
+
) -> RESTResponseType:
|
2026
|
+
"""Get Model By Name without preloading content"""
|
2027
|
+
if self.is_sync:
|
2028
|
+
return self._get_model_by_name_sync_without_preload_content(
|
2029
|
+
name=name,
|
2030
|
+
_request_timeout=_request_timeout,
|
2031
|
+
_request_auth=_request_auth,
|
2032
|
+
_content_type=_content_type,
|
2033
|
+
_headers=_headers,
|
2034
|
+
_host_index=_host_index,
|
2035
|
+
)
|
2036
|
+
|
2037
|
+
else:
|
2038
|
+
return self._get_model_by_name_async_without_preload_content(
|
2039
|
+
name=name,
|
2040
|
+
_request_timeout=_request_timeout,
|
2041
|
+
_request_auth=_request_auth,
|
2042
|
+
_content_type=_content_type,
|
2043
|
+
_headers=_headers,
|
2044
|
+
_host_index=_host_index,
|
2045
|
+
)
|
2046
|
+
|
2047
|
+
# Private async implementation methods
|
2048
|
+
@validate_call
|
2049
|
+
async def _get_model_by_name_async(
|
1090
2050
|
self,
|
1091
2051
|
name: Annotated[StrictStr, Field(description="The name of the model to get.")],
|
1092
2052
|
_request_timeout: Union[
|
@@ -1150,7 +2110,7 @@ class ModelsApi:
|
|
1150
2110
|
).data
|
1151
2111
|
|
1152
2112
|
@validate_call
|
1153
|
-
async def
|
2113
|
+
async def _get_model_by_name_async_with_http_info(
|
1154
2114
|
self,
|
1155
2115
|
name: Annotated[StrictStr, Field(description="The name of the model to get.")],
|
1156
2116
|
_request_timeout: Union[
|
@@ -1209,12 +2169,11 @@ class ModelsApi:
|
|
1209
2169
|
)
|
1210
2170
|
await response_data.read()
|
1211
2171
|
return self.api_client.response_deserialize(
|
1212
|
-
response_data=response_data,
|
1213
|
-
response_types_map=_response_types_map,
|
2172
|
+
response_data=response_data, response_types_map=_response_types_map
|
1214
2173
|
)
|
1215
2174
|
|
1216
2175
|
@validate_call
|
1217
|
-
async def
|
2176
|
+
async def _get_model_by_name_async_without_preload_content(
|
1218
2177
|
self,
|
1219
2178
|
name: Annotated[StrictStr, Field(description="The name of the model to get.")],
|
1220
2179
|
_request_timeout: Union[
|
@@ -1271,7 +2230,86 @@ class ModelsApi:
|
|
1271
2230
|
response_data = await self.api_client.call_api(
|
1272
2231
|
*_param, _request_timeout=_request_timeout
|
1273
2232
|
)
|
1274
|
-
return response_data
|
2233
|
+
return response_data
|
2234
|
+
|
2235
|
+
# Private sync implementation methods
|
2236
|
+
@validate_call
|
2237
|
+
def _get_model_by_name_sync(
|
2238
|
+
self,
|
2239
|
+
name: Annotated[StrictStr, Field(description="The name of the model to get.")],
|
2240
|
+
_request_timeout: Union[
|
2241
|
+
None,
|
2242
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2243
|
+
Tuple[
|
2244
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
2245
|
+
],
|
2246
|
+
] = None,
|
2247
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2248
|
+
_content_type: Optional[StrictStr] = None,
|
2249
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2250
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2251
|
+
) -> ModelRead:
|
2252
|
+
"""Synchronous version of get_model_by_name"""
|
2253
|
+
return async_to_sync(self._get_model_by_name_async)(
|
2254
|
+
name=name,
|
2255
|
+
_request_timeout=_request_timeout,
|
2256
|
+
_request_auth=_request_auth,
|
2257
|
+
_content_type=_content_type,
|
2258
|
+
_headers=_headers,
|
2259
|
+
_host_index=_host_index,
|
2260
|
+
)
|
2261
|
+
|
2262
|
+
@validate_call
|
2263
|
+
def _get_model_by_name_sync_with_http_info(
|
2264
|
+
self,
|
2265
|
+
name: Annotated[StrictStr, Field(description="The name of the model to get.")],
|
2266
|
+
_request_timeout: Union[
|
2267
|
+
None,
|
2268
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2269
|
+
Tuple[
|
2270
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
2271
|
+
],
|
2272
|
+
] = None,
|
2273
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2274
|
+
_content_type: Optional[StrictStr] = None,
|
2275
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2276
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2277
|
+
) -> ApiResponse[ModelRead]:
|
2278
|
+
"""Synchronous version of get_model_by_name_with_http_info"""
|
2279
|
+
return async_to_sync(self._get_model_by_name_async_with_http_info)(
|
2280
|
+
name=name,
|
2281
|
+
_request_timeout=_request_timeout,
|
2282
|
+
_request_auth=_request_auth,
|
2283
|
+
_content_type=_content_type,
|
2284
|
+
_headers=_headers,
|
2285
|
+
_host_index=_host_index,
|
2286
|
+
)
|
2287
|
+
|
2288
|
+
@validate_call
|
2289
|
+
def _get_model_by_name_sync_without_preload_content(
|
2290
|
+
self,
|
2291
|
+
name: Annotated[StrictStr, Field(description="The name of the model to get.")],
|
2292
|
+
_request_timeout: Union[
|
2293
|
+
None,
|
2294
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2295
|
+
Tuple[
|
2296
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
2297
|
+
],
|
2298
|
+
] = None,
|
2299
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2300
|
+
_content_type: Optional[StrictStr] = None,
|
2301
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2302
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2303
|
+
) -> RESTResponseType:
|
2304
|
+
"""Synchronous version of get_model_by_name_without_preload_content"""
|
2305
|
+
return async_to_sync(self._get_model_by_name_async_without_preload_content)(
|
2306
|
+
name=name,
|
2307
|
+
_request_timeout=_request_timeout,
|
2308
|
+
_request_auth=_request_auth,
|
2309
|
+
_content_type=_content_type,
|
2310
|
+
_headers=_headers,
|
2311
|
+
_host_index=_host_index,
|
2312
|
+
)
|
1275
2313
|
|
1276
2314
|
def _get_model_by_name_serialize(
|
1277
2315
|
self,
|
@@ -1328,7 +2366,158 @@ class ModelsApi:
|
|
1328
2366
|
)
|
1329
2367
|
|
1330
2368
|
@validate_call
|
1331
|
-
|
2369
|
+
def get_models(
|
2370
|
+
self,
|
2371
|
+
by_user: Annotated[
|
2372
|
+
Optional[StrictBool],
|
2373
|
+
Field(
|
2374
|
+
description="Whether to get models by a specific user. Else all models are returned."
|
2375
|
+
),
|
2376
|
+
] = None,
|
2377
|
+
user_id: Annotated[
|
2378
|
+
Optional[StrictStr],
|
2379
|
+
Field(
|
2380
|
+
description="The ID of the user to get models for. Only used if `by_user` is true. Default is current user."
|
2381
|
+
),
|
2382
|
+
] = None,
|
2383
|
+
_request_timeout: Union[
|
2384
|
+
None,
|
2385
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2386
|
+
Tuple[
|
2387
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
2388
|
+
],
|
2389
|
+
] = None,
|
2390
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2391
|
+
_content_type: Optional[StrictStr] = None,
|
2392
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2393
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2394
|
+
) -> List[ModelRead]:
|
2395
|
+
"""Get All Models"""
|
2396
|
+
if self.is_sync:
|
2397
|
+
return self._get_models_sync(
|
2398
|
+
by_user=by_user,
|
2399
|
+
user_id=user_id,
|
2400
|
+
_request_timeout=_request_timeout,
|
2401
|
+
_request_auth=_request_auth,
|
2402
|
+
_content_type=_content_type,
|
2403
|
+
_headers=_headers,
|
2404
|
+
_host_index=_host_index,
|
2405
|
+
)
|
2406
|
+
|
2407
|
+
else:
|
2408
|
+
return self._get_models_async(
|
2409
|
+
by_user=by_user,
|
2410
|
+
user_id=user_id,
|
2411
|
+
_request_timeout=_request_timeout,
|
2412
|
+
_request_auth=_request_auth,
|
2413
|
+
_content_type=_content_type,
|
2414
|
+
_headers=_headers,
|
2415
|
+
_host_index=_host_index,
|
2416
|
+
)
|
2417
|
+
|
2418
|
+
@validate_call
|
2419
|
+
def get_models_with_http_info(
|
2420
|
+
self,
|
2421
|
+
by_user: Annotated[
|
2422
|
+
Optional[StrictBool],
|
2423
|
+
Field(
|
2424
|
+
description="Whether to get models by a specific user. Else all models are returned."
|
2425
|
+
),
|
2426
|
+
] = None,
|
2427
|
+
user_id: Annotated[
|
2428
|
+
Optional[StrictStr],
|
2429
|
+
Field(
|
2430
|
+
description="The ID of the user to get models for. Only used if `by_user` is true. Default is current user."
|
2431
|
+
),
|
2432
|
+
] = None,
|
2433
|
+
_request_timeout: Union[
|
2434
|
+
None,
|
2435
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2436
|
+
Tuple[
|
2437
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
2438
|
+
],
|
2439
|
+
] = None,
|
2440
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2441
|
+
_content_type: Optional[StrictStr] = None,
|
2442
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2443
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2444
|
+
) -> ApiResponse[List[ModelRead]]:
|
2445
|
+
"""Get All Models with HTTP info"""
|
2446
|
+
if self.is_sync:
|
2447
|
+
return self._get_models_sync_with_http_info(
|
2448
|
+
by_user=by_user,
|
2449
|
+
user_id=user_id,
|
2450
|
+
_request_timeout=_request_timeout,
|
2451
|
+
_request_auth=_request_auth,
|
2452
|
+
_content_type=_content_type,
|
2453
|
+
_headers=_headers,
|
2454
|
+
_host_index=_host_index,
|
2455
|
+
)
|
2456
|
+
|
2457
|
+
else:
|
2458
|
+
return self._get_models_async_with_http_info(
|
2459
|
+
by_user=by_user,
|
2460
|
+
user_id=user_id,
|
2461
|
+
_request_timeout=_request_timeout,
|
2462
|
+
_request_auth=_request_auth,
|
2463
|
+
_content_type=_content_type,
|
2464
|
+
_headers=_headers,
|
2465
|
+
_host_index=_host_index,
|
2466
|
+
)
|
2467
|
+
|
2468
|
+
@validate_call
|
2469
|
+
def get_models_without_preload_content(
|
2470
|
+
self,
|
2471
|
+
by_user: Annotated[
|
2472
|
+
Optional[StrictBool],
|
2473
|
+
Field(
|
2474
|
+
description="Whether to get models by a specific user. Else all models are returned."
|
2475
|
+
),
|
2476
|
+
] = None,
|
2477
|
+
user_id: Annotated[
|
2478
|
+
Optional[StrictStr],
|
2479
|
+
Field(
|
2480
|
+
description="The ID of the user to get models for. Only used if `by_user` is true. Default is current user."
|
2481
|
+
),
|
2482
|
+
] = None,
|
2483
|
+
_request_timeout: Union[
|
2484
|
+
None,
|
2485
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2486
|
+
Tuple[
|
2487
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
2488
|
+
],
|
2489
|
+
] = None,
|
2490
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2491
|
+
_content_type: Optional[StrictStr] = None,
|
2492
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2493
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2494
|
+
) -> RESTResponseType:
|
2495
|
+
"""Get All Models without preloading content"""
|
2496
|
+
if self.is_sync:
|
2497
|
+
return self._get_models_sync_without_preload_content(
|
2498
|
+
by_user=by_user,
|
2499
|
+
user_id=user_id,
|
2500
|
+
_request_timeout=_request_timeout,
|
2501
|
+
_request_auth=_request_auth,
|
2502
|
+
_content_type=_content_type,
|
2503
|
+
_headers=_headers,
|
2504
|
+
_host_index=_host_index,
|
2505
|
+
)
|
2506
|
+
|
2507
|
+
else:
|
2508
|
+
return self._get_models_async_without_preload_content(
|
2509
|
+
by_user=by_user,
|
2510
|
+
user_id=user_id,
|
2511
|
+
_request_timeout=_request_timeout,
|
2512
|
+
_request_auth=_request_auth,
|
2513
|
+
_content_type=_content_type,
|
2514
|
+
_headers=_headers,
|
2515
|
+
_host_index=_host_index,
|
2516
|
+
)
|
2517
|
+
|
2518
|
+
# Private async implementation methods
|
2519
|
+
@validate_call
|
2520
|
+
async def _get_models_async(
|
1332
2521
|
self,
|
1333
2522
|
by_user: Annotated[
|
1334
2523
|
Optional[StrictBool],
|
@@ -1406,7 +2595,7 @@ class ModelsApi:
|
|
1406
2595
|
).data
|
1407
2596
|
|
1408
2597
|
@validate_call
|
1409
|
-
async def
|
2598
|
+
async def _get_models_async_with_http_info(
|
1410
2599
|
self,
|
1411
2600
|
by_user: Annotated[
|
1412
2601
|
Optional[StrictBool],
|
@@ -1479,12 +2668,11 @@ class ModelsApi:
|
|
1479
2668
|
)
|
1480
2669
|
await response_data.read()
|
1481
2670
|
return self.api_client.response_deserialize(
|
1482
|
-
response_data=response_data,
|
1483
|
-
response_types_map=_response_types_map,
|
2671
|
+
response_data=response_data, response_types_map=_response_types_map
|
1484
2672
|
)
|
1485
2673
|
|
1486
2674
|
@validate_call
|
1487
|
-
async def
|
2675
|
+
async def _get_models_async_without_preload_content(
|
1488
2676
|
self,
|
1489
2677
|
by_user: Annotated[
|
1490
2678
|
Optional[StrictBool],
|
@@ -1555,7 +2743,122 @@ class ModelsApi:
|
|
1555
2743
|
response_data = await self.api_client.call_api(
|
1556
2744
|
*_param, _request_timeout=_request_timeout
|
1557
2745
|
)
|
1558
|
-
return response_data
|
2746
|
+
return response_data
|
2747
|
+
|
2748
|
+
# Private sync implementation methods
|
2749
|
+
@validate_call
|
2750
|
+
def _get_models_sync(
|
2751
|
+
self,
|
2752
|
+
by_user: Annotated[
|
2753
|
+
Optional[StrictBool],
|
2754
|
+
Field(
|
2755
|
+
description="Whether to get models by a specific user. Else all models are returned."
|
2756
|
+
),
|
2757
|
+
] = None,
|
2758
|
+
user_id: Annotated[
|
2759
|
+
Optional[StrictStr],
|
2760
|
+
Field(
|
2761
|
+
description="The ID of the user to get models for. Only used if `by_user` is true. Default is current user."
|
2762
|
+
),
|
2763
|
+
] = None,
|
2764
|
+
_request_timeout: Union[
|
2765
|
+
None,
|
2766
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2767
|
+
Tuple[
|
2768
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
2769
|
+
],
|
2770
|
+
] = None,
|
2771
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2772
|
+
_content_type: Optional[StrictStr] = None,
|
2773
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2774
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2775
|
+
) -> List[ModelRead]:
|
2776
|
+
"""Synchronous version of get_models"""
|
2777
|
+
return async_to_sync(self._get_models_async)(
|
2778
|
+
by_user=by_user,
|
2779
|
+
user_id=user_id,
|
2780
|
+
_request_timeout=_request_timeout,
|
2781
|
+
_request_auth=_request_auth,
|
2782
|
+
_content_type=_content_type,
|
2783
|
+
_headers=_headers,
|
2784
|
+
_host_index=_host_index,
|
2785
|
+
)
|
2786
|
+
|
2787
|
+
@validate_call
|
2788
|
+
def _get_models_sync_with_http_info(
|
2789
|
+
self,
|
2790
|
+
by_user: Annotated[
|
2791
|
+
Optional[StrictBool],
|
2792
|
+
Field(
|
2793
|
+
description="Whether to get models by a specific user. Else all models are returned."
|
2794
|
+
),
|
2795
|
+
] = None,
|
2796
|
+
user_id: Annotated[
|
2797
|
+
Optional[StrictStr],
|
2798
|
+
Field(
|
2799
|
+
description="The ID of the user to get models for. Only used if `by_user` is true. Default is current user."
|
2800
|
+
),
|
2801
|
+
] = None,
|
2802
|
+
_request_timeout: Union[
|
2803
|
+
None,
|
2804
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2805
|
+
Tuple[
|
2806
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
2807
|
+
],
|
2808
|
+
] = None,
|
2809
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2810
|
+
_content_type: Optional[StrictStr] = None,
|
2811
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2812
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2813
|
+
) -> ApiResponse[List[ModelRead]]:
|
2814
|
+
"""Synchronous version of get_models_with_http_info"""
|
2815
|
+
return async_to_sync(self._get_models_async_with_http_info)(
|
2816
|
+
by_user=by_user,
|
2817
|
+
user_id=user_id,
|
2818
|
+
_request_timeout=_request_timeout,
|
2819
|
+
_request_auth=_request_auth,
|
2820
|
+
_content_type=_content_type,
|
2821
|
+
_headers=_headers,
|
2822
|
+
_host_index=_host_index,
|
2823
|
+
)
|
2824
|
+
|
2825
|
+
@validate_call
|
2826
|
+
def _get_models_sync_without_preload_content(
|
2827
|
+
self,
|
2828
|
+
by_user: Annotated[
|
2829
|
+
Optional[StrictBool],
|
2830
|
+
Field(
|
2831
|
+
description="Whether to get models by a specific user. Else all models are returned."
|
2832
|
+
),
|
2833
|
+
] = None,
|
2834
|
+
user_id: Annotated[
|
2835
|
+
Optional[StrictStr],
|
2836
|
+
Field(
|
2837
|
+
description="The ID of the user to get models for. Only used if `by_user` is true. Default is current user."
|
2838
|
+
),
|
2839
|
+
] = None,
|
2840
|
+
_request_timeout: Union[
|
2841
|
+
None,
|
2842
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2843
|
+
Tuple[
|
2844
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
2845
|
+
],
|
2846
|
+
] = None,
|
2847
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2848
|
+
_content_type: Optional[StrictStr] = None,
|
2849
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2850
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2851
|
+
) -> RESTResponseType:
|
2852
|
+
"""Synchronous version of get_models_without_preload_content"""
|
2853
|
+
return async_to_sync(self._get_models_async_without_preload_content)(
|
2854
|
+
by_user=by_user,
|
2855
|
+
user_id=user_id,
|
2856
|
+
_request_timeout=_request_timeout,
|
2857
|
+
_request_auth=_request_auth,
|
2858
|
+
_content_type=_content_type,
|
2859
|
+
_headers=_headers,
|
2860
|
+
_host_index=_host_index,
|
2861
|
+
)
|
1559
2862
|
|
1560
2863
|
def _get_models_serialize(
|
1561
2864
|
self,
|
@@ -1619,7 +2922,128 @@ class ModelsApi:
|
|
1619
2922
|
)
|
1620
2923
|
|
1621
2924
|
@validate_call
|
1622
|
-
|
2925
|
+
def update_model(
|
2926
|
+
self,
|
2927
|
+
id: Annotated[StrictInt, Field(description="The ID of the model to update.")],
|
2928
|
+
model_update: ModelUpdate,
|
2929
|
+
_request_timeout: Union[
|
2930
|
+
None,
|
2931
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2932
|
+
Tuple[
|
2933
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
2934
|
+
],
|
2935
|
+
] = None,
|
2936
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2937
|
+
_content_type: Optional[StrictStr] = None,
|
2938
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2939
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2940
|
+
) -> object:
|
2941
|
+
"""Update Model"""
|
2942
|
+
if self.is_sync:
|
2943
|
+
return self._update_model_sync(
|
2944
|
+
id=id,
|
2945
|
+
model_update=model_update,
|
2946
|
+
_request_timeout=_request_timeout,
|
2947
|
+
_request_auth=_request_auth,
|
2948
|
+
_content_type=_content_type,
|
2949
|
+
_headers=_headers,
|
2950
|
+
_host_index=_host_index,
|
2951
|
+
)
|
2952
|
+
|
2953
|
+
else:
|
2954
|
+
return self._update_model_async(
|
2955
|
+
id=id,
|
2956
|
+
model_update=model_update,
|
2957
|
+
_request_timeout=_request_timeout,
|
2958
|
+
_request_auth=_request_auth,
|
2959
|
+
_content_type=_content_type,
|
2960
|
+
_headers=_headers,
|
2961
|
+
_host_index=_host_index,
|
2962
|
+
)
|
2963
|
+
|
2964
|
+
@validate_call
|
2965
|
+
def update_model_with_http_info(
|
2966
|
+
self,
|
2967
|
+
id: Annotated[StrictInt, Field(description="The ID of the model to update.")],
|
2968
|
+
model_update: ModelUpdate,
|
2969
|
+
_request_timeout: Union[
|
2970
|
+
None,
|
2971
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2972
|
+
Tuple[
|
2973
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
2974
|
+
],
|
2975
|
+
] = None,
|
2976
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2977
|
+
_content_type: Optional[StrictStr] = None,
|
2978
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2979
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2980
|
+
) -> ApiResponse[object]:
|
2981
|
+
"""Update Model with HTTP info"""
|
2982
|
+
if self.is_sync:
|
2983
|
+
return self._update_model_sync_with_http_info(
|
2984
|
+
id=id,
|
2985
|
+
model_update=model_update,
|
2986
|
+
_request_timeout=_request_timeout,
|
2987
|
+
_request_auth=_request_auth,
|
2988
|
+
_content_type=_content_type,
|
2989
|
+
_headers=_headers,
|
2990
|
+
_host_index=_host_index,
|
2991
|
+
)
|
2992
|
+
|
2993
|
+
else:
|
2994
|
+
return self._update_model_async_with_http_info(
|
2995
|
+
id=id,
|
2996
|
+
model_update=model_update,
|
2997
|
+
_request_timeout=_request_timeout,
|
2998
|
+
_request_auth=_request_auth,
|
2999
|
+
_content_type=_content_type,
|
3000
|
+
_headers=_headers,
|
3001
|
+
_host_index=_host_index,
|
3002
|
+
)
|
3003
|
+
|
3004
|
+
@validate_call
|
3005
|
+
def update_model_without_preload_content(
|
3006
|
+
self,
|
3007
|
+
id: Annotated[StrictInt, Field(description="The ID of the model to update.")],
|
3008
|
+
model_update: ModelUpdate,
|
3009
|
+
_request_timeout: Union[
|
3010
|
+
None,
|
3011
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3012
|
+
Tuple[
|
3013
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
3014
|
+
],
|
3015
|
+
] = None,
|
3016
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3017
|
+
_content_type: Optional[StrictStr] = None,
|
3018
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3019
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3020
|
+
) -> RESTResponseType:
|
3021
|
+
"""Update Model without preloading content"""
|
3022
|
+
if self.is_sync:
|
3023
|
+
return self._update_model_sync_without_preload_content(
|
3024
|
+
id=id,
|
3025
|
+
model_update=model_update,
|
3026
|
+
_request_timeout=_request_timeout,
|
3027
|
+
_request_auth=_request_auth,
|
3028
|
+
_content_type=_content_type,
|
3029
|
+
_headers=_headers,
|
3030
|
+
_host_index=_host_index,
|
3031
|
+
)
|
3032
|
+
|
3033
|
+
else:
|
3034
|
+
return self._update_model_async_without_preload_content(
|
3035
|
+
id=id,
|
3036
|
+
model_update=model_update,
|
3037
|
+
_request_timeout=_request_timeout,
|
3038
|
+
_request_auth=_request_auth,
|
3039
|
+
_content_type=_content_type,
|
3040
|
+
_headers=_headers,
|
3041
|
+
_host_index=_host_index,
|
3042
|
+
)
|
3043
|
+
|
3044
|
+
# Private async implementation methods
|
3045
|
+
@validate_call
|
3046
|
+
async def _update_model_async(
|
1623
3047
|
self,
|
1624
3048
|
id: Annotated[StrictInt, Field(description="The ID of the model to update.")],
|
1625
3049
|
model_update: ModelUpdate,
|
@@ -1687,7 +3111,7 @@ class ModelsApi:
|
|
1687
3111
|
).data
|
1688
3112
|
|
1689
3113
|
@validate_call
|
1690
|
-
async def
|
3114
|
+
async def _update_model_async_with_http_info(
|
1691
3115
|
self,
|
1692
3116
|
id: Annotated[StrictInt, Field(description="The ID of the model to update.")],
|
1693
3117
|
model_update: ModelUpdate,
|
@@ -1750,12 +3174,11 @@ class ModelsApi:
|
|
1750
3174
|
)
|
1751
3175
|
await response_data.read()
|
1752
3176
|
return self.api_client.response_deserialize(
|
1753
|
-
response_data=response_data,
|
1754
|
-
response_types_map=_response_types_map,
|
3177
|
+
response_data=response_data, response_types_map=_response_types_map
|
1755
3178
|
)
|
1756
3179
|
|
1757
3180
|
@validate_call
|
1758
|
-
async def
|
3181
|
+
async def _update_model_async_without_preload_content(
|
1759
3182
|
self,
|
1760
3183
|
id: Annotated[StrictInt, Field(description="The ID of the model to update.")],
|
1761
3184
|
model_update: ModelUpdate,
|
@@ -1816,7 +3239,92 @@ class ModelsApi:
|
|
1816
3239
|
response_data = await self.api_client.call_api(
|
1817
3240
|
*_param, _request_timeout=_request_timeout
|
1818
3241
|
)
|
1819
|
-
return response_data
|
3242
|
+
return response_data
|
3243
|
+
|
3244
|
+
# Private sync implementation methods
|
3245
|
+
@validate_call
|
3246
|
+
def _update_model_sync(
|
3247
|
+
self,
|
3248
|
+
id: Annotated[StrictInt, Field(description="The ID of the model to update.")],
|
3249
|
+
model_update: ModelUpdate,
|
3250
|
+
_request_timeout: Union[
|
3251
|
+
None,
|
3252
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3253
|
+
Tuple[
|
3254
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
3255
|
+
],
|
3256
|
+
] = None,
|
3257
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3258
|
+
_content_type: Optional[StrictStr] = None,
|
3259
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3260
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3261
|
+
) -> object:
|
3262
|
+
"""Synchronous version of update_model"""
|
3263
|
+
return async_to_sync(self._update_model_async)(
|
3264
|
+
id=id,
|
3265
|
+
model_update=model_update,
|
3266
|
+
_request_timeout=_request_timeout,
|
3267
|
+
_request_auth=_request_auth,
|
3268
|
+
_content_type=_content_type,
|
3269
|
+
_headers=_headers,
|
3270
|
+
_host_index=_host_index,
|
3271
|
+
)
|
3272
|
+
|
3273
|
+
@validate_call
|
3274
|
+
def _update_model_sync_with_http_info(
|
3275
|
+
self,
|
3276
|
+
id: Annotated[StrictInt, Field(description="The ID of the model to update.")],
|
3277
|
+
model_update: ModelUpdate,
|
3278
|
+
_request_timeout: Union[
|
3279
|
+
None,
|
3280
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3281
|
+
Tuple[
|
3282
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
3283
|
+
],
|
3284
|
+
] = None,
|
3285
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3286
|
+
_content_type: Optional[StrictStr] = None,
|
3287
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3288
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3289
|
+
) -> ApiResponse[object]:
|
3290
|
+
"""Synchronous version of update_model_with_http_info"""
|
3291
|
+
return async_to_sync(self._update_model_async_with_http_info)(
|
3292
|
+
id=id,
|
3293
|
+
model_update=model_update,
|
3294
|
+
_request_timeout=_request_timeout,
|
3295
|
+
_request_auth=_request_auth,
|
3296
|
+
_content_type=_content_type,
|
3297
|
+
_headers=_headers,
|
3298
|
+
_host_index=_host_index,
|
3299
|
+
)
|
3300
|
+
|
3301
|
+
@validate_call
|
3302
|
+
def _update_model_sync_without_preload_content(
|
3303
|
+
self,
|
3304
|
+
id: Annotated[StrictInt, Field(description="The ID of the model to update.")],
|
3305
|
+
model_update: ModelUpdate,
|
3306
|
+
_request_timeout: Union[
|
3307
|
+
None,
|
3308
|
+
Annotated[StrictFloat, Field(gt=0)],
|
3309
|
+
Tuple[
|
3310
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
3311
|
+
],
|
3312
|
+
] = None,
|
3313
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
3314
|
+
_content_type: Optional[StrictStr] = None,
|
3315
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
3316
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
3317
|
+
) -> RESTResponseType:
|
3318
|
+
"""Synchronous version of update_model_without_preload_content"""
|
3319
|
+
return async_to_sync(self._update_model_async_without_preload_content)(
|
3320
|
+
id=id,
|
3321
|
+
model_update=model_update,
|
3322
|
+
_request_timeout=_request_timeout,
|
3323
|
+
_request_auth=_request_auth,
|
3324
|
+
_content_type=_content_type,
|
3325
|
+
_headers=_headers,
|
3326
|
+
_host_index=_host_index,
|
3327
|
+
)
|
1820
3328
|
|
1821
3329
|
def _update_model_serialize(
|
1822
3330
|
self,
|