orca-sdk 0.0.103__py3-none-any.whl → 0.0.104__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.
orca_sdk/client.py CHANGED
@@ -9,7 +9,16 @@ import uuid
9
9
  from string import Formatter
10
10
  from typing import Any, Literal, Mapping, NotRequired, TypedDict, cast, overload
11
11
 
12
- from httpx import URL, USE_CLIENT_DEFAULT, Client, Headers, Request, Response, Timeout
12
+ from httpx import (
13
+ URL,
14
+ USE_CLIENT_DEFAULT,
15
+ Client,
16
+ Headers,
17
+ HTTPTransport,
18
+ Request,
19
+ Response,
20
+ Timeout,
21
+ )
13
22
  from httpx._client import UseClientDefault # type: ignore
14
23
  from httpx._types import AuthTypes # type: ignore
15
24
  from httpx._types import CookieTypes # type: ignore
@@ -18,6 +27,7 @@ from httpx._types import HeaderTypes # type: ignore
18
27
  from httpx._types import RequestContent # type: ignore
19
28
  from httpx._types import RequestExtensions # type: ignore
20
29
  from httpx._types import TimeoutTypes # type: ignore
30
+ from httpx_retries import Retry, RetryTransport
21
31
 
22
32
 
23
33
  class ActionRecommendation(TypedDict):
@@ -54,7 +64,7 @@ class BaseLabelPredictionResult(TypedDict):
54
64
  prediction_id: str | None
55
65
  confidence: float
56
66
  anomaly_score: float | None
57
- label: int
67
+ label: int | None
58
68
  label_name: str | None
59
69
  logits: list[float]
60
70
 
@@ -67,11 +77,11 @@ class BaseScorePredictionResult(TypedDict):
67
77
  prediction_id: str | None
68
78
  confidence: float
69
79
  anomaly_score: float | None
70
- score: float
80
+ score: float | None
71
81
 
72
82
 
73
83
  class CascadeEditSuggestionsRequest(TypedDict):
74
- old_label: int
84
+ old_label: int | None
75
85
  new_label: int
76
86
  max_neighbors: NotRequired[int]
77
87
  max_validation_neighbors: NotRequired[int]
@@ -109,6 +119,13 @@ class ClassificationEvaluationRequest(TypedDict):
109
119
  telemetry_tags: NotRequired[list[str] | None]
110
120
 
111
121
 
122
+ class CleanupResponse(TypedDict):
123
+ deleted_milvus_collections: list[str]
124
+ deleted_milvus_collections_count: int
125
+ deleted_blob_paths: list[str]
126
+ deleted_blob_paths_count: int
127
+
128
+
112
129
  class ClusterMetrics(TypedDict):
113
130
  cluster: int
114
131
  memory_count: int
@@ -220,7 +237,7 @@ class InternalServerErrorResponse(TypedDict):
220
237
 
221
238
 
222
239
  class LabelClassMetrics(TypedDict):
223
- label: int
240
+ label: int | None
224
241
  label_name: NotRequired[str | None]
225
242
  average_lookup_score: float
226
243
  memory_count: int
@@ -236,7 +253,7 @@ class LabeledMemoryInsert(TypedDict):
236
253
  value: str | bytes
237
254
  metadata: NotRequired[dict[str, str | int | float | bool | None]]
238
255
  source_id: NotRequired[str | None]
239
- label: int
256
+ label: int | None
240
257
 
241
258
 
242
259
  class ListMemoriesRequest(TypedDict):
@@ -267,7 +284,7 @@ class MemoryMetrics(TypedDict):
267
284
  embedding_2d: NotRequired[list]
268
285
  anomaly_score: NotRequired[float]
269
286
  neighbor_label_logits: NotRequired[list[float]]
270
- neighbor_predicted_label: NotRequired[int]
287
+ neighbor_predicted_label: NotRequired[int | None]
271
288
  neighbor_predicted_label_ambiguity: NotRequired[float]
