databricks-sdk 0.58.0__py3-none-any.whl → 0.59.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of databricks-sdk might be problematic. Click here for more details.
- databricks/sdk/__init__.py +13 -5
- databricks/sdk/service/aibuilder.py +0 -127
- databricks/sdk/service/apps.py +52 -46
- databricks/sdk/service/billing.py +9 -200
- databricks/sdk/service/catalog.py +5500 -7697
- databricks/sdk/service/cleanrooms.py +2 -32
- databricks/sdk/service/compute.py +456 -2515
- databricks/sdk/service/dashboards.py +1 -177
- databricks/sdk/service/database.py +18 -52
- databricks/sdk/service/files.py +2 -218
- databricks/sdk/service/iam.py +16 -295
- databricks/sdk/service/jobs.py +108 -1171
- databricks/sdk/service/marketplace.py +0 -573
- databricks/sdk/service/ml.py +76 -2445
- databricks/sdk/service/oauth2.py +122 -237
- databricks/sdk/service/pipelines.py +178 -752
- databricks/sdk/service/provisioning.py +0 -603
- databricks/sdk/service/serving.py +5 -577
- databricks/sdk/service/settings.py +191 -1560
- databricks/sdk/service/sharing.py +3 -469
- databricks/sdk/service/sql.py +117 -1704
- databricks/sdk/service/vectorsearch.py +0 -391
- databricks/sdk/service/workspace.py +250 -721
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.58.0.dist-info → databricks_sdk-0.59.0.dist-info}/METADATA +1 -1
- {databricks_sdk-0.58.0.dist-info → databricks_sdk-0.59.0.dist-info}/RECORD +30 -30
- {databricks_sdk-0.58.0.dist-info → databricks_sdk-0.59.0.dist-info}/WHEEL +0 -0
- {databricks_sdk-0.58.0.dist-info → databricks_sdk-0.59.0.dist-info}/licenses/LICENSE +0 -0
- {databricks_sdk-0.58.0.dist-info → databricks_sdk-0.59.0.dist-info}/licenses/NOTICE +0 -0
- {databricks_sdk-0.58.0.dist-info → databricks_sdk-0.59.0.dist-info}/top_level.txt +0 -0
|
@@ -299,12 +299,12 @@ class AiGatewayInferenceTableConfig:
|
|
|
299
299
|
|
|
300
300
|
@dataclass
|
|
301
301
|
class AiGatewayRateLimit:
|
|
302
|
-
calls: int
|
|
303
|
-
"""Used to specify how many calls are allowed for a key within the renewal_period."""
|
|
304
|
-
|
|
305
302
|
renewal_period: AiGatewayRateLimitRenewalPeriod
|
|
306
303
|
"""Renewal period field for a rate limit. Currently, only 'minute' is supported."""
|
|
307
304
|
|
|
305
|
+
calls: Optional[int] = None
|
|
306
|
+
"""Used to specify how many calls are allowed for a key within the renewal_period."""
|
|
307
|
+
|
|
308
308
|
key: Optional[AiGatewayRateLimitKey] = None
|
|
309
309
|
"""Key field for a rate limit. Currently, 'user', 'user_group, 'service_principal', and 'endpoint'
|
|
310
310
|
are supported, with 'endpoint' being the default if not specified."""
|
|
@@ -853,152 +853,6 @@ class CohereConfig:
|
|
|
853
853
|
)
|
|
854
854
|
|
|
855
855
|
|
|
856
|
-
@dataclass
|
|
857
|
-
class CreatePtEndpointRequest:
|
|
858
|
-
name: str
|
|
859
|
-
"""The name of the serving endpoint. This field is required and must be unique across a Databricks
|
|
860
|
-
workspace. An endpoint name can consist of alphanumeric characters, dashes, and underscores."""
|
|
861
|
-
|
|
862
|
-
config: PtEndpointCoreConfig
|
|
863
|
-
"""The core config of the serving endpoint."""
|
|
864
|
-
|
|
865
|
-
ai_gateway: Optional[AiGatewayConfig] = None
|
|
866
|
-
"""The AI Gateway configuration for the serving endpoint."""
|
|
867
|
-
|
|
868
|
-
budget_policy_id: Optional[str] = None
|
|
869
|
-
"""The budget policy associated with the endpoint."""
|
|
870
|
-
|
|
871
|
-
tags: Optional[List[EndpointTag]] = None
|
|
872
|
-
"""Tags to be attached to the serving endpoint and automatically propagated to billing logs."""
|
|
873
|
-
|
|
874
|
-
def as_dict(self) -> dict:
|
|
875
|
-
"""Serializes the CreatePtEndpointRequest into a dictionary suitable for use as a JSON request body."""
|
|
876
|
-
body = {}
|
|
877
|
-
if self.ai_gateway:
|
|
878
|
-
body["ai_gateway"] = self.ai_gateway.as_dict()
|
|
879
|
-
if self.budget_policy_id is not None:
|
|
880
|
-
body["budget_policy_id"] = self.budget_policy_id
|
|
881
|
-
if self.config:
|
|
882
|
-
body["config"] = self.config.as_dict()
|
|
883
|
-
if self.name is not None:
|
|
884
|
-
body["name"] = self.name
|
|
885
|
-
if self.tags:
|
|
886
|
-
body["tags"] = [v.as_dict() for v in self.tags]
|
|
887
|
-
return body
|
|
888
|
-
|
|
889
|
-
def as_shallow_dict(self) -> dict:
|
|
890
|
-
"""Serializes the CreatePtEndpointRequest into a shallow dictionary of its immediate attributes."""
|
|
891
|
-
body = {}
|
|
892
|
-
if self.ai_gateway:
|
|
893
|
-
body["ai_gateway"] = self.ai_gateway
|
|
894
|
-
if self.budget_policy_id is not None:
|
|
895
|
-
body["budget_policy_id"] = self.budget_policy_id
|
|
896
|
-
if self.config:
|
|
897
|
-
body["config"] = self.config
|
|
898
|
-
if self.name is not None:
|
|
899
|
-
body["name"] = self.name
|
|
900
|
-
if self.tags:
|
|
901
|
-
body["tags"] = self.tags
|
|
902
|
-
return body
|
|
903
|
-
|
|
904
|
-
@classmethod
|
|
905
|
-
def from_dict(cls, d: Dict[str, Any]) -> CreatePtEndpointRequest:
|
|
906
|
-
"""Deserializes the CreatePtEndpointRequest from a dictionary."""
|
|
907
|
-
return cls(
|
|
908
|
-
ai_gateway=_from_dict(d, "ai_gateway", AiGatewayConfig),
|
|
909
|
-
budget_policy_id=d.get("budget_policy_id", None),
|
|
910
|
-
config=_from_dict(d, "config", PtEndpointCoreConfig),
|
|
911
|
-
name=d.get("name", None),
|
|
912
|
-
tags=_repeated_dict(d, "tags", EndpointTag),
|
|
913
|
-
)
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
@dataclass
|
|
917
|
-
class CreateServingEndpoint:
|
|
918
|
-
name: str
|
|
919
|
-
"""The name of the serving endpoint. This field is required and must be unique across a Databricks
|
|
920
|
-
workspace. An endpoint name can consist of alphanumeric characters, dashes, and underscores."""
|
|
921
|
-
|
|
922
|
-
ai_gateway: Optional[AiGatewayConfig] = None
|
|
923
|
-
"""The AI Gateway configuration for the serving endpoint. NOTE: External model, provisioned
|
|
924
|
-
throughput, and pay-per-token endpoints are fully supported; agent endpoints currently only
|
|
925
|
-
support inference tables."""
|
|
926
|
-
|
|
927
|
-
budget_policy_id: Optional[str] = None
|
|
928
|
-
"""The budget policy to be applied to the serving endpoint."""
|
|
929
|
-
|
|
930
|
-
config: Optional[EndpointCoreConfigInput] = None
|
|
931
|
-
"""The core config of the serving endpoint."""
|
|
932
|
-
|
|
933
|
-
description: Optional[str] = None
|
|
934
|
-
|
|
935
|
-
rate_limits: Optional[List[RateLimit]] = None
|
|
936
|
-
"""Rate limits to be applied to the serving endpoint. NOTE: this field is deprecated, please use AI
|
|
937
|
-
Gateway to manage rate limits."""
|
|
938
|
-
|
|
939
|
-
route_optimized: Optional[bool] = None
|
|
940
|
-
"""Enable route optimization for the serving endpoint."""
|
|
941
|
-
|
|
942
|
-
tags: Optional[List[EndpointTag]] = None
|
|
943
|
-
"""Tags to be attached to the serving endpoint and automatically propagated to billing logs."""
|
|
944
|
-
|
|
945
|
-
def as_dict(self) -> dict:
|
|
946
|
-
"""Serializes the CreateServingEndpoint into a dictionary suitable for use as a JSON request body."""
|
|
947
|
-
body = {}
|
|
948
|
-
if self.ai_gateway:
|
|
949
|
-
body["ai_gateway"] = self.ai_gateway.as_dict()
|
|
950
|
-
if self.budget_policy_id is not None:
|
|
951
|
-
body["budget_policy_id"] = self.budget_policy_id
|
|
952
|
-
if self.config:
|
|
953
|
-
body["config"] = self.config.as_dict()
|
|
954
|
-
if self.description is not None:
|
|
955
|
-
body["description"] = self.description
|
|
956
|
-
if self.name is not None:
|
|
957
|
-
body["name"] = self.name
|
|
958
|
-
if self.rate_limits:
|
|
959
|
-
body["rate_limits"] = [v.as_dict() for v in self.rate_limits]
|
|
960
|
-
if self.route_optimized is not None:
|
|
961
|
-
body["route_optimized"] = self.route_optimized
|
|
962
|
-
if self.tags:
|
|
963
|
-
body["tags"] = [v.as_dict() for v in self.tags]
|
|
964
|
-
return body
|
|
965
|
-
|
|
966
|
-
def as_shallow_dict(self) -> dict:
|
|
967
|
-
"""Serializes the CreateServingEndpoint into a shallow dictionary of its immediate attributes."""
|
|
968
|
-
body = {}
|
|
969
|
-
if self.ai_gateway:
|
|
970
|
-
body["ai_gateway"] = self.ai_gateway
|
|
971
|
-
if self.budget_policy_id is not None:
|
|
972
|
-
body["budget_policy_id"] = self.budget_policy_id
|
|
973
|
-
if self.config:
|
|
974
|
-
body["config"] = self.config
|
|
975
|
-
if self.description is not None:
|
|
976
|
-
body["description"] = self.description
|
|
977
|
-
if self.name is not None:
|
|
978
|
-
body["name"] = self.name
|
|
979
|
-
if self.rate_limits:
|
|
980
|
-
body["rate_limits"] = self.rate_limits
|
|
981
|
-
if self.route_optimized is not None:
|
|
982
|
-
body["route_optimized"] = self.route_optimized
|
|
983
|
-
if self.tags:
|
|
984
|
-
body["tags"] = self.tags
|
|
985
|
-
return body
|
|
986
|
-
|
|
987
|
-
@classmethod
|
|
988
|
-
def from_dict(cls, d: Dict[str, Any]) -> CreateServingEndpoint:
|
|
989
|
-
"""Deserializes the CreateServingEndpoint from a dictionary."""
|
|
990
|
-
return cls(
|
|
991
|
-
ai_gateway=_from_dict(d, "ai_gateway", AiGatewayConfig),
|
|
992
|
-
budget_policy_id=d.get("budget_policy_id", None),
|
|
993
|
-
config=_from_dict(d, "config", EndpointCoreConfigInput),
|
|
994
|
-
description=d.get("description", None),
|
|
995
|
-
name=d.get("name", None),
|
|
996
|
-
rate_limits=_repeated_dict(d, "rate_limits", RateLimit),
|
|
997
|
-
route_optimized=d.get("route_optimized", None),
|
|
998
|
-
tags=_repeated_dict(d, "tags", EndpointTag),
|
|
999
|
-
)
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
856
|
@dataclass
|
|
1003
857
|
class CustomProviderConfig:
|
|
1004
858
|
"""Configs needed to create a custom provider model route."""
|
|
@@ -1601,76 +1455,6 @@ class ExportMetricsResponse:
|
|
|
1601
1455
|
return cls(contents=d.get("contents", None))
|
|
1602
1456
|
|
|
1603
1457
|
|
|
1604
|
-
@dataclass
|
|
1605
|
-
class ExternalFunctionRequest:
|
|
1606
|
-
"""Simple Proto message for testing"""
|
|
1607
|
-
|
|
1608
|
-
connection_name: str
|
|
1609
|
-
"""The connection name to use. This is required to identify the external connection."""
|
|
1610
|
-
|
|
1611
|
-
method: ExternalFunctionRequestHttpMethod
|
|
1612
|
-
"""The HTTP method to use (e.g., 'GET', 'POST')."""
|
|
1613
|
-
|
|
1614
|
-
path: str
|
|
1615
|
-
"""The relative path for the API endpoint. This is required."""
|
|
1616
|
-
|
|
1617
|
-
headers: Optional[str] = None
|
|
1618
|
-
"""Additional headers for the request. If not provided, only auth headers from connections would be
|
|
1619
|
-
passed."""
|
|
1620
|
-
|
|
1621
|
-
json: Optional[str] = None
|
|
1622
|
-
"""The JSON payload to send in the request body."""
|
|
1623
|
-
|
|
1624
|
-
params: Optional[str] = None
|
|
1625
|
-
"""Query parameters for the request."""
|
|
1626
|
-
|
|
1627
|
-
def as_dict(self) -> dict:
|
|
1628
|
-
"""Serializes the ExternalFunctionRequest into a dictionary suitable for use as a JSON request body."""
|
|
1629
|
-
body = {}
|
|
1630
|
-
if self.connection_name is not None:
|
|
1631
|
-
body["connection_name"] = self.connection_name
|
|
1632
|
-
if self.headers is not None:
|
|
1633
|
-
body["headers"] = self.headers
|
|
1634
|
-
if self.json is not None:
|
|
1635
|
-
body["json"] = self.json
|
|
1636
|
-
if self.method is not None:
|
|
1637
|
-
body["method"] = self.method.value
|
|
1638
|
-
if self.params is not None:
|
|
1639
|
-
body["params"] = self.params
|
|
1640
|
-
if self.path is not None:
|
|
1641
|
-
body["path"] = self.path
|
|
1642
|
-
return body
|
|
1643
|
-
|
|
1644
|
-
def as_shallow_dict(self) -> dict:
|
|
1645
|
-
"""Serializes the ExternalFunctionRequest into a shallow dictionary of its immediate attributes."""
|
|
1646
|
-
body = {}
|
|
1647
|
-
if self.connection_name is not None:
|
|
1648
|
-
body["connection_name"] = self.connection_name
|
|
1649
|
-
if self.headers is not None:
|
|
1650
|
-
body["headers"] = self.headers
|
|
1651
|
-
if self.json is not None:
|
|
1652
|
-
body["json"] = self.json
|
|
1653
|
-
if self.method is not None:
|
|
1654
|
-
body["method"] = self.method
|
|
1655
|
-
if self.params is not None:
|
|
1656
|
-
body["params"] = self.params
|
|
1657
|
-
if self.path is not None:
|
|
1658
|
-
body["path"] = self.path
|
|
1659
|
-
return body
|
|
1660
|
-
|
|
1661
|
-
@classmethod
|
|
1662
|
-
def from_dict(cls, d: Dict[str, Any]) -> ExternalFunctionRequest:
|
|
1663
|
-
"""Deserializes the ExternalFunctionRequest from a dictionary."""
|
|
1664
|
-
return cls(
|
|
1665
|
-
connection_name=d.get("connection_name", None),
|
|
1666
|
-
headers=d.get("headers", None),
|
|
1667
|
-
json=d.get("json", None),
|
|
1668
|
-
method=_enum(d, "method", ExternalFunctionRequestHttpMethod),
|
|
1669
|
-
params=d.get("params", None),
|
|
1670
|
-
path=d.get("path", None),
|
|
1671
|
-
)
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
1458
|
class ExternalFunctionRequestHttpMethod(Enum):
|
|
1675
1459
|
|
|
1676
1460
|
DELETE = "DELETE"
|
|
@@ -2291,49 +2075,6 @@ class PaLmConfig:
|
|
|
2291
2075
|
)
|
|
2292
2076
|
|
|
2293
2077
|
|
|
2294
|
-
@dataclass
|
|
2295
|
-
class PatchServingEndpointTags:
|
|
2296
|
-
add_tags: Optional[List[EndpointTag]] = None
|
|
2297
|
-
"""List of endpoint tags to add"""
|
|
2298
|
-
|
|
2299
|
-
delete_tags: Optional[List[str]] = None
|
|
2300
|
-
"""List of tag keys to delete"""
|
|
2301
|
-
|
|
2302
|
-
name: Optional[str] = None
|
|
2303
|
-
"""The name of the serving endpoint who's tags to patch. This field is required."""
|
|
2304
|
-
|
|
2305
|
-
def as_dict(self) -> dict:
|
|
2306
|
-
"""Serializes the PatchServingEndpointTags into a dictionary suitable for use as a JSON request body."""
|
|
2307
|
-
body = {}
|
|
2308
|
-
if self.add_tags:
|
|
2309
|
-
body["add_tags"] = [v.as_dict() for v in self.add_tags]
|
|
2310
|
-
if self.delete_tags:
|
|
2311
|
-
body["delete_tags"] = [v for v in self.delete_tags]
|
|
2312
|
-
if self.name is not None:
|
|
2313
|
-
body["name"] = self.name
|
|
2314
|
-
return body
|
|
2315
|
-
|
|
2316
|
-
def as_shallow_dict(self) -> dict:
|
|
2317
|
-
"""Serializes the PatchServingEndpointTags into a shallow dictionary of its immediate attributes."""
|
|
2318
|
-
body = {}
|
|
2319
|
-
if self.add_tags:
|
|
2320
|
-
body["add_tags"] = self.add_tags
|
|
2321
|
-
if self.delete_tags:
|
|
2322
|
-
body["delete_tags"] = self.delete_tags
|
|
2323
|
-
if self.name is not None:
|
|
2324
|
-
body["name"] = self.name
|
|
2325
|
-
return body
|
|
2326
|
-
|
|
2327
|
-
@classmethod
|
|
2328
|
-
def from_dict(cls, d: Dict[str, Any]) -> PatchServingEndpointTags:
|
|
2329
|
-
"""Deserializes the PatchServingEndpointTags from a dictionary."""
|
|
2330
|
-
return cls(
|
|
2331
|
-
add_tags=_repeated_dict(d, "add_tags", EndpointTag),
|
|
2332
|
-
delete_tags=d.get("delete_tags", None),
|
|
2333
|
-
name=d.get("name", None),
|
|
2334
|
-
)
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
2078
|
@dataclass
|
|
2338
2079
|
class PayloadTable:
|
|
2339
2080
|
name: Optional[str] = None
|
|
@@ -2460,77 +2201,6 @@ class PtServedModel:
|
|
|
2460
2201
|
)
|
|
2461
2202
|
|
|
2462
2203
|
|
|
2463
|
-
@dataclass
|
|
2464
|
-
class PutAiGatewayRequest:
|
|
2465
|
-
fallback_config: Optional[FallbackConfig] = None
|
|
2466
|
-
"""Configuration for traffic fallback which auto fallbacks to other served entities if the request
|
|
2467
|
-
to a served entity fails with certain error codes, to increase availability."""
|
|
2468
|
-
|
|
2469
|
-
guardrails: Optional[AiGatewayGuardrails] = None
|
|
2470
|
-
"""Configuration for AI Guardrails to prevent unwanted data and unsafe data in requests and
|
|
2471
|
-
responses."""
|
|
2472
|
-
|
|
2473
|
-
inference_table_config: Optional[AiGatewayInferenceTableConfig] = None
|
|
2474
|
-
"""Configuration for payload logging using inference tables. Use these tables to monitor and audit
|
|
2475
|
-
data being sent to and received from model APIs and to improve model quality."""
|
|
2476
|
-
|
|
2477
|
-
name: Optional[str] = None
|
|
2478
|
-
"""The name of the serving endpoint whose AI Gateway is being updated. This field is required."""
|
|
2479
|
-
|
|
2480
|
-
rate_limits: Optional[List[AiGatewayRateLimit]] = None
|
|
2481
|
-
"""Configuration for rate limits which can be set to limit endpoint traffic."""
|
|
2482
|
-
|
|
2483
|
-
usage_tracking_config: Optional[AiGatewayUsageTrackingConfig] = None
|
|
2484
|
-
"""Configuration to enable usage tracking using system tables. These tables allow you to monitor
|
|
2485
|
-
operational usage on endpoints and their associated costs."""
|
|
2486
|
-
|
|
2487
|
-
def as_dict(self) -> dict:
|
|
2488
|
-
"""Serializes the PutAiGatewayRequest into a dictionary suitable for use as a JSON request body."""
|
|
2489
|
-
body = {}
|
|
2490
|
-
if self.fallback_config:
|
|
2491
|
-
body["fallback_config"] = self.fallback_config.as_dict()
|
|
2492
|
-
if self.guardrails:
|
|
2493
|
-
body["guardrails"] = self.guardrails.as_dict()
|
|
2494
|
-
if self.inference_table_config:
|
|
2495
|
-
body["inference_table_config"] = self.inference_table_config.as_dict()
|
|
2496
|
-
if self.name is not None:
|
|
2497
|
-
body["name"] = self.name
|
|
2498
|
-
if self.rate_limits:
|
|
2499
|
-
body["rate_limits"] = [v.as_dict() for v in self.rate_limits]
|
|
2500
|
-
if self.usage_tracking_config:
|
|
2501
|
-
body["usage_tracking_config"] = self.usage_tracking_config.as_dict()
|
|
2502
|
-
return body
|
|
2503
|
-
|
|
2504
|
-
def as_shallow_dict(self) -> dict:
|
|
2505
|
-
"""Serializes the PutAiGatewayRequest into a shallow dictionary of its immediate attributes."""
|
|
2506
|
-
body = {}
|
|
2507
|
-
if self.fallback_config:
|
|
2508
|
-
body["fallback_config"] = self.fallback_config
|
|
2509
|
-
if self.guardrails:
|
|
2510
|
-
body["guardrails"] = self.guardrails
|
|
2511
|
-
if self.inference_table_config:
|
|
2512
|
-
body["inference_table_config"] = self.inference_table_config
|
|
2513
|
-
if self.name is not None:
|
|
2514
|
-
body["name"] = self.name
|
|
2515
|
-
if self.rate_limits:
|
|
2516
|
-
body["rate_limits"] = self.rate_limits
|
|
2517
|
-
if self.usage_tracking_config:
|
|
2518
|
-
body["usage_tracking_config"] = self.usage_tracking_config
|
|
2519
|
-
return body
|
|
2520
|
-
|
|
2521
|
-
@classmethod
|
|
2522
|
-
def from_dict(cls, d: Dict[str, Any]) -> PutAiGatewayRequest:
|
|
2523
|
-
"""Deserializes the PutAiGatewayRequest from a dictionary."""
|
|
2524
|
-
return cls(
|
|
2525
|
-
fallback_config=_from_dict(d, "fallback_config", FallbackConfig),
|
|
2526
|
-
guardrails=_from_dict(d, "guardrails", AiGatewayGuardrails),
|
|
2527
|
-
inference_table_config=_from_dict(d, "inference_table_config", AiGatewayInferenceTableConfig),
|
|
2528
|
-
name=d.get("name", None),
|
|
2529
|
-
rate_limits=_repeated_dict(d, "rate_limits", AiGatewayRateLimit),
|
|
2530
|
-
usage_tracking_config=_from_dict(d, "usage_tracking_config", AiGatewayUsageTrackingConfig),
|
|
2531
|
-
)
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
2204
|
@dataclass
|
|
2535
2205
|
class PutAiGatewayResponse:
|
|
2536
2206
|
fallback_config: Optional[FallbackConfig] = None
|
|
@@ -2594,38 +2264,6 @@ class PutAiGatewayResponse:
|
|
|
2594
2264
|
)
|
|
2595
2265
|
|
|
2596
2266
|
|
|
2597
|
-
@dataclass
|
|
2598
|
-
class PutRequest:
|
|
2599
|
-
name: Optional[str] = None
|
|
2600
|
-
"""The name of the serving endpoint whose rate limits are being updated. This field is required."""
|
|
2601
|
-
|
|
2602
|
-
rate_limits: Optional[List[RateLimit]] = None
|
|
2603
|
-
"""The list of endpoint rate limits."""
|
|
2604
|
-
|
|
2605
|
-
def as_dict(self) -> dict:
|
|
2606
|
-
"""Serializes the PutRequest into a dictionary suitable for use as a JSON request body."""
|
|
2607
|
-
body = {}
|
|
2608
|
-
if self.name is not None:
|
|
2609
|
-
body["name"] = self.name
|
|
2610
|
-
if self.rate_limits:
|
|
2611
|
-
body["rate_limits"] = [v.as_dict() for v in self.rate_limits]
|
|
2612
|
-
return body
|
|
2613
|
-
|
|
2614
|
-
def as_shallow_dict(self) -> dict:
|
|
2615
|
-
"""Serializes the PutRequest into a shallow dictionary of its immediate attributes."""
|
|
2616
|
-
body = {}
|
|
2617
|
-
if self.name is not None:
|
|
2618
|
-
body["name"] = self.name
|
|
2619
|
-
if self.rate_limits:
|
|
2620
|
-
body["rate_limits"] = self.rate_limits
|
|
2621
|
-
return body
|
|
2622
|
-
|
|
2623
|
-
@classmethod
|
|
2624
|
-
def from_dict(cls, d: Dict[str, Any]) -> PutRequest:
|
|
2625
|
-
"""Deserializes the PutRequest from a dictionary."""
|
|
2626
|
-
return cls(name=d.get("name", None), rate_limits=_repeated_dict(d, "rate_limits", RateLimit))
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
2267
|
@dataclass
|
|
2630
2268
|
class PutResponse:
|
|
2631
2269
|
rate_limits: Optional[List[RateLimit]] = None
|
|
@@ -2651,153 +2289,6 @@ class PutResponse:
|
|
|
2651
2289
|
return cls(rate_limits=_repeated_dict(d, "rate_limits", RateLimit))
|
|
2652
2290
|
|
|
2653
2291
|
|
|
2654
|
-
@dataclass
|
|
2655
|
-
class QueryEndpointInput:
|
|
2656
|
-
dataframe_records: Optional[List[Any]] = None
|
|
2657
|
-
"""Pandas Dataframe input in the records orientation."""
|
|
2658
|
-
|
|
2659
|
-
dataframe_split: Optional[DataframeSplitInput] = None
|
|
2660
|
-
"""Pandas Dataframe input in the split orientation."""
|
|
2661
|
-
|
|
2662
|
-
extra_params: Optional[Dict[str, str]] = None
|
|
2663
|
-
"""The extra parameters field used ONLY for __completions, chat,__ and __embeddings external &
|
|
2664
|
-
foundation model__ serving endpoints. This is a map of strings and should only be used with
|
|
2665
|
-
other external/foundation model query fields."""
|
|
2666
|
-
|
|
2667
|
-
input: Optional[Any] = None
|
|
2668
|
-
"""The input string (or array of strings) field used ONLY for __embeddings external & foundation
|
|
2669
|
-
model__ serving endpoints and is the only field (along with extra_params if needed) used by
|
|
2670
|
-
embeddings queries."""
|
|
2671
|
-
|
|
2672
|
-
inputs: Optional[Any] = None
|
|
2673
|
-
"""Tensor-based input in columnar format."""
|
|
2674
|
-
|
|
2675
|
-
instances: Optional[List[Any]] = None
|
|
2676
|
-
"""Tensor-based input in row format."""
|
|
2677
|
-
|
|
2678
|
-
max_tokens: Optional[int] = None
|
|
2679
|
-
"""The max tokens field used ONLY for __completions__ and __chat external & foundation model__
|
|
2680
|
-
serving endpoints. This is an integer and should only be used with other chat/completions query
|
|
2681
|
-
fields."""
|
|
2682
|
-
|
|
2683
|
-
messages: Optional[List[ChatMessage]] = None
|
|
2684
|
-
"""The messages field used ONLY for __chat external & foundation model__ serving endpoints. This is
|
|
2685
|
-
a map of strings and should only be used with other chat query fields."""
|
|
2686
|
-
|
|
2687
|
-
n: Optional[int] = None
|
|
2688
|
-
"""The n (number of candidates) field used ONLY for __completions__ and __chat external &
|
|
2689
|
-
foundation model__ serving endpoints. This is an integer between 1 and 5 with a default of 1 and
|
|
2690
|
-
should only be used with other chat/completions query fields."""
|
|
2691
|
-
|
|
2692
|
-
name: Optional[str] = None
|
|
2693
|
-
"""The name of the serving endpoint. This field is required."""
|
|
2694
|
-
|
|
2695
|
-
prompt: Optional[Any] = None
|
|
2696
|
-
"""The prompt string (or array of strings) field used ONLY for __completions external & foundation
|
|
2697
|
-
model__ serving endpoints and should only be used with other completions query fields."""
|
|
2698
|
-
|
|
2699
|
-
stop: Optional[List[str]] = None
|
|
2700
|
-
"""The stop sequences field used ONLY for __completions__ and __chat external & foundation model__
|
|
2701
|
-
serving endpoints. This is a list of strings and should only be used with other chat/completions
|
|
2702
|
-
query fields."""
|
|
2703
|
-
|
|
2704
|
-
stream: Optional[bool] = None
|
|
2705
|
-
"""The stream field used ONLY for __completions__ and __chat external & foundation model__ serving
|
|
2706
|
-
endpoints. This is a boolean defaulting to false and should only be used with other
|
|
2707
|
-
chat/completions query fields."""
|
|
2708
|
-
|
|
2709
|
-
temperature: Optional[float] = None
|
|
2710
|
-
"""The temperature field used ONLY for __completions__ and __chat external & foundation model__
|
|
2711
|
-
serving endpoints. This is a float between 0.0 and 2.0 with a default of 1.0 and should only be
|
|
2712
|
-
used with other chat/completions query fields."""
|
|
2713
|
-
|
|
2714
|
-
def as_dict(self) -> dict:
|
|
2715
|
-
"""Serializes the QueryEndpointInput into a dictionary suitable for use as a JSON request body."""
|
|
2716
|
-
body = {}
|
|
2717
|
-
if self.dataframe_records:
|
|
2718
|
-
body["dataframe_records"] = [v for v in self.dataframe_records]
|
|
2719
|
-
if self.dataframe_split:
|
|
2720
|
-
body["dataframe_split"] = self.dataframe_split.as_dict()
|
|
2721
|
-
if self.extra_params:
|
|
2722
|
-
body["extra_params"] = self.extra_params
|
|
2723
|
-
if self.input:
|
|
2724
|
-
body["input"] = self.input
|
|
2725
|
-
if self.inputs:
|
|
2726
|
-
body["inputs"] = self.inputs
|
|
2727
|
-
if self.instances:
|
|
2728
|
-
body["instances"] = [v for v in self.instances]
|
|
2729
|
-
if self.max_tokens is not None:
|
|
2730
|
-
body["max_tokens"] = self.max_tokens
|
|
2731
|
-
if self.messages:
|
|
2732
|
-
body["messages"] = [v.as_dict() for v in self.messages]
|
|
2733
|
-
if self.n is not None:
|
|
2734
|
-
body["n"] = self.n
|
|
2735
|
-
if self.name is not None:
|
|
2736
|
-
body["name"] = self.name
|
|
2737
|
-
if self.prompt:
|
|
2738
|
-
body["prompt"] = self.prompt
|
|
2739
|
-
if self.stop:
|
|
2740
|
-
body["stop"] = [v for v in self.stop]
|
|
2741
|
-
if self.stream is not None:
|
|
2742
|
-
body["stream"] = self.stream
|
|
2743
|
-
if self.temperature is not None:
|
|
2744
|
-
body["temperature"] = self.temperature
|
|
2745
|
-
return body
|
|
2746
|
-
|
|
2747
|
-
def as_shallow_dict(self) -> dict:
|
|
2748
|
-
"""Serializes the QueryEndpointInput into a shallow dictionary of its immediate attributes."""
|
|
2749
|
-
body = {}
|
|
2750
|
-
if self.dataframe_records:
|
|
2751
|
-
body["dataframe_records"] = self.dataframe_records
|
|
2752
|
-
if self.dataframe_split:
|
|
2753
|
-
body["dataframe_split"] = self.dataframe_split
|
|
2754
|
-
if self.extra_params:
|
|
2755
|
-
body["extra_params"] = self.extra_params
|
|
2756
|
-
if self.input:
|
|
2757
|
-
body["input"] = self.input
|
|
2758
|
-
if self.inputs:
|
|
2759
|
-
body["inputs"] = self.inputs
|
|
2760
|
-
if self.instances:
|
|
2761
|
-
body["instances"] = self.instances
|
|
2762
|
-
if self.max_tokens is not None:
|
|
2763
|
-
body["max_tokens"] = self.max_tokens
|
|
2764
|
-
if self.messages:
|
|
2765
|
-
body["messages"] = self.messages
|
|
2766
|
-
if self.n is not None:
|
|
2767
|
-
body["n"] = self.n
|
|
2768
|
-
if self.name is not None:
|
|
2769
|
-
body["name"] = self.name
|
|
2770
|
-
if self.prompt:
|
|
2771
|
-
body["prompt"] = self.prompt
|
|
2772
|
-
if self.stop:
|
|
2773
|
-
body["stop"] = self.stop
|
|
2774
|
-
if self.stream is not None:
|
|
2775
|
-
body["stream"] = self.stream
|
|
2776
|
-
if self.temperature is not None:
|
|
2777
|
-
body["temperature"] = self.temperature
|
|
2778
|
-
return body
|
|
2779
|
-
|
|
2780
|
-
@classmethod
|
|
2781
|
-
def from_dict(cls, d: Dict[str, Any]) -> QueryEndpointInput:
|
|
2782
|
-
"""Deserializes the QueryEndpointInput from a dictionary."""
|
|
2783
|
-
return cls(
|
|
2784
|
-
dataframe_records=d.get("dataframe_records", None),
|
|
2785
|
-
dataframe_split=_from_dict(d, "dataframe_split", DataframeSplitInput),
|
|
2786
|
-
extra_params=d.get("extra_params", None),
|
|
2787
|
-
input=d.get("input", None),
|
|
2788
|
-
inputs=d.get("inputs", None),
|
|
2789
|
-
instances=d.get("instances", None),
|
|
2790
|
-
max_tokens=d.get("max_tokens", None),
|
|
2791
|
-
messages=_repeated_dict(d, "messages", ChatMessage),
|
|
2792
|
-
n=d.get("n", None),
|
|
2793
|
-
name=d.get("name", None),
|
|
2794
|
-
prompt=d.get("prompt", None),
|
|
2795
|
-
stop=d.get("stop", None),
|
|
2796
|
-
stream=d.get("stream", None),
|
|
2797
|
-
temperature=d.get("temperature", None),
|
|
2798
|
-
)
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
2292
|
@dataclass
|
|
2802
2293
|
class QueryEndpointResponse:
|
|
2803
2294
|
choices: Optional[List[V1ResponseChoiceElement]] = None
|
|
@@ -4314,40 +3805,6 @@ class ServingEndpointPermissionsDescription:
|
|
|
4314
3805
|
)
|
|
4315
3806
|
|
|
4316
3807
|
|
|
4317
|
-
@dataclass
|
|
4318
|
-
class ServingEndpointPermissionsRequest:
|
|
4319
|
-
access_control_list: Optional[List[ServingEndpointAccessControlRequest]] = None
|
|
4320
|
-
|
|
4321
|
-
serving_endpoint_id: Optional[str] = None
|
|
4322
|
-
"""The serving endpoint for which to get or manage permissions."""
|
|
4323
|
-
|
|
4324
|
-
def as_dict(self) -> dict:
|
|
4325
|
-
"""Serializes the ServingEndpointPermissionsRequest into a dictionary suitable for use as a JSON request body."""
|
|
4326
|
-
body = {}
|
|
4327
|
-
if self.access_control_list:
|
|
4328
|
-
body["access_control_list"] = [v.as_dict() for v in self.access_control_list]
|
|
4329
|
-
if self.serving_endpoint_id is not None:
|
|
4330
|
-
body["serving_endpoint_id"] = self.serving_endpoint_id
|
|
4331
|
-
return body
|
|
4332
|
-
|
|
4333
|
-
def as_shallow_dict(self) -> dict:
|
|
4334
|
-
"""Serializes the ServingEndpointPermissionsRequest into a shallow dictionary of its immediate attributes."""
|
|
4335
|
-
body = {}
|
|
4336
|
-
if self.access_control_list:
|
|
4337
|
-
body["access_control_list"] = self.access_control_list
|
|
4338
|
-
if self.serving_endpoint_id is not None:
|
|
4339
|
-
body["serving_endpoint_id"] = self.serving_endpoint_id
|
|
4340
|
-
return body
|
|
4341
|
-
|
|
4342
|
-
@classmethod
|
|
4343
|
-
def from_dict(cls, d: Dict[str, Any]) -> ServingEndpointPermissionsRequest:
|
|
4344
|
-
"""Deserializes the ServingEndpointPermissionsRequest from a dictionary."""
|
|
4345
|
-
return cls(
|
|
4346
|
-
access_control_list=_repeated_dict(d, "access_control_list", ServingEndpointAccessControlRequest),
|
|
4347
|
-
serving_endpoint_id=d.get("serving_endpoint_id", None),
|
|
4348
|
-
)
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
3808
|
class ServingModelWorkloadType(Enum):
|
|
4352
3809
|
"""Please keep this in sync with with workload types in InferenceEndpointEntities.scala"""
|
|
4353
3810
|
|
|
@@ -4383,37 +3840,6 @@ class TrafficConfig:
|
|
|
4383
3840
|
return cls(routes=_repeated_dict(d, "routes", Route))
|
|
4384
3841
|
|
|
4385
3842
|
|
|
4386
|
-
@dataclass
|
|
4387
|
-
class UpdateProvisionedThroughputEndpointConfigRequest:
|
|
4388
|
-
config: PtEndpointCoreConfig
|
|
4389
|
-
|
|
4390
|
-
name: Optional[str] = None
|
|
4391
|
-
"""The name of the pt endpoint to update. This field is required."""
|
|
4392
|
-
|
|
4393
|
-
def as_dict(self) -> dict:
|
|
4394
|
-
"""Serializes the UpdateProvisionedThroughputEndpointConfigRequest into a dictionary suitable for use as a JSON request body."""
|
|
4395
|
-
body = {}
|
|
4396
|
-
if self.config:
|
|
4397
|
-
body["config"] = self.config.as_dict()
|
|
4398
|
-
if self.name is not None:
|
|
4399
|
-
body["name"] = self.name
|
|
4400
|
-
return body
|
|
4401
|
-
|
|
4402
|
-
def as_shallow_dict(self) -> dict:
|
|
4403
|
-
"""Serializes the UpdateProvisionedThroughputEndpointConfigRequest into a shallow dictionary of its immediate attributes."""
|
|
4404
|
-
body = {}
|
|
4405
|
-
if self.config:
|
|
4406
|
-
body["config"] = self.config
|
|
4407
|
-
if self.name is not None:
|
|
4408
|
-
body["name"] = self.name
|
|
4409
|
-
return body
|
|
4410
|
-
|
|
4411
|
-
@classmethod
|
|
4412
|
-
def from_dict(cls, d: Dict[str, Any]) -> UpdateProvisionedThroughputEndpointConfigRequest:
|
|
4413
|
-
"""Deserializes the UpdateProvisionedThroughputEndpointConfigRequest from a dictionary."""
|
|
4414
|
-
return cls(config=_from_dict(d, "config", PtEndpointCoreConfig), name=d.get("name", None))
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
3843
|
@dataclass
|
|
4418
3844
|
class V1ResponseChoiceElement:
|
|
4419
3845
|
finish_reason: Optional[str] = None
|
|
@@ -5074,6 +4500,7 @@ class ServingEndpointsAPI:
|
|
|
5074
4500
|
"Accept": "application/json",
|
|
5075
4501
|
"Content-Type": "application/json",
|
|
5076
4502
|
}
|
|
4503
|
+
|
|
5077
4504
|
response_headers = [
|
|
5078
4505
|
"served-model-name",
|
|
5079
4506
|
]
|
|
@@ -5386,6 +4813,7 @@ class ServingEndpointsDataPlaneAPI:
|
|
|
5386
4813
|
"Accept": "application/json",
|
|
5387
4814
|
"Content-Type": "application/json",
|
|
5388
4815
|
}
|
|
4816
|
+
|
|
5389
4817
|
response_headers = [
|
|
5390
4818
|
"served-model-name",
|
|
5391
4819
|
]
|