crypticorn 2.17.0rc1__py3-none-any.whl → 2.17.0rc2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. crypticorn/__init__.py +2 -2
  2. crypticorn/auth/client/api/admin_api.py +415 -13
  3. crypticorn/auth/client/api/auth_api.py +2622 -113
  4. crypticorn/auth/client/api/service_api.py +258 -7
  5. crypticorn/auth/client/api/user_api.py +2485 -270
  6. crypticorn/auth/client/api/wallet_api.py +1518 -77
  7. crypticorn/auth/client/models/create_api_key_request.py +2 -1
  8. crypticorn/auth/client/models/get_api_keys200_response_inner.py +2 -1
  9. crypticorn/auth/client/rest.py +23 -4
  10. crypticorn/auth/main.py +8 -5
  11. crypticorn/client.py +227 -59
  12. crypticorn/common/__init__.py +0 -1
  13. crypticorn/common/metrics.py +4 -6
  14. crypticorn/common/middleware.py +10 -5
  15. crypticorn/common/pagination.py +137 -18
  16. crypticorn/common/router/admin_router.py +1 -1
  17. crypticorn/common/utils.py +2 -1
  18. crypticorn/common/warnings.py +1 -0
  19. crypticorn/hive/client/api/admin_api.py +1234 -51
  20. crypticorn/hive/client/api/data_api.py +517 -13
  21. crypticorn/hive/client/api/models_api.py +1657 -83
  22. crypticorn/hive/client/api/status_api.py +415 -13
  23. crypticorn/hive/client/models/api_error_identifier.py +1 -1
  24. crypticorn/hive/client/rest.py +23 -4
  25. crypticorn/hive/main.py +99 -25
  26. crypticorn/klines/client/api/admin_api.py +1234 -51
  27. crypticorn/klines/client/api/change_in_timeframe_api.py +278 -7
  28. crypticorn/klines/client/api/funding_rates_api.py +324 -7
  29. crypticorn/klines/client/api/ohlcv_data_api.py +399 -7
  30. crypticorn/klines/client/api/status_api.py +415 -13
  31. crypticorn/klines/client/api/symbols_api.py +225 -7
  32. crypticorn/klines/client/api/udf_api.py +1393 -120
  33. crypticorn/klines/client/models/api_error_identifier.py +3 -1
  34. crypticorn/klines/client/rest.py +23 -4
  35. crypticorn/klines/main.py +89 -12
  36. crypticorn/metrics/client/api/admin_api.py +1234 -51
  37. crypticorn/metrics/client/api/exchanges_api.py +1405 -140
  38. crypticorn/metrics/client/api/indicators_api.py +640 -13
  39. crypticorn/metrics/client/api/logs_api.py +305 -7
  40. crypticorn/metrics/client/api/marketcap_api.py +1240 -60
  41. crypticorn/metrics/client/api/markets_api.py +352 -7
  42. crypticorn/metrics/client/api/quote_currencies_api.py +237 -7
  43. crypticorn/metrics/client/api/status_api.py +415 -13
  44. crypticorn/metrics/client/api/tokens_api.py +400 -13
  45. crypticorn/metrics/client/configuration.py +4 -2
  46. crypticorn/metrics/client/rest.py +23 -4
  47. crypticorn/metrics/main.py +113 -19
  48. crypticorn/pay/client/api/admin_api.py +1720 -126
  49. crypticorn/pay/client/api/now_payments_api.py +1013 -42
  50. crypticorn/pay/client/api/payments_api.py +580 -13
  51. crypticorn/pay/client/api/products_api.py +915 -25
  52. crypticorn/pay/client/api/status_api.py +415 -13
  53. crypticorn/pay/client/configuration.py +2 -2
  54. crypticorn/pay/client/models/api_error_identifier.py +7 -7
  55. crypticorn/pay/client/models/scope.py +1 -0
  56. crypticorn/pay/client/rest.py +23 -4
  57. crypticorn/pay/main.py +10 -6
  58. crypticorn/trade/client/__init__.py +2 -1
  59. crypticorn/trade/client/api/__init__.py +0 -1
  60. crypticorn/trade/client/api/admin_api.py +1718 -123
  61. crypticorn/trade/client/api/api_keys_api.py +1596 -103
  62. crypticorn/trade/client/api/bots_api.py +1106 -47
  63. crypticorn/trade/client/api/exchanges_api.py +592 -19
  64. crypticorn/trade/client/api/notifications_api.py +1340 -112
  65. crypticorn/trade/client/api/orders_api.py +240 -7
  66. crypticorn/trade/client/api/status_api.py +415 -13
  67. crypticorn/trade/client/api/strategies_api.py +1170 -69
  68. crypticorn/trade/client/api/trading_actions_api.py +650 -19
  69. crypticorn/trade/client/models/__init__.py +2 -0
  70. crypticorn/trade/client/models/exchange.py +6 -1
  71. crypticorn/trade/client/models/exchange_key_balance.py +111 -0
  72. crypticorn/trade/client/models/futures_balance.py +27 -25
  73. crypticorn/trade/client/models/spot_balance.py +110 -0
  74. crypticorn/trade/client/models/strategy.py +5 -3
  75. crypticorn/trade/client/models/strategy_create.py +6 -4
  76. crypticorn/trade/client/models/strategy_exchange_info.py +16 -4
  77. crypticorn/trade/client/models/strategy_update.py +2 -2
  78. crypticorn/trade/client/rest.py +23 -4
  79. crypticorn/trade/main.py +15 -12
  80. {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc2.dist-info}/METADATA +64 -20
  81. {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc2.dist-info}/RECORD +85 -84
  82. crypticorn/trade/client/api/futures_trading_panel_api.py +0 -1285
  83. {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc2.dist-info}/WHEEL +0 -0
  84. {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc2.dist-info}/entry_points.txt +0 -0
  85. {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc2.dist-info}/licenses/LICENSE +0 -0
  86. {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc2.dist-info}/top_level.txt +0 -0
@@ -29,6 +29,24 @@ from crypticorn.hive.client.api_client import ApiClient, RequestSerialized
29
29
  from crypticorn.hive.client.api_response import ApiResponse
30
30
  from crypticorn.hive.client.rest import RESTResponseType
31
31
 
32
+ # Import async_to_sync for sync methods
33
+ try:
34
+ from asgiref.sync import async_to_sync
35
+
36
+ _HAS_ASGIREF = True
37
+ except ImportError:
38
+ _HAS_ASGIREF = False
39
+
40
+ def async_to_sync(async_func):
41
+ """Fallback decorator that raises an error if asgiref is not available."""
42
+
43
+ def wrapper(*args, **kwargs):
44
+ raise ImportError(
45
+ "asgiref is required for sync methods. Install with: pip install asgiref"
46
+ )
47
+
48
+ return wrapper
49
+
32
50
 
33
51
  class ModelsApi:
34
52
  """NOTE: This class is auto generated by OpenAPI Generator
@@ -37,13 +55,135 @@ class ModelsApi:
37
55
  Do not edit the class manually.
38
56
  """
39
57
 
40
- def __init__(self, api_client=None) -> None:
58
+ def __init__(self, api_client=None, is_sync: bool = False) -> None:
41
59
  if api_client is None:
42
60
  api_client = ApiClient.get_default()
43
61
  self.api_client = api_client
62
+ self.is_sync = is_sync
63
+
64
+ @validate_call
65
+ def create_model(
66
+ self,
67
+ model_create: ModelCreate,
68
+ _request_timeout: Union[
69
+ None,
70
+ Annotated[StrictFloat, Field(gt=0)],
71
+ Tuple[
72
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
73
+ ],
74
+ ] = None,
75
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
76
+ _content_type: Optional[StrictStr] = None,
77
+ _headers: Optional[Dict[StrictStr, Any]] = None,
78
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
79
+ ) -> ModelRead:
80
+ """Create Model
81
+
82
+ This method can work in both sync and async modes based on the is_sync flag.
83
+ """
84
+ if self.is_sync:
85
+ return self._create_model_sync(
86
+ model_create=model_create,
87
+ _request_timeout=_request_timeout,
88
+ _request_auth=_request_auth,
89
+ _content_type=_content_type,
90
+ _headers=_headers,
91
+ _host_index=_host_index,
92
+ )
93
+
94
+ else:
95
+ return self._create_model_async(
96
+ model_create=model_create,
97
+ _request_timeout=_request_timeout,
98
+ _request_auth=_request_auth,
99
+ _content_type=_content_type,
100
+ _headers=_headers,
101
+ _host_index=_host_index,
102
+ )
103
+
104
+ @validate_call
105
+ def create_model_with_http_info(
106
+ self,
107
+ model_create: ModelCreate,
108
+ _request_timeout: Union[
109
+ None,
110
+ Annotated[StrictFloat, Field(gt=0)],
111
+ Tuple[
112
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
113
+ ],
114
+ ] = None,
115
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
116
+ _content_type: Optional[StrictStr] = None,
117
+ _headers: Optional[Dict[StrictStr, Any]] = None,
118
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
119
+ ) -> ApiResponse[ModelRead]:
120
+ """Create Model with HTTP info
121
+
122
+ This method can work in both sync and async modes based on the is_sync flag.
123
+ """
124
+ if self.is_sync:
125
+ return self._create_model_sync_with_http_info(
126
+ model_create=model_create,
127
+ _request_timeout=_request_timeout,
128
+ _request_auth=_request_auth,
129
+ _content_type=_content_type,
130
+ _headers=_headers,
131
+ _host_index=_host_index,
132
+ )
133
+
134
+ else:
135
+ return self._create_model_async_with_http_info(
136
+ model_create=model_create,
137
+ _request_timeout=_request_timeout,
138
+ _request_auth=_request_auth,
139
+ _content_type=_content_type,
140
+ _headers=_headers,
141
+ _host_index=_host_index,
142
+ )
143
+
144
+ @validate_call
145
+ def create_model_without_preload_content(
146
+ self,
147
+ model_create: ModelCreate,
148
+ _request_timeout: Union[
149
+ None,
150
+ Annotated[StrictFloat, Field(gt=0)],
151
+ Tuple[
152
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
153
+ ],
154
+ ] = None,
155
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
156
+ _content_type: Optional[StrictStr] = None,
157
+ _headers: Optional[Dict[StrictStr, Any]] = None,
158
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
159
+ ) -> RESTResponseType:
160
+ """Create Model without preloading content
161
+
162
+ This method can work in both sync and async modes based on the is_sync flag.
163
+ """
164
+ if self.is_sync:
165
+ return self._create_model_sync_without_preload_content(
166
+ model_create=model_create,
167
+ _request_timeout=_request_timeout,
168
+ _request_auth=_request_auth,
169
+ _content_type=_content_type,
170
+ _headers=_headers,
171
+ _host_index=_host_index,
172
+ )
173
+
174
+ else:
175
+ return self._create_model_async_without_preload_content(
176
+ model_create=model_create,
177
+ _request_timeout=_request_timeout,
178
+ _request_auth=_request_auth,
179
+ _content_type=_content_type,
180
+ _headers=_headers,
181
+ _host_index=_host_index,
182
+ )
44
183
 