272
289
  neighbor_predicted_label_confidence: NotRequired[float]
273
290
  current_label_neighbor_confidence: NotRequired[float]
@@ -348,6 +365,7 @@ class MemorysetLabelMetrics(TypedDict):
348
365
  mean_neighbor_label_confidence: float
349
366
  mean_neighbor_label_entropy: float
350
367
  mean_neighbor_predicted_label_ambiguity: float
368
+ num_no_labeled_neighbors: int
351
369
  num_potential_mislabels: int
352
370
  updated_at: str
353
371
 
@@ -510,6 +528,7 @@ class RegressionEvaluationRequest(TypedDict):
510
528
 
511
529
 
512
530
  class RegressionMetrics(TypedDict):
531
+ coverage: float
513
532
  mse: float
514
533
  rmse: float
515
534
  mae: float
@@ -562,7 +581,7 @@ class ScorePredictionMemoryLookup(TypedDict):
562
581
  edited_at: str
563
582
  metrics: MemoryMetrics
564
583
  lookup_score: float
565
- score: float
584
+ score: float | None
566
585
  prediction_id: str
567
586
  attention_weight: float
568
587
 
@@ -571,7 +590,7 @@ class ScorePredictionWithMemoriesAndFeedback(TypedDict):
571
590
  prediction_id: str
572
591
  confidence: float
573
592
  anomaly_score: float | None
574
- score: float
593
+ score: float | None
575
594
  timestamp: str
576
595
  input_value: str | bytes
577
596
  input_embedding: list[float]
@@ -598,7 +617,7 @@ class ScoredMemory(TypedDict):
598
617
  updated_at: str
599
618
  edited_at: str
600
619
  metrics: MemoryMetrics
601
- score: float
620
+ score: float | None
602
621
 
603
622
 
604
623
  class ScoredMemoryInsert(TypedDict):
@@ -606,7 +625,7 @@ class ScoredMemoryInsert(TypedDict):
606
625
  value: str | bytes
607
626
  metadata: NotRequired[dict[str, str | int | float | bool | None]]
608
627
  source_id: NotRequired[str | None]
609
- score: float
628
+ score: float | None
610
629
 
611
630
 
612
631
  class ScoredMemoryLookup(TypedDict):
@@ -621,7 +640,7 @@ class ScoredMemoryLookup(TypedDict):
621
640
  edited_at: str
622
641
  metrics: MemoryMetrics
623
642
  lookup_score: float
624
- score: float
643
+ score: float | None
625
644
 
626
645
 
627
646
  class ScoredMemoryUpdate(TypedDict):
@@ -630,7 +649,7 @@ class ScoredMemoryUpdate(TypedDict):
630
649
  metadata: NotRequired[dict[str, str | int | float | bool | None] | None]
631
650
  source_id: NotRequired[str | None]
632
651
  metrics: NotRequired[MemoryMetrics | None]
633
- score: NotRequired[float]
652
+ score: NotRequired[float | None]
634
653
 
635
654
 
636
655
  class ScoredMemoryWithFeedbackMetrics(TypedDict):
@@ -644,7 +663,7 @@ class ScoredMemoryWithFeedbackMetrics(TypedDict):
644
663
  updated_at: str
645
664
  edited_at: str
646
665
  metrics: MemoryMetrics
647
- score: float
666
+ score: float | None
648
667
  feedback_metrics: dict[str, FeedbackMetrics]
649
668
  lookup_count: int
650
669
 
@@ -1049,14 +1068,6 @@ class AddMemoryRecommendations(TypedDict):
1049
1068
  memories: list[AddMemorySuggestion]
1050
1069
 
1051
1070
 
1052
- class AnalyzeNeighborLabelsResult(TypedDict):
1053
- label_metrics: list[LabelClassMetrics]
1054
- neighbor_prediction_accuracy: float
1055
- mean_neighbor_label_confidence: float
1056
- mean_neighbor_label_entropy: float
1057
- mean_neighbor_predicted_label_ambiguity: float
1058
-
1059
-
1060
1071
  class BootstrapClassificationModelRequest(TypedDict):
1061
1072
  model_description: str
1062
1073
  label_names: list[str]
@@ -1072,9 +1083,10 @@ class BootstrapClassificationModelResult(TypedDict):
1072
1083
 
1073
1084
 
1074
1085
  class ClassificationMetrics(TypedDict):
1086
+ coverage: float
1075
1087
  f1_score: float
1076
1088
  accuracy: float
1077
- loss: float
1089
+ loss: float | None
1078
1090
  anomaly_score_mean: NotRequired[float | None]
1079
1091
  anomaly_score_median: NotRequired[float | None]
1080
1092
  anomaly_score_variance: NotRequired[float | None]
@@ -1132,6 +1144,7 @@ class ColumnInfo(TypedDict):
1132
1144
  type: ColumnType
1133
1145
  enum_options: NotRequired[list[str] | None]
1134
1146
  int_values: NotRequired[list[int] | None]
1147
+ contains_nones: NotRequired[bool]
1135
1148
 
1136
1149
 
1137
1150
  class ConceptMetrics(TypedDict):
@@ -1237,7 +1250,7 @@ class EmbeddingEvaluationResponseUnionClassificationMetricsRegressionMetrics(Typ
1237
1250
  class EmbeddingModelResult(TypedDict):
1238
1251
  embedding_model_name: str
1239
1252
  embedding_model_path: str
1240
- analysis_result: AnalyzeNeighborLabelsResult
1253
+ analysis_result: MemorysetLabelMetrics
1241
1254
  memoryset_name: NotRequired[str | None]
1242
1255
  is_finetuned: NotRequired[bool]
1243
1256
 
@@ -1316,7 +1329,7 @@ class LabelPredictionMemoryLookup(TypedDict):
1316
1329
  updated_at: str
1317
1330
  edited_at: str
1318
1331
  metrics: MemoryMetrics
1319
- label: int
1332
+ label: int | None
1320
1333
  label_name: str | None
1321
1334
  lookup_score: float
1322
1335
  prediction_id: str
@@ -1327,7 +1340,7 @@ class LabelPredictionWithMemoriesAndFeedback(TypedDict):
1327
1340
  prediction_id: str
1328
1341
  confidence: float
1329
1342
  anomaly_score: float | None
1330
- label: int
1343
+ label: int | None
1331
1344
  label_name: str | None
1332
1345
  logits: list[float]
1333
1346
  timestamp: str
@@ -1357,7 +1370,7 @@ class LabeledMemory(TypedDict):
1357
1370
  updated_at: str
1358
1371
  edited_at: str
1359
1372
  metrics: MemoryMetrics
1360
- label: int
1373
+ label: int | None
1361
1374
  label_name: str | None
1362
1375
 
1363
1376
 
@@ -1372,7 +1385,7 @@ class LabeledMemoryLookup(TypedDict):
1372
1385
  updated_at: str
1373
1386
  edited_at: str
1374
1387
  metrics: MemoryMetrics
1375
- label: int
1388
+ label: int | None
1376
1389
  label_name: str | None
1377
1390
  lookup_score: float
1378
1391
 
@@ -1383,7 +1396,7 @@ class LabeledMemoryUpdate(TypedDict):
1383
1396
  metadata: NotRequired[dict[str, str | int | float | bool | None] | None]
1384
1397
  source_id: NotRequired[str | None]
1385
1398
  metrics: NotRequired[MemoryMetrics | None]
1386
- label: NotRequired[int]
1399
+ label: NotRequired[int | None]
1387
1400
 
1388
1401
 
1389
1402
  class LabeledMemoryWithFeedbackMetrics(TypedDict):
@@ -1397,7 +1410,7 @@ class LabeledMemoryWithFeedbackMetrics(TypedDict):
1397
1410
  updated_at: str
1398
1411
  edited_at: str
1399
1412
  metrics: MemoryMetrics
1400
- label: int
1413
+ label: int | None
1401
1414
  label_name: str | None
1402
1415
  feedback_metrics: dict[str, FeedbackMetrics]
1403
1416
  lookup_count: int
@@ -1477,6 +1490,7 @@ class Task(TypedDict):
1477
1490
  type: str
1478
1491
  payload: BaseModel
1479
1492
  result: BaseModel | None
1493
+ depends_on: NotRequired[list[str]]
1480
1494
 
1481
1495
 
1482
1496
  class TelemetryMemoriesRequest(TypedDict):
@@ -1589,6 +1603,250 @@ class OrcaClient(Client):
1589
1603
  raise ValueError(f"Missing path params: {', '.join(placeholders - path_params.keys())}")
1590
1604
  return path_params, query_params
1591
1605
 
1606
+ @overload
1607
+ def DELETE(
1608
+ self,
1609
+ path: Literal["/cleanup"],
1610
+ *,
1611
+ params: None = None,
1612
+ parse_as: Literal["json"] = "json",
1613
+ headers: HeaderTypes | None = None,
1614
+ cookies: CookieTypes | None = None,
1615
+ auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
1616
+ follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
1617
+ timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
1618
+ extensions: RequestExtensions | None = None,
1619
+ ) -> CleanupResponse:
1620
+ """Cleanup orphaned milvus collections and blobs"""
1621
+ pass
1622
+
1623
+ @overload
1624
+ def DELETE(
1625
+ self,
1626
+ path: Literal["/auth/api_key/{name_or_id}"],
1627
+ *,
1628
+ params: DeleteAuthApiKeyByNameOrIdParams,
1629
+ parse_as: Literal["json"] = "json",
1630
+ headers: HeaderTypes | None = None,
1631
+ cookies: CookieTypes | None = None,
1632
+ auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
1633
+ follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
1634
+ timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
1635
+ extensions: RequestExtensions | None = None,
1636
+ ) -> None:
1637
+ """Delete an API key by name or ID."""
1638
+ pass
1639
+
1640
+ @overload
1641
+ def DELETE(
1642
+ self,
1643
+ path: Literal["/auth/org"],
1644
+ *,
1645
+ params: None = None,
1646
+ parse_as: Literal["json"] = "json",
1647
+ headers: HeaderTypes | None = None,
1648
+ cookies: CookieTypes | None = None,
1649
+ auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
1650
+ follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
1651
+ timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
1652
+ extensions: RequestExtensions | None = None,
1653
+ ) -> None:
1654
+ """Deletes the org and all associated resources"""
1655
+ pass
1656
+
1657
+ @overload
1658
+ def DELETE(
1659
+ self,
1660
+ path: Literal["/memoryset/{name_or_id}"],
1661
+ *,
1662
+ params: DeleteMemorysetByNameOrIdParams,
1663
+ parse_as: Literal["json"] = "json",
1664
+ headers: HeaderTypes | None = None,
1665
+ cookies: CookieTypes | None = None,
1666
+ auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
1667
+ follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
1668
+ timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
1669
+ extensions: RequestExtensions | None = None,
1670
+ ) -> None:
1671
+ pass
1672
+
1673
+ @overload
1674
+ def DELETE(
1675
+ self,
1676
+ path: Literal["/memoryset/{name_or_id}/memory/{memory_id}"],
1677
+ *,
1678
+ params: DeleteMemorysetByNameOrIdMemoryByMemoryIdParams,
1679
+ parse_as: Literal["json"] = "json",
1680
+ headers: HeaderTypes | None = None,
1681
+ cookies: CookieTypes | None = None,
1682
+ auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
1683
+ follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
1684
+ timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
1685
+ extensions: RequestExtensions | None = None,
1686
+ ) -> None:
1687
+ pass
1688
+
1689
+ @overload
1690
+ def DELETE(
1691
+ self,
1692
+ path: Literal["/finetuned_embedding_model/{name_or_id}"],
1693
+ *,
1694
+ params: DeleteFinetunedEmbeddingModelByNameOrIdParams,
1695
+ parse_as: Literal["json"] = "json",
1696
+ headers: HeaderTypes | None = None,
1697
+ cookies: CookieTypes | None = None,
1698
+ auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
1699
+ follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
1700
+ timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
1701
+ extensions: RequestExtensions | None = None,
1702
+ ) -> None:
1703
+ """Delete a finetuned embedding model by name or ID."""
1704
+ pass
1705
+
1706
+ @overload
1707
+ def DELETE(
1708
+ self,
1709
+ path: Literal["/datasource/{name_or_id}"],
1710
+ *,
1711
+ params: DeleteDatasourceByNameOrIdParams,
1712
+ parse_as: Literal["json"] = "json",
1713
+ headers: HeaderTypes | None = None,
1714
+ cookies: CookieTypes | None = None,
1715
+ auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
1716
+ follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
1717
+ timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
1718
+ extensions: RequestExtensions | None = None,
1719
+ ) -> None:
1720
+ """Delete a datasource by name or ID."""
1721
+ pass
1722
+
1723
+ @overload
1724
+ def DELETE(
1725
+ self,
1726
+ path: Literal["/classification_model/{name_or_id}"],
1727
+ *,
1728
+ params: DeleteClassificationModelByNameOrIdParams,
1729
+ parse_as: Literal["json"] = "json",
1730
+ headers: HeaderTypes | None = None,
1731
+ cookies: CookieTypes | None = None,
1732
+ auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
1733
+ follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
1734
+ timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
1735
+ extensions: RequestExtensions | None = None,
1736
+ ) -> None:
1737
+ pass
1738
+
1739
+ @overload
1740
+ def DELETE(
1741
+ self,
1742
+ path: Literal["/classification_model/{model_name_or_id}/evaluation/{task_id}"],
1743
+ *,
1744
+ params: DeleteClassificationModelByModelNameOrIdEvaluationByTaskIdParams,
1745
+ parse_as: Literal["json"] = "json",
1746
+ headers: HeaderTypes | None = None,
1747
+ cookies: CookieTypes | None = None,
1748
+ auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
1749
+ follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
1750
+ timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
1751
+ extensions: RequestExtensions | None = None,
1752
+ ) -> None:
1753
+ pass
1754
+
1755
+ @overload
1756
+ def DELETE(
1757
+ self,
1758
+ path: Literal["/regression_model/{name_or_id}"],
1759
+ *,
1760
+ params: DeleteRegressionModelByNameOrIdParams,
1761
+ parse_as: Literal["json"] = "json",
1762
+ headers: HeaderTypes | None = None,
1763
+ cookies: CookieTypes | None = None,
1764
+ auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
1765
+ follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
1766
+ timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
1767
+ extensions: RequestExtensions | None = None,
1768
+ ) -> None:
1769
+ pass
1770
+
1771
+ @overload
1772
+ def DELETE(
1773
+ self,
1774
+ path: Literal["/regression_model/{model_name_or_id}/evaluation/{task_id}"],
1775
+ *,
1776
+ params: DeleteRegressionModelByModelNameOrIdEvaluationByTaskIdParams,
1777
+ parse_as: Literal["json"] = "json",
1778
+ headers: HeaderTypes | None = None,
1779
+ cookies: CookieTypes | None = None,
1780
+ auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
1781
+ follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
1782
+ timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
1783
+ extensions: RequestExtensions | None = None,
1784
+ ) -> None:
1785
+ pass
1786
+
1787
+ @overload
1788
+ def DELETE(
1789
+ self,
1790
+ path: Literal["/task/{task_id}/abort"],
1791
+ *,
1792
+ params: DeleteTaskByTaskIdAbortParams,
1793
+ parse_as: Literal["json"] = "json",
1794
+ headers: HeaderTypes | None = None,
1795
+ cookies: CookieTypes | None = None,
1796
+ auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
1797
+ follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
1798
+ timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
1799
+ extensions: RequestExtensions | None = None,
1800
+ ) -> None:
1801
+ pass
1802
+
1803
+ @overload
1804
+ def DELETE(
1805
+ self,
1806
+ path: Literal["/telemetry/feedback_category/{name_or_id}"],
1807
+ *,
1808
+ params: DeleteTelemetryFeedbackCategoryByNameOrIdParams,
1809
+ parse_as: Literal["json"] = "json",
1810
+ headers: HeaderTypes | None = None,
1811
+ cookies: CookieTypes | None = None,
1812
+ auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
1813
+ follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
1814
+ timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
1815
+ extensions: RequestExtensions | None = None,
1816
+ ) -> None:
1817
+ """Delete a feedback category and all associated feedback records."""
1818
+ pass
1819
+
1820
+ def DELETE(
1821
+ self,
1822
+ path: str,
1823
+ *,
1824
+ params: Mapping[str, Any] | None = None,
1825
+ parse_as: Literal["json", "text"] | None = "json",
1826
+ headers: HeaderTypes | None = None,
1827
+ cookies: CookieTypes | None = None,
1828
+ auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
1829
+ follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
1830
+ timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
1831
+ extensions: RequestExtensions | None = None,
1832
+ ) -> Any:
1833
+ path_params, query_params = self._parse_params(params or {}, path)
1834
+ res = self.delete(
1835
+ path.format(**path_params),
1836
+ params=query_params,
1837
+ headers=headers,
1838
+ cookies=cookies,
1839
+ auth=auth,
1840
+ follow_redirects=follow_redirects,
1841
+ timeout=timeout,
1842
+ extensions=extensions,
1843
+ ).raise_for_status()
1844
+ return (
1845
+ None
1846
+ if res.status_code == 204
1847
+ else res.json() if parse_as == "json" else res.text if parse_as == "text" else res.content
1848
+ )
1849
+
1592
1850
  @overload
1593
1851
  def GET(
1594
1852
  self,
@@ -3163,233 +3421,6 @@ class OrcaClient(Client):
3163
3421
  else res.json() if parse_as == "json" else res.text if parse_as == "text" else res.content
3164
3422
  )
3165
3423
 
3166
- @overload
3167
- def DELETE(
3168
- self,
3169
- path: Literal["/auth/api_key/{name_or_id}"],
3170
- *,
3171
- params: DeleteAuthApiKeyByNameOrIdParams,
3172
- parse_as: Literal["json"] = "json",
3173
- headers: HeaderTypes | None = None,
3174
- cookies: CookieTypes | None = None,
3175
- auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
3176
- follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
3177
- timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
3178
- extensions: RequestExtensions | None = None,
3179
- ) -> None:
3180
- """Delete an API key by name or ID."""
3181
- pass
3182
-
3183
- @overload
3184
- def DELETE(
3185
- self,
3186
- path: Literal["/auth/org"],
3187
- *,
3188
- params: None = None,
3189
- parse_as: Literal["json"] = "json",
3190
- headers: HeaderTypes | None = None,
3191
- cookies: CookieTypes | None = None,
3192
- auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
3193
- follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
3194
- timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
3195
- extensions: RequestExtensions | None = None,
3196
- ) -> None:
3197
- """Deletes the org and all associated resources"""
3198
- pass
3199
-
3200
- @overload
3201
- def DELETE(
3202
- self,
3203
- path: Literal["/memoryset/{name_or_id}"],
3204
- *,
3205
- params: DeleteMemorysetByNameOrIdParams,
3206
- parse_as: Literal["json"] = "json",
3207
- headers: HeaderTypes | None = None,
3208
- cookies: CookieTypes | None = None,
3209
- auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
3210
- follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
3211
- timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
3212
- extensions: RequestExtensions | None = None,
3213
- ) -> None:
3214
- pass
3215
-
3216
- @overload
3217
- def DELETE(
3218
- self,
3219
- path: Literal["/memoryset/{name_or_id}/memory/{memory_id}"],
3220
- *,
3221
- params: DeleteMemorysetByNameOrIdMemoryByMemoryIdParams,
3222
- parse_as: Literal["json"] = "json",
3223
- headers: HeaderTypes | None = None,
3224
- cookies: CookieTypes | None = None,
3225
- auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
3226
- follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
3227
- timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
3228
- extensions: RequestExtensions | None = None,
3229
- ) -> None:
3230
- pass
3231
-
3232
- @overload
3233
- def DELETE(
3234
- self,
3235
- path: Literal["/finetuned_embedding_model/{name_or_id}"],
3236
- *,
3237
- params: DeleteFinetunedEmbeddingModelByNameOrIdParams,
3238
- parse_as: Literal["json"] = "json",
3239
- headers: HeaderTypes | None = None,
3240
- cookies: CookieTypes | None = None,
3241
- auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
3242
- follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
3243
- timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
3244
- extensions: RequestExtensions | None = None,
3245
- ) -> None:
3246
- """Delete a finetuned embedding model by name or ID."""
3247
- pass
3248
-
3249
- @overload
3250
- def DELETE(
3251
- self,
3252
- path: Literal["/datasource/{name_or_id}"],
3253
- *,
3254
- params: DeleteDatasourceByNameOrIdParams,
3255
- parse_as: Literal["json"] = "json",
3256
- headers: HeaderTypes | None = None,
3257
- cookies: CookieTypes | None = None,
3258
- auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
3259
- follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
3260
- timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
3261
- extensions: RequestExtensions | None = None,
3262
- ) -> None:
3263
- """Delete a datasource by name or ID."""
3264
- pass
3265
-
3266
- @overload
3267
- def DELETE(
3268
- self,
3269
- path: Literal["/classification_model/{name_or_id}"],
3270
- *,
3271
- params: DeleteClassificationModelByNameOrIdParams,
3272
- parse_as: Literal["json"] = "json",
3273
- headers: HeaderTypes | None = None,
3274
- cookies: CookieTypes | None = None,
3275
- auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
3276
- follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
3277
- timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
3278
- extensions: RequestExtensions | None = None,
3279
- ) -> None:
3280
- pass
3281
-
3282
- @overload
3283
- def DELETE(
3284
- self,
3285
- path: Literal["/classification_model/{model_name_or_id}/evaluation/{task_id}"],
3286
- *,
3287
- params: DeleteClassificationModelByModelNameOrIdEvaluationByTaskIdParams,
3288
- parse_as: Literal["json"] = "json",
3289
- headers: HeaderTypes | None = None,
3290
- cookies: CookieTypes | None = None,
3291
- auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
3292
- follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
3293
- timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
3294
- extensions: RequestExtensions | None = None,
3295
- ) -> None:
3296
- pass
3297
-
3298
- @overload
3299
- def DELETE(
3300
- self,
3301
- path: Literal["/regression_model/{name_or_id}"],
3302
- *,
3303
- params: DeleteRegressionModelByNameOrIdParams,
3304
- parse_as: Literal["json"] = "json",
3305
- headers: HeaderTypes | None = None,
3306
- cookies: CookieTypes | None = None,
3307
- auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
3308
- follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
3309
- timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
3310
- extensions: RequestExtensions | None = None,
3311
- ) -> None:
3312
- pass
3313
-
3314
- @overload
3315
- def DELETE(
3316
- self,
3317
- path: Literal["/regression_model/{model_name_or_id}/evaluation/{task_id}"],
3318
- *,
3319
- params: DeleteRegressionModelByModelNameOrIdEvaluationByTaskIdParams,
3320
- parse_as: Literal["json"] = "json",
3321
- headers: HeaderTypes | None = None,
3322
- cookies: CookieTypes | None = None,
3323
- auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
3324
- follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
3325
- timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
3326
- extensions: RequestExtensions | None = None,
3327
- ) -> None:
3328
- pass
3329
-
3330
- @overload
3331
- def DELETE(
3332
- self,
3333
- path: Literal["/task/{task_id}/abort"],
3334
- *,
3335
- params: DeleteTaskByTaskIdAbortParams,
3336
- parse_as: Literal["json"] = "json",
3337
- headers: HeaderTypes | None = None,
3338
- cookies: CookieTypes | None = None,
3339
- auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
3340
- follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
3341
- timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
3342
- extensions: RequestExtensions | None = None,
3343
- ) -> None:
3344
- pass
3345
-
3346
- @overload
3347
- def DELETE(
3348
- self,
3349
- path: Literal["/telemetry/feedback_category/{name_or_id}"],
3350
- *,
3351
- params: DeleteTelemetryFeedbackCategoryByNameOrIdParams,
3352
- parse_as: Literal["json"] = "json",
3353
- headers: HeaderTypes | None = None,
3354
- cookies: CookieTypes | None = None,
3355
- auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
3356
- follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
3357
- timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
3358
- extensions: RequestExtensions | None = None,
3359
- ) -> None:
3360
- """Delete a feedback category and all associated feedback records."""
3361
- pass
3362
-
3363
- def DELETE(
3364
- self,
3365
- path: str,
3366
- *,
3367
- params: Mapping[str, Any] | None = None,
3368
- parse_as: Literal["json", "text"] | None = "json",
3369
- headers: HeaderTypes | None = None,
3370
- cookies: CookieTypes | None = None,
3371
- auth: AuthTypes | UseClientDefault = USE_CLIENT_DEFAULT,
3372
- follow_redirects: bool | UseClientDefault = USE_CLIENT_DEFAULT,
3373
- timeout: TimeoutTypes | UseClientDefault = USE_CLIENT_DEFAULT,
3374
- extensions: RequestExtensions | None = None,
3375
- ) -> Any:
3376
- path_params, query_params = self._parse_params(params or {}, path)
3377
- res = self.delete(
3378
- path.format(**path_params),
3379
- params=query_params,
3380
- headers=headers,
3381
- cookies=cookies,
3382
- auth=auth,
3383
- follow_redirects=follow_redirects,
3384
- timeout=timeout,
3385
- extensions=extensions,
3386
- ).raise_for_status()
3387
- return (
3388
- None
3389
- if res.status_code == 204
3390
- else res.json() if parse_as == "json" else res.text if parse_as == "text" else res.content
3391
- )
3392
-
3393
3424
  @overload
3394
3425
  def PUT(
3395
3426
  self,
@@ -3700,6 +3731,15 @@ logging.getLogger("httpx").setLevel(logging.WARNING)
3700
3731
  logging.getLogger("httpcore").setLevel(logging.ERROR)
3701
3732
 
3702
3733
  orca_api = OrcaClient(
3734
+ transport=RetryTransport(
3735
+ transport=HTTPTransport(),
3736
+ retry=Retry(
3737
+ total=5,
3738
+ backoff_factor=0.5,
3739
+ allowed_methods=["GET", "POST", "PUT", "PATCH", "DELETE"],
3740
+ status_forcelist=[429, 500, 502, 503, 504],
3741
+ ),
3742
+ ),
3703
3743
  event_hooks={"request": [_instrument_request], "response": [_raise_error_for_response]},
3704
3744
  follow_redirects=True,
3705
3745
  timeout=Timeout(connect=3, read=20, write=10, pool=5),