184
+ # Private async implementation methods
45
185
  @validate_call
46
- async def create_model(
186
+ async def _create_model_async(
47
187
  self,
48
188
  model_create: ModelCreate,
49
189
  _request_timeout: Union[
@@ -107,7 +247,7 @@ class ModelsApi:
107
247
  ).data
108
248
 
109
249
  @validate_call
110
- async def create_model_with_http_info(
250
+ async def _create_model_async_with_http_info(
111
251
  self,
112
252
  model_create: ModelCreate,
113
253
  _request_timeout: Union[
@@ -166,12 +306,11 @@ class ModelsApi:
166
306
  )
167
307
  await response_data.read()
168
308
  return self.api_client.response_deserialize(
169
- response_data=response_data,
170
- response_types_map=_response_types_map,
309
+ response_data=response_data, response_types_map=_response_types_map
171
310
  )
172
311
 
173
312
  @validate_call
174
- async def create_model_without_preload_content(
313
+ async def _create_model_async_without_preload_content(
175
314
  self,
176
315
  model_create: ModelCreate,
177
316
  _request_timeout: Union[
@@ -228,7 +367,86 @@ class ModelsApi:
228
367
  response_data = await self.api_client.call_api(
229
368
  *_param, _request_timeout=_request_timeout
230
369
  )
231
- return response_data.response
370
+ return response_data
371
+
372
+ # Private sync implementation methods
373
+ @validate_call
374
+ def _create_model_sync(
375
+ self,
376
+ model_create: ModelCreate,
377
+ _request_timeout: Union[
378
+ None,
379
+ Annotated[StrictFloat, Field(gt=0)],
380
+ Tuple[
381
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
382
+ ],
383
+ ] = None,
384
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
385
+ _content_type: Optional[StrictStr] = None,
386
+ _headers: Optional[Dict[StrictStr, Any]] = None,
387
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
388
+ ) -> ModelRead:
389
+ """Synchronous version of create_model"""
390
+ return async_to_sync(self._create_model_async)(
391
+ model_create=model_create,
392
+ _request_timeout=_request_timeout,
393
+ _request_auth=_request_auth,
394
+ _content_type=_content_type,
395
+ _headers=_headers,
396
+ _host_index=_host_index,
397
+ )
398
+
399
+ @validate_call
400
+ def _create_model_sync_with_http_info(
401
+ self,
402
+ model_create: ModelCreate,
403
+ _request_timeout: Union[
404
+ None,
405
+ Annotated[StrictFloat, Field(gt=0)],
406
+ Tuple[
407
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
408
+ ],
409
+ ] = None,
410
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
411
+ _content_type: Optional[StrictStr] = None,
412
+ _headers: Optional[Dict[StrictStr, Any]] = None,
413
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
414
+ ) -> ApiResponse[ModelRead]:
415
+ """Synchronous version of create_model_with_http_info"""
416
+ return async_to_sync(self._create_model_async_with_http_info)(
417
+ model_create=model_create,
418
+ _request_timeout=_request_timeout,
419
+ _request_auth=_request_auth,
420
+ _content_type=_content_type,
421
+ _headers=_headers,
422
+ _host_index=_host_index,
423
+ )
424
+
425
+ @validate_call
426
+ def _create_model_sync_without_preload_content(
427
+ self,
428
+ model_create: ModelCreate,
429
+ _request_timeout: Union[
430
+ None,
431
+ Annotated[StrictFloat, Field(gt=0)],
432
+ Tuple[
433
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
434
+ ],
435
+ ] = None,
436
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
437
+ _content_type: Optional[StrictStr] = None,
438
+ _headers: Optional[Dict[StrictStr, Any]] = None,
439
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
440
+ ) -> RESTResponseType:
441
+ """Synchronous version of create_model_without_preload_content"""
442
+ return async_to_sync(self._create_model_async_without_preload_content)(
443
+ model_create=model_create,
444
+ _request_timeout=_request_timeout,
445
+ _request_auth=_request_auth,
446
+ _content_type=_content_type,
447
+ _headers=_headers,
448
+ _host_index=_host_index,
449
+ )
232
450
 
233
451
  def _create_model_serialize(
234
452
  self,
@@ -295,7 +513,128 @@ class ModelsApi:
295
513
  )
296
514
 
297
515
  @validate_call
298
- async def delete_model(
516
+ def delete_model(
517
+ self,
518
+ id: Annotated[StrictInt, Field(description="The ID of the model to delete.")],
519
+ _request_timeout: Union[
520
+ None,
521
+ Annotated[StrictFloat, Field(gt=0)],
522
+ Tuple[
523
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
524
+ ],
525
+ ] = None,
526
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
527
+ _content_type: Optional[StrictStr] = None,
528
+ _headers: Optional[Dict[StrictStr, Any]] = None,
529
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
530
+ ) -> None:
531
+ """Delete Model
532
+
533
+ This method can work in both sync and async modes based on the is_sync flag.
534
+ """
535
+ if self.is_sync:
536
+ return self._delete_model_sync(
537
+ id=id,
538
+ _request_timeout=_request_timeout,
539
+ _request_auth=_request_auth,
540
+ _content_type=_content_type,
541
+ _headers=_headers,
542
+ _host_index=_host_index,
543
+ )
544
+
545
+ else:
546
+ return self._delete_model_async(
547
+ id=id,
548
+ _request_timeout=_request_timeout,
549
+ _request_auth=_request_auth,
550
+ _content_type=_content_type,
551
+ _headers=_headers,
552
+ _host_index=_host_index,
553
+ )
554
+
555
+ @validate_call
556
+ def delete_model_with_http_info(
557
+ self,
558
+ id: Annotated[StrictInt, Field(description="The ID of the model to delete.")],
559
+ _request_timeout: Union[
560
+ None,
561
+ Annotated[StrictFloat, Field(gt=0)],
562
+ Tuple[
563
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
564
+ ],
565
+ ] = None,
566
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
567
+ _content_type: Optional[StrictStr] = None,
568
+ _headers: Optional[Dict[StrictStr, Any]] = None,
569
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
570
+ ) -> ApiResponse[None]:
571
+ """Delete Model with HTTP info
572
+
573
+ This method can work in both sync and async modes based on the is_sync flag.
574
+ """
575
+ if self.is_sync:
576
+ return self._delete_model_sync_with_http_info(
577
+ id=id,
578
+ _request_timeout=_request_timeout,
579
+ _request_auth=_request_auth,
580
+ _content_type=_content_type,
581
+ _headers=_headers,
582
+ _host_index=_host_index,
583
+ )
584
+
585
+ else:
586
+ return self._delete_model_async_with_http_info(
587
+ id=id,
588
+ _request_timeout=_request_timeout,
589
+ _request_auth=_request_auth,
590
+ _content_type=_content_type,
591
+ _headers=_headers,
592
+ _host_index=_host_index,
593
+ )
594
+
595
+ @validate_call
596
+ def delete_model_without_preload_content(
597
+ self,
598
+ id: Annotated[StrictInt, Field(description="The ID of the model to delete.")],
599
+ _request_timeout: Union[
600
+ None,
601
+ Annotated[StrictFloat, Field(gt=0)],
602
+ Tuple[
603
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
604
+ ],
605
+ ] = None,
606
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
607
+ _content_type: Optional[StrictStr] = None,
608
+ _headers: Optional[Dict[StrictStr, Any]] = None,
609
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
610
+ ) -> RESTResponseType:
611
+ """Delete Model without preloading content
612
+
613
+ This method can work in both sync and async modes based on the is_sync flag.
614
+ """
615
+ if self.is_sync:
616
+ return self._delete_model_sync_without_preload_content(
617
+ id=id,
618
+ _request_timeout=_request_timeout,
619
+ _request_auth=_request_auth,
620
+ _content_type=_content_type,
621
+ _headers=_headers,
622
+ _host_index=_host_index,
623
+ )
624
+
625
+ else:
626
+ return self._delete_model_async_without_preload_content(
627
+ id=id,
628
+ _request_timeout=_request_timeout,
629
+ _request_auth=_request_auth,
630
+ _content_type=_content_type,
631
+ _headers=_headers,
632
+ _host_index=_host_index,
633
+ )
634
+
635
+ # Private async implementation methods
636
+ @validate_call
637
+ async def _delete_model_async(
299
638
  self,
300
639
  id: Annotated[StrictInt, Field(description="The ID of the model to delete.")],
301
640
  _request_timeout: Union[
@@ -359,7 +698,7 @@ class ModelsApi:
359
698
  ).data
360
699
 
361
700
  @validate_call
362
- async def delete_model_with_http_info(
701
+ async def _delete_model_async_with_http_info(
363
702
  self,
364
703
  id: Annotated[StrictInt, Field(description="The ID of the model to delete.")],
365
704
  _request_timeout: Union[
@@ -418,12 +757,11 @@ class ModelsApi:
418
757
  )
419
758
  await response_data.read()
420
759
  return self.api_client.response_deserialize(
421
- response_data=response_data,
422
- response_types_map=_response_types_map,
760
+ response_data=response_data, response_types_map=_response_types_map
423
761
  )
424
762
 
425
763
  @validate_call
426
- async def delete_model_without_preload_content(
764
+ async def _delete_model_async_without_preload_content(
427
765
  self,
428
766
  id: Annotated[StrictInt, Field(description="The ID of the model to delete.")],
429
767
  _request_timeout: Union[
@@ -480,26 +818,105 @@ class ModelsApi:
480
818
  response_data = await self.api_client.call_api(
481
819
  *_param, _request_timeout=_request_timeout
482
820
  )
483
- return response_data.response
821
+ return response_data
484
822
 
485
- def _delete_model_serialize(
823
+ # Private sync implementation methods
824
+ @validate_call
825
+ def _delete_model_sync(
486
826
  self,
487
- id,
488
- _request_auth,
489
- _content_type,
490
- _headers,
491
- _host_index,
492
- ) -> RequestSerialized:
493
-
494
- _host = None
827
+ id: Annotated[StrictInt, Field(description="The ID of the model to delete.")],
828
+ _request_timeout: Union[
829
+ None,
830
+ Annotated[StrictFloat, Field(gt=0)],
831
+ Tuple[
832
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
833
+ ],
834
+ ] = None,
835
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
836
+ _content_type: Optional[StrictStr] = None,
837
+ _headers: Optional[Dict[StrictStr, Any]] = None,
838
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
839
+ ) -> None:
840
+ """Synchronous version of delete_model"""
841
+ return async_to_sync(self._delete_model_async)(
842
+ id=id,
843
+ _request_timeout=_request_timeout,
844
+ _request_auth=_request_auth,
845
+ _content_type=_content_type,
846
+ _headers=_headers,
847
+ _host_index=_host_index,
848
+ )
495
849
 
496
- _collection_formats: Dict[str, str] = {}
850
+ @validate_call
851
+ def _delete_model_sync_with_http_info(
852
+ self,
853
+ id: Annotated[StrictInt, Field(description="The ID of the model to delete.")],
854
+ _request_timeout: Union[
855
+ None,
856
+ Annotated[StrictFloat, Field(gt=0)],
857
+ Tuple[
858
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
859
+ ],
860
+ ] = None,
861
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
862
+ _content_type: Optional[StrictStr] = None,
863
+ _headers: Optional[Dict[StrictStr, Any]] = None,
864
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
865
+ ) -> ApiResponse[None]:
866
+ """Synchronous version of delete_model_with_http_info"""
867
+ return async_to_sync(self._delete_model_async_with_http_info)(
868
+ id=id,
869
+ _request_timeout=_request_timeout,
870
+ _request_auth=_request_auth,
871
+ _content_type=_content_type,
872
+ _headers=_headers,
873
+ _host_index=_host_index,
874
+ )
497
875
 
498
- _path_params: Dict[str, str] = {}
499
- _query_params: List[Tuple[str, str]] = []
500
- _header_params: Dict[str, Optional[str]] = _headers or {}
501
- _form_params: List[Tuple[str, str]] = []
502
- _files: Dict[
876
+ @validate_call
877
+ def _delete_model_sync_without_preload_content(
878
+ self,
879
+ id: Annotated[StrictInt, Field(description="The ID of the model to delete.")],
880
+ _request_timeout: Union[
881
+ None,
882
+ Annotated[StrictFloat, Field(gt=0)],
883
+ Tuple[
884
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
885
+ ],
886
+ ] = None,
887
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
888
+ _content_type: Optional[StrictStr] = None,
889
+ _headers: Optional[Dict[StrictStr, Any]] = None,
890
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
891
+ ) -> RESTResponseType:
892
+ """Synchronous version of delete_model_without_preload_content"""
893
+ return async_to_sync(self._delete_model_async_without_preload_content)(
894
+ id=id,
895
+ _request_timeout=_request_timeout,
896
+ _request_auth=_request_auth,
897
+ _content_type=_content_type,
898
+ _headers=_headers,
899
+ _host_index=_host_index,
900
+ )
901
+
902
+ def _delete_model_serialize(
903
+ self,
904
+ id,
905
+ _request_auth,
906
+ _content_type,
907
+ _headers,
908
+ _host_index,
909
+ ) -> RequestSerialized:
910
+
911
+ _host = None
912
+
913
+ _collection_formats: Dict[str, str] = {}
914
+
915
+ _path_params: Dict[str, str] = {}
916
+ _query_params: List[Tuple[str, str]] = []
917
+ _header_params: Dict[str, Optional[str]] = _headers or {}
918
+ _form_params: List[Tuple[str, str]] = []
919
+ _files: Dict[
503
920
  str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
504
921
  ] = {}
505
922
  _body_params: Optional[bytes] = None
@@ -537,7 +954,167 @@ class ModelsApi:
537
954
  )
538
955
 
539
956
  @validate_call
540
- async def evaluate_model(
957
+ def evaluate_model(
958
+ self,
959
+ id: Annotated[
960
+ StrictInt, Field(description="The ID of the model you want to evaluate.")
961
+ ],
962
+ request_body: List[Any],
963
+ version: Annotated[
964
+ Optional[DataVersion],
965
+ Field(
966
+ 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."
967
+ ),
968
+ ] = None,
969
+ _request_timeout: Union[
970
+ None,
971
+ Annotated[StrictFloat, Field(gt=0)],
972
+ Tuple[
973
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
974
+ ],
975
+ ] = None,
976
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
977
+ _content_type: Optional[StrictStr] = None,
978
+ _headers: Optional[Dict[StrictStr, Any]] = None,
979
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
980
+ ) -> EvaluationResponse:
981
+ """Evaluate Model
982
+
983
+ This method can work in both sync and async modes based on the is_sync flag.
984
+ """
985
+ if self.is_sync:
986
+ return self._evaluate_model_sync(
987
+ id=id,
988
+ request_body=request_body,
989
+ version=version,
990
+ _request_timeout=_request_timeout,
991
+ _request_auth=_request_auth,
992
+ _content_type=_content_type,
993
+ _headers=_headers,
994
+ _host_index=_host_index,
995
+ )
996
+
997
+ else:
998
+ return self._evaluate_model_async(
999
+ id=id,
1000
+ request_body=request_body,
1001
+ version=version,
1002
+ _request_timeout=_request_timeout,
1003
+ _request_auth=_request_auth,
1004
+ _content_type=_content_type,
1005
+ _headers=_headers,
1006
+ _host_index=_host_index,
1007
+ )
1008
+
1009
+ @validate_call
1010
+ def evaluate_model_with_http_info(
1011
+ self,
1012
+ id: Annotated[
1013
+ StrictInt, Field(description="The ID of the model you want to evaluate.")
1014
+ ],
1015
+ request_body: List[Any],
1016
+ version: Annotated[
1017
+ Optional[DataVersion],
1018
+ Field(
1019
+ 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."
1020
+ ),
1021
+ ] = None,
1022
+ _request_timeout: Union[
1023
+ None,
1024
+ Annotated[StrictFloat, Field(gt=0)],
1025
+ Tuple[
1026
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1027
+ ],
1028
+ ] = None,
1029
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1030
+ _content_type: Optional[StrictStr] = None,
1031
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1032
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1033
+ ) -> ApiResponse[EvaluationResponse]:
1034
+ """Evaluate Model with HTTP info
1035
+
1036
+ This method can work in both sync and async modes based on the is_sync flag.
1037
+ """
1038
+ if self.is_sync:
1039
+ return self._evaluate_model_sync_with_http_info(
1040
+ id=id,
1041
+ request_body=request_body,
1042
+ version=version,
1043
+ _request_timeout=_request_timeout,
1044
+ _request_auth=_request_auth,
1045
+ _content_type=_content_type,
1046
+ _headers=_headers,
1047
+ _host_index=_host_index,
1048
+ )
1049
+
1050
+ else:
1051
+ return self._evaluate_model_async_with_http_info(
1052
+ id=id,
1053
+ request_body=request_body,
1054
+ version=version,
1055
+ _request_timeout=_request_timeout,
1056
+ _request_auth=_request_auth,
1057
+ _content_type=_content_type,
1058
+ _headers=_headers,
1059
+ _host_index=_host_index,
1060
+ )
1061
+
1062
+ @validate_call
1063
+ def evaluate_model_without_preload_content(
1064
+ self,
1065
+ id: Annotated[
1066
+ StrictInt, Field(description="The ID of the model you want to evaluate.")
1067
+ ],
1068
+ request_body: List[Any],
1069
+ version: Annotated[
1070
+ Optional[DataVersion],
1071
+ Field(
1072
+ 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."
1073
+ ),
1074
+ ] = None,
1075
+ _request_timeout: Union[
1076
+ None,
1077
+ Annotated[StrictFloat, Field(gt=0)],
1078
+ Tuple[
1079
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1080
+ ],
1081
+ ] = None,
1082
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1083
+ _content_type: Optional[StrictStr] = None,
1084
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1085
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1086
+ ) -> RESTResponseType:
1087
+ """Evaluate Model without preloading content
1088
+
1089
+ This method can work in both sync and async modes based on the is_sync flag.
1090
+ """
1091
+ if self.is_sync:
1092
+ return self._evaluate_model_sync_without_preload_content(
1093
+ id=id,
1094
+ request_body=request_body,
1095
+ version=version,
1096
+ _request_timeout=_request_timeout,
1097
+ _request_auth=_request_auth,
1098
+ _content_type=_content_type,
1099
+ _headers=_headers,
1100
+ _host_index=_host_index,
1101
+ )
1102
+
1103
+ else:
1104
+ return self._evaluate_model_async_without_preload_content(
1105
+ id=id,
1106
+ request_body=request_body,
1107
+ version=version,
1108
+ _request_timeout=_request_timeout,
1109
+ _request_auth=_request_auth,
1110
+ _content_type=_content_type,
1111
+ _headers=_headers,
1112
+ _host_index=_host_index,
1113
+ )
1114
+
1115
+ # Private async implementation methods
1116
+ @validate_call
1117
+ async def _evaluate_model_async(
541
1118
  self,
542
1119
  id: Annotated[
543
1120
  StrictInt, Field(description="The ID of the model you want to evaluate.")
@@ -616,7 +1193,7 @@ class ModelsApi:
616
1193
  ).data
617
1194
 
618
1195
  @validate_call
619
- async def evaluate_model_with_http_info(
1196
+ async def _evaluate_model_async_with_http_info(
620
1197
  self,
621
1198
  id: Annotated[
622
1199
  StrictInt, Field(description="The ID of the model you want to evaluate.")
@@ -690,12 +1267,11 @@ class ModelsApi:
690
1267
  )
691
1268
  await response_data.read()
692
1269
  return self.api_client.response_deserialize(
693
- response_data=response_data,
694
- response_types_map=_response_types_map,
1270
+ response_data=response_data, response_types_map=_response_types_map
695
1271
  )
696
1272
 
697
1273
  @validate_call
698
- async def evaluate_model_without_preload_content(
1274
+ async def _evaluate_model_async_without_preload_content(
699
1275
  self,
700
1276
  id: Annotated[
701
1277
  StrictInt, Field(description="The ID of the model you want to evaluate.")
@@ -767,7 +1343,119 @@ class ModelsApi:
767
1343
  response_data = await self.api_client.call_api(
768
1344
  *_param, _request_timeout=_request_timeout
769
1345
  )
770
- return response_data.response
1346
+ return response_data
1347
+
1348
+ # Private sync implementation methods
1349
+ @validate_call
1350
+ def _evaluate_model_sync(
1351
+ self,
1352
+ id: Annotated[
1353
+ StrictInt, Field(description="The ID of the model you want to evaluate.")
1354
+ ],
1355
+ request_body: List[Any],
1356
+ version: Annotated[
1357
+ Optional[DataVersion],
1358
+ Field(
1359
+ 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."
1360
+ ),
1361
+ ] = None,
1362
+ _request_timeout: Union[
1363
+ None,
1364
+ Annotated[StrictFloat, Field(gt=0)],
1365
+ Tuple[
1366
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1367
+ ],
1368
+ ] = None,
1369
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1370
+ _content_type: Optional[StrictStr] = None,
1371
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1372
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1373
+ ) -> EvaluationResponse:
1374
+ """Synchronous version of evaluate_model"""
1375
+ return async_to_sync(self._evaluate_model_async)(
1376
+ id=id,
1377
+ request_body=request_body,
1378
+ version=version,
1379
+ _request_timeout=_request_timeout,
1380
+ _request_auth=_request_auth,
1381
+ _content_type=_content_type,
1382
+ _headers=_headers,
1383
+ _host_index=_host_index,
1384
+ )
1385
+
1386
+ @validate_call
1387
+ def _evaluate_model_sync_with_http_info(
1388
+ self,
1389
+ id: Annotated[
1390
+ StrictInt, Field(description="The ID of the model you want to evaluate.")
1391
+ ],
1392
+ request_body: List[Any],
1393
+ version: Annotated[
1394
+ Optional[DataVersion],
1395
+ Field(
1396
+ 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."
1397
+ ),
1398
+ ] = None,
1399
+ _request_timeout: Union[
1400
+ None,
1401
+ Annotated[StrictFloat, Field(gt=0)],
1402
+ Tuple[
1403
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1404
+ ],
1405
+ ] = None,
1406
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1407
+ _content_type: Optional[StrictStr] = None,
1408
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1409
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1410
+ ) -> ApiResponse[EvaluationResponse]:
1411
+ """Synchronous version of evaluate_model_with_http_info"""
1412
+ return async_to_sync(self._evaluate_model_async_with_http_info)(
1413
+ id=id,
1414
+ request_body=request_body,
1415
+ version=version,
1416
+ _request_timeout=_request_timeout,
1417
+ _request_auth=_request_auth,
1418
+ _content_type=_content_type,
1419
+ _headers=_headers,
1420
+ _host_index=_host_index,
1421
+ )
1422
+
1423
+ @validate_call
1424
+ def _evaluate_model_sync_without_preload_content(
1425
+ self,
1426
+ id: Annotated[
1427
+ StrictInt, Field(description="The ID of the model you want to evaluate.")
1428
+ ],
1429
+ request_body: List[Any],
1430
+ version: Annotated[
1431
+ Optional[DataVersion],
1432
+ Field(
1433
+ 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."
1434
+ ),
1435
+ ] = None,
1436
+ _request_timeout: Union[
1437
+ None,
1438
+ Annotated[StrictFloat, Field(gt=0)],
1439
+ Tuple[
1440
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1441
+ ],
1442
+ ] = None,
1443
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1444
+ _content_type: Optional[StrictStr] = None,
1445
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1446
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1447
+ ) -> RESTResponseType:
1448
+ """Synchronous version of evaluate_model_without_preload_content"""
1449
+ return async_to_sync(self._evaluate_model_async_without_preload_content)(
1450
+ id=id,
1451
+ request_body=request_body,
1452
+ version=version,
1453
+ _request_timeout=_request_timeout,
1454
+ _request_auth=_request_auth,
1455
+ _content_type=_content_type,
1456
+ _headers=_headers,
1457
+ _host_index=_host_index,
1458
+ )
771
1459
 
772
1460
  def _evaluate_model_serialize(
773
1461
  self,
@@ -844,7 +1532,7 @@ class ModelsApi:
844
1532
  )
845
1533
 
846
1534
  @validate_call
847
- async def get_model(
1535
+ def get_model(
848
1536
  self,
849
1537
  id: Annotated[StrictInt, Field(description="The ID of the model to retrieve.")],
850
1538
  _request_timeout: Union[
@@ -861,31 +1549,152 @@ class ModelsApi:
861
1549
  ) -> ModelRead:
862
1550
  """Get Model
863
1551
 
864
- Get a model by ID
865
-
866
- :param id: The ID of the model to retrieve. (required)
867
- :type id: int
868
- :param _request_timeout: timeout setting for this request. If one
869
- number provided, it will be total request
870
- timeout. It can also be a pair (tuple) of
871
- (connection, read) timeouts.
872
- :type _request_timeout: int, tuple(int, int), optional
873
- :param _request_auth: set to override the auth_settings for an a single
874
- request; this effectively ignores the
875
- authentication in the spec for a single request.
876
- :type _request_auth: dict, optional
877
- :param _content_type: force content-type for the request.
878
- :type _content_type: str, Optional
879
- :param _headers: set to override the headers for a single
880
- request; this effectively ignores the headers
881
- in the spec for a single request.
882
- :type _headers: dict, optional
883
- :param _host_index: set to override the host_index for a single
884
- request; this effectively ignores the host_index
885
- in the spec for a single request.
886
- :type _host_index: int, optional
887
- :return: Returns the result object.
888
- """ # noqa: E501
1552
+ This method can work in both sync and async modes based on the is_sync flag.
1553
+ """
1554
+ if self.is_sync:
1555
+ return self._get_model_sync(
1556
+ id=id,
1557
+ _request_timeout=_request_timeout,
1558
+ _request_auth=_request_auth,
1559
+ _content_type=_content_type,
1560
+ _headers=_headers,
1561
+ _host_index=_host_index,
1562
+ )
1563
+
1564
+ else:
1565
+ return self._get_model_async(
1566
+ id=id,
1567
+ _request_timeout=_request_timeout,
1568
+ _request_auth=_request_auth,
1569
+ _content_type=_content_type,
1570
+ _headers=_headers,
1571
+ _host_index=_host_index,
1572
+ )
1573
+
1574
+ @validate_call
1575
+ def get_model_with_http_info(
1576
+ self,
1577
+ id: Annotated[StrictInt, Field(description="The ID of the model to retrieve.")],
1578
+ _request_timeout: Union[
1579
+ None,
1580
+ Annotated[StrictFloat, Field(gt=0)],
1581
+ Tuple[
1582
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1583
+ ],
1584
+ ] = None,
1585
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1586
+ _content_type: Optional[StrictStr] = None,
1587
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1588
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1589
+ ) -> ApiResponse[ModelRead]:
1590
+ """Get Model with HTTP info
1591
+
1592
+ This method can work in both sync and async modes based on the is_sync flag.
1593
+ """
1594
+ if self.is_sync:
1595
+ return self._get_model_sync_with_http_info(
1596
+ id=id,
1597
+ _request_timeout=_request_timeout,
1598
+ _request_auth=_request_auth,
1599
+ _content_type=_content_type,
1600
+ _headers=_headers,
1601
+ _host_index=_host_index,
1602
+ )
1603
+
1604
+ else:
1605
+ return self._get_model_async_with_http_info(
1606
+ id=id,
1607
+ _request_timeout=_request_timeout,
1608
+ _request_auth=_request_auth,
1609
+ _content_type=_content_type,
1610
+ _headers=_headers,
1611
+ _host_index=_host_index,
1612
+ )
1613
+
1614
+ @validate_call
1615
+ def get_model_without_preload_content(
1616
+ self,
1617
+ id: Annotated[StrictInt, Field(description="The ID of the model to retrieve.")],
1618
+ _request_timeout: Union[
1619
+ None,
1620
+ Annotated[StrictFloat, Field(gt=0)],
1621
+ Tuple[
1622
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1623
+ ],
1624
+ ] = None,
1625
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1626
+ _content_type: Optional[StrictStr] = None,
1627
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1628
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1629
+ ) -> RESTResponseType:
1630
+ """Get Model without preloading content
1631
+
1632
+ This method can work in both sync and async modes based on the is_sync flag.
1633
+ """
1634
+ if self.is_sync:
1635
+ return self._get_model_sync_without_preload_content(
1636
+ id=id,
1637
+ _request_timeout=_request_timeout,
1638
+ _request_auth=_request_auth,
1639
+ _content_type=_content_type,
1640
+ _headers=_headers,
1641
+ _host_index=_host_index,
1642
+ )
1643
+
1644
+ else:
1645
+ return self._get_model_async_without_preload_content(
1646
+ id=id,
1647
+ _request_timeout=_request_timeout,
1648
+ _request_auth=_request_auth,
1649
+ _content_type=_content_type,
1650
+ _headers=_headers,
1651
+ _host_index=_host_index,
1652
+ )
1653
+
1654
+ # Private async implementation methods
1655
+ @validate_call
1656
+ async def _get_model_async(
1657
+ self,
1658
+ id: Annotated[StrictInt, Field(description="The ID of the model to retrieve.")],
1659
+ _request_timeout: Union[
1660
+ None,
1661
+ Annotated[StrictFloat, Field(gt=0)],
1662
+ Tuple[
1663
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1664
+ ],
1665
+ ] = None,
1666
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1667
+ _content_type: Optional[StrictStr] = None,
1668
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1669
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1670
+ ) -> ModelRead:
1671
+ """Get Model
1672
+
1673
+ Get a model by ID
1674
+
1675
+ :param id: The ID of the model to retrieve. (required)
1676
+ :type id: int
1677
+ :param _request_timeout: timeout setting for this request. If one
1678
+ number provided, it will be total request
1679
+ timeout. It can also be a pair (tuple) of
1680
+ (connection, read) timeouts.
1681
+ :type _request_timeout: int, tuple(int, int), optional
1682
+ :param _request_auth: set to override the auth_settings for an a single
1683
+ request; this effectively ignores the
1684
+ authentication in the spec for a single request.
1685
+ :type _request_auth: dict, optional
1686
+ :param _content_type: force content-type for the request.
1687
+ :type _content_type: str, Optional
1688
+ :param _headers: set to override the headers for a single
1689
+ request; this effectively ignores the headers
1690
+ in the spec for a single request.
1691
+ :type _headers: dict, optional
1692
+ :param _host_index: set to override the host_index for a single
1693
+ request; this effectively ignores the host_index
1694
+ in the spec for a single request.
1695
+ :type _host_index: int, optional
1696
+ :return: Returns the result object.
1697
+ """ # noqa: E501
889
1698
 
890
1699
  _param = self._get_model_serialize(
891
1700
  id=id,
@@ -908,7 +1717,7 @@ class ModelsApi:
908
1717
  ).data
909
1718
 
910
1719
  @validate_call
911
- async def get_model_with_http_info(
1720
+ async def _get_model_async_with_http_info(
912
1721
  self,
913
1722
  id: Annotated[StrictInt, Field(description="The ID of the model to retrieve.")],
914
1723
  _request_timeout: Union[
@@ -967,12 +1776,11 @@ class ModelsApi:
967
1776
  )
968
1777
  await response_data.read()
969
1778
  return self.api_client.response_deserialize(
970
- response_data=response_data,
971
- response_types_map=_response_types_map,
1779
+ response_data=response_data, response_types_map=_response_types_map
972
1780
  )
973
1781
 
974
1782
  @validate_call
975
- async def get_model_without_preload_content(
1783
+ async def _get_model_async_without_preload_content(
976
1784
  self,
977
1785
  id: Annotated[StrictInt, Field(description="The ID of the model to retrieve.")],
978
1786
  _request_timeout: Union[
@@ -1029,7 +1837,86 @@ class ModelsApi:
1029
1837
  response_data = await self.api_client.call_api(
1030
1838
  *_param, _request_timeout=_request_timeout
1031
1839
  )
1032
- return response_data.response
1840
+ return response_data
1841
+
1842
+ # Private sync implementation methods
1843
+ @validate_call
1844
+ def _get_model_sync(
1845
+ self,
1846
+ id: Annotated[StrictInt, Field(description="The ID of the model to retrieve.")],
1847
+ _request_timeout: Union[
1848
+ None,
1849
+ Annotated[StrictFloat, Field(gt=0)],
1850
+ Tuple[
1851
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1852
+ ],
1853
+ ] = None,
1854
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1855
+ _content_type: Optional[StrictStr] = None,
1856
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1857
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1858
+ ) -> ModelRead:
1859
+ """Synchronous version of get_model"""
1860
+ return async_to_sync(self._get_model_async)(
1861
+ id=id,
1862
+ _request_timeout=_request_timeout,
1863
+ _request_auth=_request_auth,
1864
+ _content_type=_content_type,
1865
+ _headers=_headers,
1866
+ _host_index=_host_index,
1867
+ )
1868
+
1869
+ @validate_call
1870
+ def _get_model_sync_with_http_info(
1871
+ self,
1872
+ id: Annotated[StrictInt, Field(description="The ID of the model to retrieve.")],
1873
+ _request_timeout: Union[
1874
+ None,
1875
+ Annotated[StrictFloat, Field(gt=0)],
1876
+ Tuple[
1877
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1878
+ ],
1879
+ ] = None,
1880
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1881
+ _content_type: Optional[StrictStr] = None,
1882
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1883
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1884
+ ) -> ApiResponse[ModelRead]:
1885
+ """Synchronous version of get_model_with_http_info"""
1886
+ return async_to_sync(self._get_model_async_with_http_info)(
1887
+ id=id,
1888
+ _request_timeout=_request_timeout,
1889
+ _request_auth=_request_auth,
1890
+ _content_type=_content_type,
1891
+ _headers=_headers,
1892
+ _host_index=_host_index,
1893
+ )
1894
+
1895
+ @validate_call
1896
+ def _get_model_sync_without_preload_content(
1897
+ self,
1898
+ id: Annotated[StrictInt, Field(description="The ID of the model to retrieve.")],
1899
+ _request_timeout: Union[
1900
+ None,
1901
+ Annotated[StrictFloat, Field(gt=0)],
1902
+ Tuple[
1903
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1904
+ ],
1905
+ ] = None,
1906
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1907
+ _content_type: Optional[StrictStr] = None,
1908
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1909
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1910
+ ) -> RESTResponseType:
1911
+ """Synchronous version of get_model_without_preload_content"""
1912
+ return async_to_sync(self._get_model_async_without_preload_content)(
1913
+ id=id,
1914
+ _request_timeout=_request_timeout,
1915
+ _request_auth=_request_auth,
1916
+ _content_type=_content_type,
1917
+ _headers=_headers,
1918
+ _host_index=_host_index,
1919
+ )
1033
1920
 
1034
1921
  def _get_model_serialize(
1035
1922
  self,
@@ -1086,7 +1973,128 @@ class ModelsApi:
1086
1973
  )
1087
1974
 
1088
1975
  @validate_call
1089
- async def get_model_by_name(
1976
+ def get_model_by_name(
1977
+ self,
1978
+ name: Annotated[StrictStr, Field(description="The name of the model to get.")],
1979
+ _request_timeout: Union[
1980
+ None,
1981
+ Annotated[StrictFloat, Field(gt=0)],
1982
+ Tuple[
1983
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1984
+ ],
1985
+ ] = None,
1986
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1987
+ _content_type: Optional[StrictStr] = None,
1988
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1989
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1990
+ ) -> ModelRead:
1991
+ """Get Model By Name
1992
+
1993
+ This method can work in both sync and async modes based on the is_sync flag.
1994
+ """
1995
+ if self.is_sync:
1996
+ return self._get_model_by_name_sync(
1997
+ name=name,
1998
+ _request_timeout=_request_timeout,
1999
+ _request_auth=_request_auth,
2000
+ _content_type=_content_type,
2001
+ _headers=_headers,
2002
+ _host_index=_host_index,
2003
+ )
2004
+
2005
+ else:
2006
+ return self._get_model_by_name_async(
2007
+ name=name,
2008
+ _request_timeout=_request_timeout,
2009
+ _request_auth=_request_auth,
2010
+ _content_type=_content_type,
2011
+ _headers=_headers,
2012
+ _host_index=_host_index,
2013
+ )
2014
+
2015
+ @validate_call
2016
+ def get_model_by_name_with_http_info(
2017
+ self,
2018
+ name: Annotated[StrictStr, Field(description="The name of the model to get.")],
2019
+ _request_timeout: Union[
2020
+ None,
2021
+ Annotated[StrictFloat, Field(gt=0)],
2022
+ Tuple[
2023
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2024
+ ],
2025
+ ] = None,
2026
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2027
+ _content_type: Optional[StrictStr] = None,
2028
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2029
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2030
+ ) -> ApiResponse[ModelRead]:
2031
+ """Get Model By Name with HTTP info
2032
+
2033
+ This method can work in both sync and async modes based on the is_sync flag.
2034
+ """
2035
+ if self.is_sync:
2036
+ return self._get_model_by_name_sync_with_http_info(
2037
+ name=name,
2038
+ _request_timeout=_request_timeout,
2039
+ _request_auth=_request_auth,
2040
+ _content_type=_content_type,
2041
+ _headers=_headers,
2042
+ _host_index=_host_index,
2043
+ )
2044
+
2045
+ else:
2046
+ return self._get_model_by_name_async_with_http_info(
2047
+ name=name,
2048
+ _request_timeout=_request_timeout,
2049
+ _request_auth=_request_auth,
2050
+ _content_type=_content_type,
2051
+ _headers=_headers,
2052
+ _host_index=_host_index,
2053
+ )
2054
+
2055
+ @validate_call
2056
+ def get_model_by_name_without_preload_content(
2057
+ self,
2058
+ name: Annotated[StrictStr, Field(description="The name of the model to get.")],
2059
+ _request_timeout: Union[
2060
+ None,
2061
+ Annotated[StrictFloat, Field(gt=0)],
2062
+ Tuple[
2063
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2064
+ ],
2065
+ ] = None,
2066
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2067
+ _content_type: Optional[StrictStr] = None,
2068
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2069
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2070
+ ) -> RESTResponseType:
2071
+ """Get Model By Name without preloading content
2072
+
2073
+ This method can work in both sync and async modes based on the is_sync flag.
2074
+ """
2075
+ if self.is_sync:
2076
+ return self._get_model_by_name_sync_without_preload_content(
2077
+ name=name,
2078
+ _request_timeout=_request_timeout,
2079
+ _request_auth=_request_auth,
2080
+ _content_type=_content_type,
2081
+ _headers=_headers,
2082
+ _host_index=_host_index,
2083
+ )
2084
+
2085
+ else:
2086
+ return self._get_model_by_name_async_without_preload_content(
2087
+ name=name,
2088
+ _request_timeout=_request_timeout,
2089
+ _request_auth=_request_auth,
2090
+ _content_type=_content_type,
2091
+ _headers=_headers,
2092
+ _host_index=_host_index,
2093
+ )
2094
+
2095
+ # Private async implementation methods
2096
+ @validate_call
2097
+ async def _get_model_by_name_async(
1090
2098
  self,
1091
2099
  name: Annotated[StrictStr, Field(description="The name of the model to get.")],
1092
2100
  _request_timeout: Union[
@@ -1150,7 +2158,7 @@ class ModelsApi:
1150
2158
  ).data
1151
2159
 
1152
2160
  @validate_call
1153
- async def get_model_by_name_with_http_info(
2161
+ async def _get_model_by_name_async_with_http_info(
1154
2162
  self,
1155
2163
  name: Annotated[StrictStr, Field(description="The name of the model to get.")],
1156
2164
  _request_timeout: Union[
@@ -1209,12 +2217,11 @@ class ModelsApi:
1209
2217
  )
1210
2218
  await response_data.read()
1211
2219
  return self.api_client.response_deserialize(
1212
- response_data=response_data,
1213
- response_types_map=_response_types_map,
2220
+ response_data=response_data, response_types_map=_response_types_map
1214
2221
  )
1215
2222
 
1216
2223
  @validate_call
1217
- async def get_model_by_name_without_preload_content(
2224
+ async def _get_model_by_name_async_without_preload_content(
1218
2225
  self,
1219
2226
  name: Annotated[StrictStr, Field(description="The name of the model to get.")],
1220
2227
  _request_timeout: Union[
@@ -1271,7 +2278,86 @@ class ModelsApi:
1271
2278
  response_data = await self.api_client.call_api(
1272
2279
  *_param, _request_timeout=_request_timeout
1273
2280
  )
1274
- return response_data.response
2281
+ return response_data
2282
+
2283
+ # Private sync implementation methods
2284
+ @validate_call
2285
+ def _get_model_by_name_sync(
2286
+ self,
2287
+ name: Annotated[StrictStr, Field(description="The name of the model to get.")],
2288
+ _request_timeout: Union[
2289
+ None,
2290
+ Annotated[StrictFloat, Field(gt=0)],
2291
+ Tuple[
2292
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2293
+ ],
2294
+ ] = None,
2295
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2296
+ _content_type: Optional[StrictStr] = None,
2297
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2298
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2299
+ ) -> ModelRead:
2300
+ """Synchronous version of get_model_by_name"""
2301
+ return async_to_sync(self._get_model_by_name_async)(
2302
+ name=name,
2303
+ _request_timeout=_request_timeout,
2304
+ _request_auth=_request_auth,
2305
+ _content_type=_content_type,
2306
+ _headers=_headers,
2307
+ _host_index=_host_index,
2308
+ )
2309
+
2310
+ @validate_call
2311
+ def _get_model_by_name_sync_with_http_info(
2312
+ self,
2313
+ name: Annotated[StrictStr, Field(description="The name of the model to get.")],
2314
+ _request_timeout: Union[
2315
+ None,
2316
+ Annotated[StrictFloat, Field(gt=0)],
2317
+ Tuple[
2318
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2319
+ ],
2320
+ ] = None,
2321
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2322
+ _content_type: Optional[StrictStr] = None,
2323
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2324
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2325
+ ) -> ApiResponse[ModelRead]:
2326
+ """Synchronous version of get_model_by_name_with_http_info"""
2327
+ return async_to_sync(self._get_model_by_name_async_with_http_info)(
2328
+ name=name,
2329
+ _request_timeout=_request_timeout,
2330
+ _request_auth=_request_auth,
2331
+ _content_type=_content_type,
2332
+ _headers=_headers,
2333
+ _host_index=_host_index,
2334
+ )
2335
+
2336
+ @validate_call
2337
+ def _get_model_by_name_sync_without_preload_content(
2338
+ self,
2339
+ name: Annotated[StrictStr, Field(description="The name of the model to get.")],
2340
+ _request_timeout: Union[
2341
+ None,
2342
+ Annotated[StrictFloat, Field(gt=0)],
2343
+ Tuple[
2344
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2345
+ ],
2346
+ ] = None,
2347
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2348
+ _content_type: Optional[StrictStr] = None,
2349
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2350
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2351
+ ) -> RESTResponseType:
2352
+ """Synchronous version of get_model_by_name_without_preload_content"""
2353
+ return async_to_sync(self._get_model_by_name_async_without_preload_content)(
2354
+ name=name,
2355
+ _request_timeout=_request_timeout,
2356
+ _request_auth=_request_auth,
2357
+ _content_type=_content_type,
2358
+ _headers=_headers,
2359
+ _host_index=_host_index,
2360
+ )
1275
2361
 
1276
2362
  def _get_model_by_name_serialize(
1277
2363
  self,
@@ -1328,7 +2414,167 @@ class ModelsApi:
1328
2414
  )
1329
2415
 
1330
2416
  @validate_call
1331
- async def get_models(
2417
+ def get_models(
2418
+ self,
2419
+ by_user: Annotated[
2420
+ Optional[StrictBool],
2421
+ Field(
2422
+ description="Whether to get models by a specific user. Else all models are returned."
2423
+ ),
2424
+ ] = None,
2425
+ user_id: Annotated[
2426
+ Optional[StrictStr],
2427
+ Field(
2428
+ description="The ID of the user to get models for. Only used if `by_user` is true. Default is current user."
2429
+ ),
2430
+ ] = None,
2431
+ _request_timeout: Union[
2432
+ None,
2433
+ Annotated[StrictFloat, Field(gt=0)],
2434
+ Tuple[
2435
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2436
+ ],
2437
+ ] = None,
2438
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2439
+ _content_type: Optional[StrictStr] = None,
2440
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2441
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2442
+ ) -> List[ModelRead]:
2443
+ """Get All Models
2444
+
2445
+ This method can work in both sync and async modes based on the is_sync flag.
2446
+ """
2447
+ if self.is_sync:
2448
+ return self._get_models_sync(
2449
+ by_user=by_user,
2450
+ user_id=user_id,
2451
+ _request_timeout=_request_timeout,
2452
+ _request_auth=_request_auth,
2453
+ _content_type=_content_type,
2454
+ _headers=_headers,
2455
+ _host_index=_host_index,
2456
+ )
2457
+
2458
+ else:
2459
+ return self._get_models_async(
2460
+ by_user=by_user,
2461
+ user_id=user_id,
2462
+ _request_timeout=_request_timeout,
2463
+ _request_auth=_request_auth,
2464
+ _content_type=_content_type,
2465
+ _headers=_headers,
2466
+ _host_index=_host_index,
2467
+ )
2468
+
2469
+ @validate_call
2470
+ def get_models_with_http_info(
2471
+ self,
2472
+ by_user: Annotated[
2473
+ Optional[StrictBool],
2474
+ Field(
2475
+ description="Whether to get models by a specific user. Else all models are returned."
2476
+ ),
2477
+ ] = None,
2478
+ user_id: Annotated[
2479
+ Optional[StrictStr],
2480
+ Field(
2481
+ description="The ID of the user to get models for. Only used if `by_user` is true. Default is current user."
2482
+ ),
2483
+ ] = None,
2484
+ _request_timeout: Union[
2485
+ None,
2486
+ Annotated[StrictFloat, Field(gt=0)],
2487
+ Tuple[
2488
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2489
+ ],
2490
+ ] = None,
2491
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2492
+ _content_type: Optional[StrictStr] = None,
2493
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2494
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2495
+ ) -> ApiResponse[List[ModelRead]]:
2496
+ """Get All Models with HTTP info
2497
+
2498
+ This method can work in both sync and async modes based on the is_sync flag.
2499
+ """
2500
+ if self.is_sync:
2501
+ return self._get_models_sync_with_http_info(
2502
+ by_user=by_user,
2503
+ user_id=user_id,
2504
+ _request_timeout=_request_timeout,
2505
+ _request_auth=_request_auth,
2506
+ _content_type=_content_type,
2507
+ _headers=_headers,
2508
+ _host_index=_host_index,
2509
+ )
2510
+
2511
+ else:
2512
+ return self._get_models_async_with_http_info(
2513
+ by_user=by_user,
2514
+ user_id=user_id,
2515
+ _request_timeout=_request_timeout,
2516
+ _request_auth=_request_auth,
2517
+ _content_type=_content_type,
2518
+ _headers=_headers,
2519
+ _host_index=_host_index,
2520
+ )
2521
+
2522
+ @validate_call
2523
+ def get_models_without_preload_content(
2524
+ self,
2525
+ by_user: Annotated[
2526
+ Optional[StrictBool],
2527
+ Field(
2528
+ description="Whether to get models by a specific user. Else all models are returned."
2529
+ ),
2530
+ ] = None,
2531
+ user_id: Annotated[
2532
+ Optional[StrictStr],
2533
+ Field(
2534
+ description="The ID of the user to get models for. Only used if `by_user` is true. Default is current user."
2535
+ ),
2536
+ ] = None,
2537
+ _request_timeout: Union[
2538
+ None,
2539
+ Annotated[StrictFloat, Field(gt=0)],
2540
+ Tuple[
2541
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2542
+ ],
2543
+ ] = None,
2544
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2545
+ _content_type: Optional[StrictStr] = None,
2546
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2547
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2548
+ ) -> RESTResponseType:
2549
+ """Get All Models without preloading content
2550
+
2551
+ This method can work in both sync and async modes based on the is_sync flag.
2552
+ """
2553
+ if self.is_sync:
2554
+ return self._get_models_sync_without_preload_content(
2555
+ by_user=by_user,
2556
+ user_id=user_id,
2557
+ _request_timeout=_request_timeout,
2558
+ _request_auth=_request_auth,
2559
+ _content_type=_content_type,
2560
+ _headers=_headers,
2561
+ _host_index=_host_index,
2562
+ )
2563
+
2564
+ else:
2565
+ return self._get_models_async_without_preload_content(
2566
+ by_user=by_user,
2567
+ user_id=user_id,
2568
+ _request_timeout=_request_timeout,
2569
+ _request_auth=_request_auth,
2570
+ _content_type=_content_type,
2571
+ _headers=_headers,
2572
+ _host_index=_host_index,
2573
+ )
2574
+
2575
+ # Private async implementation methods
2576
+ @validate_call
2577
+ async def _get_models_async(
1332
2578
  self,
1333
2579
  by_user: Annotated[
1334
2580
  Optional[StrictBool],
@@ -1406,7 +2652,7 @@ class ModelsApi:
1406
2652
  ).data
1407
2653
 
1408
2654
  @validate_call
1409
- async def get_models_with_http_info(
2655
+ async def _get_models_async_with_http_info(
1410
2656
  self,
1411
2657
  by_user: Annotated[
1412
2658
  Optional[StrictBool],
@@ -1479,12 +2725,11 @@ class ModelsApi:
1479
2725
  )
1480
2726
  await response_data.read()
1481
2727
  return self.api_client.response_deserialize(
1482
- response_data=response_data,
1483
- response_types_map=_response_types_map,
2728
+ response_data=response_data, response_types_map=_response_types_map
1484
2729
  )
1485
2730
 
1486
2731
  @validate_call
1487
- async def get_models_without_preload_content(
2732
+ async def _get_models_async_without_preload_content(
1488
2733
  self,
1489
2734
  by_user: Annotated[
1490
2735
  Optional[StrictBool],
@@ -1555,7 +2800,122 @@ class ModelsApi:
1555
2800
  response_data = await self.api_client.call_api(
1556
2801
  *_param, _request_timeout=_request_timeout
1557
2802
  )
1558
- return response_data.response
2803
+ return response_data
2804
+
2805
+ # Private sync implementation methods
2806
+ @validate_call
2807
+ def _get_models_sync(
2808
+ self,
2809
+ by_user: Annotated[
2810
+ Optional[StrictBool],
2811
+ Field(
2812
+ description="Whether to get models by a specific user. Else all models are returned."
2813
+ ),
2814
+ ] = None,
2815
+ user_id: Annotated[
2816
+ Optional[StrictStr],
2817
+ Field(
2818
+ description="The ID of the user to get models for. Only used if `by_user` is true. Default is current user."
2819
+ ),
2820
+ ] = None,
2821
+ _request_timeout: Union[
2822
+ None,
2823
+ Annotated[StrictFloat, Field(gt=0)],
2824
+ Tuple[
2825
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2826
+ ],
2827
+ ] = None,
2828
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2829
+ _content_type: Optional[StrictStr] = None,
2830
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2831
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2832
+ ) -> List[ModelRead]:
2833
+ """Synchronous version of get_models"""
2834
+ return async_to_sync(self._get_models_async)(
2835
+ by_user=by_user,
2836
+ user_id=user_id,
2837
+ _request_timeout=_request_timeout,
2838
+ _request_auth=_request_auth,
2839
+ _content_type=_content_type,
2840
+ _headers=_headers,
2841
+ _host_index=_host_index,
2842
+ )
2843
+
2844
+ @validate_call
2845
+ def _get_models_sync_with_http_info(
2846
+ self,
2847
+ by_user: Annotated[
2848
+ Optional[StrictBool],
2849
+ Field(
2850
+ description="Whether to get models by a specific user. Else all models are returned."
2851
+ ),
2852
+ ] = None,
2853
+ user_id: Annotated[
2854
+ Optional[StrictStr],
2855
+ Field(
2856
+ description="The ID of the user to get models for. Only used if `by_user` is true. Default is current user."
2857
+ ),
2858
+ ] = None,
2859
+ _request_timeout: Union[
2860
+ None,
2861
+ Annotated[StrictFloat, Field(gt=0)],
2862
+ Tuple[
2863
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2864
+ ],
2865
+ ] = None,
2866
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2867
+ _content_type: Optional[StrictStr] = None,
2868
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2869
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2870
+ ) -> ApiResponse[List[ModelRead]]:
2871
+ """Synchronous version of get_models_with_http_info"""
2872
+ return async_to_sync(self._get_models_async_with_http_info)(
2873
+ by_user=by_user,
2874
+ user_id=user_id,
2875
+ _request_timeout=_request_timeout,
2876
+ _request_auth=_request_auth,
2877
+ _content_type=_content_type,
2878
+ _headers=_headers,
2879
+ _host_index=_host_index,
2880
+ )
2881
+
2882
+ @validate_call
2883
+ def _get_models_sync_without_preload_content(
2884
+ self,
2885
+ by_user: Annotated[
2886
+ Optional[StrictBool],
2887
+ Field(
2888
+ description="Whether to get models by a specific user. Else all models are returned."
2889
+ ),
2890
+ ] = None,
2891
+ user_id: Annotated[
2892
+ Optional[StrictStr],
2893
+ Field(
2894
+ description="The ID of the user to get models for. Only used if `by_user` is true. Default is current user."
2895
+ ),
2896
+ ] = None,
2897
+ _request_timeout: Union[
2898
+ None,
2899
+ Annotated[StrictFloat, Field(gt=0)],
2900
+ Tuple[
2901
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2902
+ ],
2903
+ ] = None,
2904
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2905
+ _content_type: Optional[StrictStr] = None,
2906
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2907
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2908
+ ) -> RESTResponseType:
2909
+ """Synchronous version of get_models_without_preload_content"""
2910
+ return async_to_sync(self._get_models_async_without_preload_content)(
2911
+ by_user=by_user,
2912
+ user_id=user_id,
2913
+ _request_timeout=_request_timeout,
2914
+ _request_auth=_request_auth,
2915
+ _content_type=_content_type,
2916
+ _headers=_headers,
2917
+ _host_index=_host_index,
2918
+ )
1559
2919
 
1560
2920
  def _get_models_serialize(
1561
2921
  self,
@@ -1619,7 +2979,137 @@ class ModelsApi:
1619
2979
  )
1620
2980
 
1621
2981
  @validate_call
1622
- async def update_model(
2982
+ def update_model(
2983
+ self,
2984
+ id: Annotated[StrictInt, Field(description="The ID of the model to update.")],
2985
+ model_update: ModelUpdate,
2986
+ _request_timeout: Union[
2987
+ None,
2988
+ Annotated[StrictFloat, Field(gt=0)],
2989
+ Tuple[
2990
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2991
+ ],
2992
+ ] = None,
2993
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2994
+ _content_type: Optional[StrictStr] = None,
2995
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2996
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2997
+ ) -> object:
2998
+ """Update Model
2999
+
3000
+ This method can work in both sync and async modes based on the is_sync flag.
3001
+ """
3002
+ if self.is_sync:
3003
+ return self._update_model_sync(
3004
+ id=id,
3005
+ model_update=model_update,
3006
+ _request_timeout=_request_timeout,
3007
+ _request_auth=_request_auth,
3008
+ _content_type=_content_type,
3009
+ _headers=_headers,
3010
+ _host_index=_host_index,
3011
+ )
3012
+
3013
+ else:
3014
+ return self._update_model_async(
3015
+ id=id,
3016
+ model_update=model_update,
3017
+ _request_timeout=_request_timeout,
3018
+ _request_auth=_request_auth,
3019
+ _content_type=_content_type,
3020
+ _headers=_headers,
3021
+ _host_index=_host_index,
3022
+ )
3023
+
3024
+ @validate_call
3025
+ def update_model_with_http_info(
3026
+ self,
3027
+ id: Annotated[StrictInt, Field(description="The ID of the model to update.")],
3028
+ model_update: ModelUpdate,
3029
+ _request_timeout: Union[
3030
+ None,
3031
+ Annotated[StrictFloat, Field(gt=0)],
3032
+ Tuple[
3033
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
3034
+ ],
3035
+ ] = None,
3036
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3037
+ _content_type: Optional[StrictStr] = None,
3038
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3039
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3040
+ ) -> ApiResponse[object]:
3041
+ """Update Model with HTTP info
3042
+
3043
+ This method can work in both sync and async modes based on the is_sync flag.
3044
+ """
3045
+ if self.is_sync:
3046
+ return self._update_model_sync_with_http_info(
3047
+ id=id,
3048
+ model_update=model_update,
3049
+ _request_timeout=_request_timeout,
3050
+ _request_auth=_request_auth,
3051
+ _content_type=_content_type,
3052
+ _headers=_headers,
3053
+ _host_index=_host_index,
3054
+ )
3055
+
3056
+ else:
3057
+ return self._update_model_async_with_http_info(
3058
+ id=id,
3059
+ model_update=model_update,
3060
+ _request_timeout=_request_timeout,
3061
+ _request_auth=_request_auth,
3062
+ _content_type=_content_type,
3063
+ _headers=_headers,
3064
+ _host_index=_host_index,
3065
+ )
3066
+
3067
+ @validate_call
3068
+ def update_model_without_preload_content(
3069
+ self,
3070
+ id: Annotated[StrictInt, Field(description="The ID of the model to update.")],
3071
+ model_update: ModelUpdate,
3072
+ _request_timeout: Union[
3073
+ None,
3074
+ Annotated[StrictFloat, Field(gt=0)],
3075
+ Tuple[
3076
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
3077
+ ],
3078
+ ] = None,
3079
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3080
+ _content_type: Optional[StrictStr] = None,
3081
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3082
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3083
+ ) -> RESTResponseType:
3084
+ """Update Model without preloading content
3085
+
3086
+ This method can work in both sync and async modes based on the is_sync flag.
3087
+ """
3088
+ if self.is_sync:
3089
+ return self._update_model_sync_without_preload_content(
3090
+ id=id,
3091
+ model_update=model_update,
3092
+ _request_timeout=_request_timeout,
3093
+ _request_auth=_request_auth,
3094
+ _content_type=_content_type,
3095
+ _headers=_headers,
3096
+ _host_index=_host_index,
3097
+ )
3098
+
3099
+ else:
3100
+ return self._update_model_async_without_preload_content(
3101
+ id=id,
3102
+ model_update=model_update,
3103
+ _request_timeout=_request_timeout,
3104
+ _request_auth=_request_auth,
3105
+ _content_type=_content_type,
3106
+ _headers=_headers,
3107
+ _host_index=_host_index,
3108
+ )
3109
+
3110
+ # Private async implementation methods
3111
+ @validate_call
3112
+ async def _update_model_async(
1623
3113
  self,
1624
3114
  id: Annotated[StrictInt, Field(description="The ID of the model to update.")],
1625
3115
  model_update: ModelUpdate,
@@ -1687,7 +3177,7 @@ class ModelsApi:
1687
3177
  ).data
1688
3178
 
1689
3179
  @validate_call
1690
- async def update_model_with_http_info(
3180
+ async def _update_model_async_with_http_info(
1691
3181
  self,
1692
3182
  id: Annotated[StrictInt, Field(description="The ID of the model to update.")],
1693
3183
  model_update: ModelUpdate,
@@ -1750,12 +3240,11 @@ class ModelsApi:
1750
3240
  )
1751
3241
  await response_data.read()
1752
3242
  return self.api_client.response_deserialize(
1753
- response_data=response_data,
1754
- response_types_map=_response_types_map,
3243
+ response_data=response_data, response_types_map=_response_types_map
1755
3244
  )
1756
3245
 
1757
3246
  @validate_call
1758
- async def update_model_without_preload_content(
3247
+ async def _update_model_async_without_preload_content(
1759
3248
  self,
1760
3249
  id: Annotated[StrictInt, Field(description="The ID of the model to update.")],
1761
3250
  model_update: ModelUpdate,
@@ -1816,7 +3305,92 @@ class ModelsApi:
1816
3305
  response_data = await self.api_client.call_api(
1817
3306
  *_param, _request_timeout=_request_timeout
1818
3307
  )
1819
- return response_data.response
3308
+ return response_data
3309
+
3310
+ # Private sync implementation methods
3311
+ @validate_call
3312
+ def _update_model_sync(
3313
+ self,
3314
+ id: Annotated[StrictInt, Field(description="The ID of the model to update.")],
3315
+ model_update: ModelUpdate,
3316
+ _request_timeout: Union[
3317
+ None,
3318
+ Annotated[StrictFloat, Field(gt=0)],
3319
+ Tuple[
3320
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
3321
+ ],
3322
+ ] = None,
3323
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3324
+ _content_type: Optional[StrictStr] = None,
3325
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3326
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3327
+ ) -> object:
3328
+ """Synchronous version of update_model"""
3329
+ return async_to_sync(self._update_model_async)(
3330
+ id=id,
3331
+ model_update=model_update,
3332
+ _request_timeout=_request_timeout,
3333
+ _request_auth=_request_auth,
3334
+ _content_type=_content_type,
3335
+ _headers=_headers,
3336
+ _host_index=_host_index,
3337
+ )
3338
+
3339
+ @validate_call
3340
+ def _update_model_sync_with_http_info(
3341
+ self,
3342
+ id: Annotated[StrictInt, Field(description="The ID of the model to update.")],
3343
+ model_update: ModelUpdate,
3344
+ _request_timeout: Union[
3345
+ None,
3346
+ Annotated[StrictFloat, Field(gt=0)],
3347
+ Tuple[
3348
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
3349
+ ],
3350
+ ] = None,
3351
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3352
+ _content_type: Optional[StrictStr] = None,
3353
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3354
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3355
+ ) -> ApiResponse[object]:
3356
+ """Synchronous version of update_model_with_http_info"""
3357
+ return async_to_sync(self._update_model_async_with_http_info)(
3358
+ id=id,
3359
+ model_update=model_update,
3360
+ _request_timeout=_request_timeout,
3361
+ _request_auth=_request_auth,
3362
+ _content_type=_content_type,
3363
+ _headers=_headers,
3364
+ _host_index=_host_index,
3365
+ )
3366
+
3367
+ @validate_call
3368
+ def _update_model_sync_without_preload_content(
3369
+ self,
3370
+ id: Annotated[StrictInt, Field(description="The ID of the model to update.")],
3371
+ model_update: ModelUpdate,
3372
+ _request_timeout: Union[
3373
+ None,
3374
+ Annotated[StrictFloat, Field(gt=0)],
3375
+ Tuple[
3376
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
3377
+ ],
3378
+ ] = None,
3379
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3380
+ _content_type: Optional[StrictStr] = None,
3381
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3382
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3383
+ ) -> RESTResponseType:
3384
+ """Synchronous version of update_model_without_preload_content"""
3385
+ return async_to_sync(self._update_model_async_without_preload_content)(
3386
+ id=id,
3387
+ model_update=model_update,
3388
+ _request_timeout=_request_timeout,
3389
+ _request_auth=_request_auth,
3390
+ _content_type=_content_type,
3391
+ _headers=_headers,
3392
+ _host_index=_host_index,
3393
+ )
1820
3394
 
1821
3395
  def _update_model_serialize(
1822
3396
  self,