databricks-sdk 0.57.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 +38 -9
- databricks/sdk/service/aibuilder.py +0 -163
- databricks/sdk/service/apps.py +53 -49
- databricks/sdk/service/billing.py +62 -223
- databricks/sdk/service/catalog.py +3052 -3707
- databricks/sdk/service/cleanrooms.py +5 -54
- databricks/sdk/service/compute.py +579 -2715
- databricks/sdk/service/dashboards.py +108 -317
- databricks/sdk/service/database.py +603 -122
- databricks/sdk/service/files.py +2 -218
- databricks/sdk/service/iam.py +19 -298
- databricks/sdk/service/jobs.py +77 -1263
- databricks/sdk/service/marketplace.py +3 -575
- databricks/sdk/service/ml.py +816 -2734
- databricks/sdk/service/oauth2.py +122 -238
- databricks/sdk/service/pipelines.py +133 -724
- databricks/sdk/service/provisioning.py +36 -757
- databricks/sdk/service/qualitymonitorv2.py +0 -18
- databricks/sdk/service/serving.py +37 -583
- databricks/sdk/service/settings.py +282 -1768
- databricks/sdk/service/sharing.py +6 -478
- databricks/sdk/service/sql.py +129 -1696
- databricks/sdk/service/vectorsearch.py +0 -410
- databricks/sdk/service/workspace.py +252 -727
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.57.0.dist-info → databricks_sdk-0.59.0.dist-info}/METADATA +1 -1
- {databricks_sdk-0.57.0.dist-info → databricks_sdk-0.59.0.dist-info}/RECORD +31 -31
- {databricks_sdk-0.57.0.dist-info → databricks_sdk-0.59.0.dist-info}/WHEEL +0 -0
- {databricks_sdk-0.57.0.dist-info → databricks_sdk-0.59.0.dist-info}/licenses/LICENSE +0 -0
- {databricks_sdk-0.57.0.dist-info → databricks_sdk-0.59.0.dist-info}/licenses/NOTICE +0 -0
- {databricks_sdk-0.57.0.dist-info → databricks_sdk-0.59.0.dist-info}/top_level.txt +0 -0
|
@@ -299,15 +299,19 @@ 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
|
-
"""Key field for a rate limit. Currently,
|
|
310
|
-
being the default if not specified."""
|
|
309
|
+
"""Key field for a rate limit. Currently, 'user', 'user_group, 'service_principal', and 'endpoint'
|
|
310
|
+
are supported, with 'endpoint' being the default if not specified."""
|
|
311
|
+
|
|
312
|
+
principal: Optional[str] = None
|
|
313
|
+
"""Principal field for a user, user group, or service principal to apply rate limiting to. Accepts
|
|
314
|
+
a user email, group name, or service principal application ID."""
|
|
311
315
|
|
|
312
316
|
def as_dict(self) -> dict:
|
|
313
317
|
"""Serializes the AiGatewayRateLimit into a dictionary suitable for use as a JSON request body."""
|
|
@@ -316,6 +320,8 @@ class AiGatewayRateLimit:
|
|
|
316
320
|
body["calls"] = self.calls
|
|
317
321
|
if self.key is not None:
|
|
318
322
|
body["key"] = self.key.value
|
|
323
|
+
if self.principal is not None:
|
|
324
|
+
body["principal"] = self.principal
|
|
319
325
|
if self.renewal_period is not None:
|
|
320
326
|
body["renewal_period"] = self.renewal_period.value
|
|
321
327
|
return body
|
|
@@ -327,6 +333,8 @@ class AiGatewayRateLimit:
|
|
|
327
333
|
body["calls"] = self.calls
|
|
328
334
|
if self.key is not None:
|
|
329
335
|
body["key"] = self.key
|
|
336
|
+
if self.principal is not None:
|
|
337
|
+
body["principal"] = self.principal
|
|
330
338
|
if self.renewal_period is not None:
|
|
331
339
|
body["renewal_period"] = self.renewal_period
|
|
332
340
|
return body
|
|
@@ -337,6 +345,7 @@ class AiGatewayRateLimit:
|
|
|
337
345
|
return cls(
|
|
338
346
|
calls=d.get("calls", None),
|
|
339
347
|
key=_enum(d, "key", AiGatewayRateLimitKey),
|
|
348
|
+
principal=d.get("principal", None),
|
|
340
349
|
renewal_period=_enum(d, "renewal_period", AiGatewayRateLimitRenewalPeriod),
|
|
341
350
|
)
|
|
342
351
|
|
|
@@ -344,7 +353,9 @@ class AiGatewayRateLimit:
|
|
|
344
353
|
class AiGatewayRateLimitKey(Enum):
|
|
345
354
|
|
|
346
355
|
ENDPOINT = "endpoint"
|
|
356
|
+
SERVICE_PRINCIPAL = "service_principal"
|
|
347
357
|
USER = "user"
|
|
358
|
+
USER_GROUP = "user_group"
|
|
348
359
|
|
|
349
360
|
|
|
350
361
|
class AiGatewayRateLimitRenewalPeriod(Enum):
|
|
@@ -842,145 +853,6 @@ class CohereConfig:
|
|
|
842
853
|
)
|
|
843
854
|
|
|
844
855
|
|
|
845
|
-
@dataclass
|
|
846
|
-
class CreatePtEndpointRequest:
|
|
847
|
-
name: str
|
|
848
|
-
"""The name of the serving endpoint. This field is required and must be unique across a Databricks
|
|
849
|
-
workspace. An endpoint name can consist of alphanumeric characters, dashes, and underscores."""
|
|
850
|
-
|
|
851
|
-
config: PtEndpointCoreConfig
|
|
852
|
-
"""The core config of the serving endpoint."""
|
|
853
|
-
|
|
854
|
-
ai_gateway: Optional[AiGatewayConfig] = None
|
|
855
|
-
"""The AI Gateway configuration for the serving endpoint."""
|
|
856
|
-
|
|
857
|
-
budget_policy_id: Optional[str] = None
|
|
858
|
-
"""The budget policy associated with the endpoint."""
|
|
859
|
-
|
|
860
|
-
tags: Optional[List[EndpointTag]] = None
|
|
861
|
-
"""Tags to be attached to the serving endpoint and automatically propagated to billing logs."""
|
|
862
|
-
|
|
863
|
-
def as_dict(self) -> dict:
|
|
864
|
-
"""Serializes the CreatePtEndpointRequest into a dictionary suitable for use as a JSON request body."""
|
|
865
|
-
body = {}
|
|
866
|
-
if self.ai_gateway:
|
|
867
|
-
body["ai_gateway"] = self.ai_gateway.as_dict()
|
|
868
|
-
if self.budget_policy_id is not None:
|
|
869
|
-
body["budget_policy_id"] = self.budget_policy_id
|
|
870
|
-
if self.config:
|
|
871
|
-
body["config"] = self.config.as_dict()
|
|
872
|
-
if self.name is not None:
|
|
873
|
-
body["name"] = self.name
|
|
874
|
-
if self.tags:
|
|
875
|
-
body["tags"] = [v.as_dict() for v in self.tags]
|
|
876
|
-
return body
|
|
877
|
-
|
|
878
|
-
def as_shallow_dict(self) -> dict:
|
|
879
|
-
"""Serializes the CreatePtEndpointRequest into a shallow dictionary of its immediate attributes."""
|
|
880
|
-
body = {}
|
|
881
|
-
if self.ai_gateway:
|
|
882
|
-
body["ai_gateway"] = self.ai_gateway
|
|
883
|
-
if self.budget_policy_id is not None:
|
|
884
|
-
body["budget_policy_id"] = self.budget_policy_id
|
|
885
|
-
if self.config:
|
|
886
|
-
body["config"] = self.config
|
|
887
|
-
if self.name is not None:
|
|
888
|
-
body["name"] = self.name
|
|
889
|
-
if self.tags:
|
|
890
|
-
body["tags"] = self.tags
|
|
891
|
-
return body
|
|
892
|
-
|
|
893
|
-
@classmethod
|
|
894
|
-
def from_dict(cls, d: Dict[str, Any]) -> CreatePtEndpointRequest:
|
|
895
|
-
"""Deserializes the CreatePtEndpointRequest from a dictionary."""
|
|
896
|
-
return cls(
|
|
897
|
-
ai_gateway=_from_dict(d, "ai_gateway", AiGatewayConfig),
|
|
898
|
-
budget_policy_id=d.get("budget_policy_id", None),
|
|
899
|
-
config=_from_dict(d, "config", PtEndpointCoreConfig),
|
|
900
|
-
name=d.get("name", None),
|
|
901
|
-
tags=_repeated_dict(d, "tags", EndpointTag),
|
|
902
|
-
)
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
@dataclass
|
|
906
|
-
class CreateServingEndpoint:
|
|
907
|
-
name: str
|
|
908
|
-
"""The name of the serving endpoint. This field is required and must be unique across a Databricks
|
|
909
|
-
workspace. An endpoint name can consist of alphanumeric characters, dashes, and underscores."""
|
|
910
|
-
|
|
911
|
-
ai_gateway: Optional[AiGatewayConfig] = None
|
|
912
|
-
"""The AI Gateway configuration for the serving endpoint. NOTE: External model, provisioned
|
|
913
|
-
throughput, and pay-per-token endpoints are fully supported; agent endpoints currently only
|
|
914
|
-
support inference tables."""
|
|
915
|
-
|
|
916
|
-
budget_policy_id: Optional[str] = None
|
|
917
|
-
"""The budget policy to be applied to the serving endpoint."""
|
|
918
|
-
|
|
919
|
-
config: Optional[EndpointCoreConfigInput] = None
|
|
920
|
-
"""The core config of the serving endpoint."""
|
|
921
|
-
|
|
922
|
-
rate_limits: Optional[List[RateLimit]] = None
|
|
923
|
-
"""Rate limits to be applied to the serving endpoint. NOTE: this field is deprecated, please use AI
|
|
924
|
-
Gateway to manage rate limits."""
|
|
925
|
-
|
|
926
|
-
route_optimized: Optional[bool] = None
|
|
927
|
-
"""Enable route optimization for the serving endpoint."""
|
|
928
|
-
|
|
929
|
-
tags: Optional[List[EndpointTag]] = None
|
|
930
|
-
"""Tags to be attached to the serving endpoint and automatically propagated to billing logs."""
|
|
931
|
-
|
|
932
|
-
def as_dict(self) -> dict:
|
|
933
|
-
"""Serializes the CreateServingEndpoint into a dictionary suitable for use as a JSON request body."""
|
|
934
|
-
body = {}
|
|
935
|
-
if self.ai_gateway:
|
|
936
|
-
body["ai_gateway"] = self.ai_gateway.as_dict()
|
|
937
|
-
if self.budget_policy_id is not None:
|
|
938
|
-
body["budget_policy_id"] = self.budget_policy_id
|
|
939
|
-
if self.config:
|
|
940
|
-
body["config"] = self.config.as_dict()
|
|
941
|
-
if self.name is not None:
|
|
942
|
-
body["name"] = self.name
|
|
943
|
-
if self.rate_limits:
|
|
944
|
-
body["rate_limits"] = [v.as_dict() for v in self.rate_limits]
|
|
945
|
-
if self.route_optimized is not None:
|
|
946
|
-
body["route_optimized"] = self.route_optimized
|
|
947
|
-
if self.tags:
|
|
948
|
-
body["tags"] = [v.as_dict() for v in self.tags]
|
|
949
|
-
return body
|
|
950
|
-
|
|
951
|
-
def as_shallow_dict(self) -> dict:
|
|
952
|
-
"""Serializes the CreateServingEndpoint into a shallow dictionary of its immediate attributes."""
|
|
953
|
-
body = {}
|
|
954
|
-
if self.ai_gateway:
|
|
955
|
-
body["ai_gateway"] = self.ai_gateway
|
|
956
|
-
if self.budget_policy_id is not None:
|
|
957
|
-
body["budget_policy_id"] = self.budget_policy_id
|
|
958
|
-
if self.config:
|
|
959
|
-
body["config"] = self.config
|
|
960
|
-
if self.name is not None:
|
|
961
|
-
body["name"] = self.name
|
|
962
|
-
if self.rate_limits:
|
|
963
|
-
body["rate_limits"] = self.rate_limits
|
|
964
|
-
if self.route_optimized is not None:
|
|
965
|
-
body["route_optimized"] = self.route_optimized
|
|
966
|
-
if self.tags:
|
|
967
|
-
body["tags"] = self.tags
|
|
968
|
-
return body
|
|
969
|
-
|
|
970
|
-
@classmethod
|
|
971
|
-
def from_dict(cls, d: Dict[str, Any]) -> CreateServingEndpoint:
|
|
972
|
-
"""Deserializes the CreateServingEndpoint from a dictionary."""
|
|
973
|
-
return cls(
|
|
974
|
-
ai_gateway=_from_dict(d, "ai_gateway", AiGatewayConfig),
|
|
975
|
-
budget_policy_id=d.get("budget_policy_id", None),
|
|
976
|
-
config=_from_dict(d, "config", EndpointCoreConfigInput),
|
|
977
|
-
name=d.get("name", None),
|
|
978
|
-
rate_limits=_repeated_dict(d, "rate_limits", RateLimit),
|
|
979
|
-
route_optimized=d.get("route_optimized", None),
|
|
980
|
-
tags=_repeated_dict(d, "tags", EndpointTag),
|
|
981
|
-
)
|
|
982
|
-
|
|
983
|
-
|
|
984
856
|
@dataclass
|
|
985
857
|
class CustomProviderConfig:
|
|
986
858
|
"""Configs needed to create a custom provider model route."""
|
|
@@ -1583,76 +1455,6 @@ class ExportMetricsResponse:
|
|
|
1583
1455
|
return cls(contents=d.get("contents", None))
|
|
1584
1456
|
|
|
1585
1457
|
|
|
1586
|
-
@dataclass
|
|
1587
|
-
class ExternalFunctionRequest:
|
|
1588
|
-
"""Simple Proto message for testing"""
|
|
1589
|
-
|
|
1590
|
-
connection_name: str
|
|
1591
|
-
"""The connection name to use. This is required to identify the external connection."""
|
|
1592
|
-
|
|
1593
|
-
method: ExternalFunctionRequestHttpMethod
|
|
1594
|
-
"""The HTTP method to use (e.g., 'GET', 'POST')."""
|
|
1595
|
-
|
|
1596
|
-
path: str
|
|
1597
|
-
"""The relative path for the API endpoint. This is required."""
|
|
1598
|
-
|
|
1599
|
-
headers: Optional[str] = None
|
|
1600
|
-
"""Additional headers for the request. If not provided, only auth headers from connections would be
|
|
1601
|
-
passed."""
|
|
1602
|
-
|
|
1603
|
-
json: Optional[str] = None
|
|
1604
|
-
"""The JSON payload to send in the request body."""
|
|
1605
|
-
|
|
1606
|
-
params: Optional[str] = None
|
|
1607
|
-
"""Query parameters for the request."""
|
|
1608
|
-
|
|
1609
|
-
def as_dict(self) -> dict:
|
|
1610
|
-
"""Serializes the ExternalFunctionRequest into a dictionary suitable for use as a JSON request body."""
|
|
1611
|
-
body = {}
|
|
1612
|
-
if self.connection_name is not None:
|
|
1613
|
-
body["connection_name"] = self.connection_name
|
|
1614
|
-
if self.headers is not None:
|
|
1615
|
-
body["headers"] = self.headers
|
|
1616
|
-
if self.json is not None:
|
|
1617
|
-
body["json"] = self.json
|
|
1618
|
-
if self.method is not None:
|
|
1619
|
-
body["method"] = self.method.value
|
|
1620
|
-
if self.params is not None:
|
|
1621
|
-
body["params"] = self.params
|
|
1622
|
-
if self.path is not None:
|
|
1623
|
-
body["path"] = self.path
|
|
1624
|
-
return body
|
|
1625
|
-
|
|
1626
|
-
def as_shallow_dict(self) -> dict:
|
|
1627
|
-
"""Serializes the ExternalFunctionRequest into a shallow dictionary of its immediate attributes."""
|
|
1628
|
-
body = {}
|
|
1629
|
-
if self.connection_name is not None:
|
|
1630
|
-
body["connection_name"] = self.connection_name
|
|
1631
|
-
if self.headers is not None:
|
|
1632
|
-
body["headers"] = self.headers
|
|
1633
|
-
if self.json is not None:
|
|
1634
|
-
body["json"] = self.json
|
|
1635
|
-
if self.method is not None:
|
|
1636
|
-
body["method"] = self.method
|
|
1637
|
-
if self.params is not None:
|
|
1638
|
-
body["params"] = self.params
|
|
1639
|
-
if self.path is not None:
|
|
1640
|
-
body["path"] = self.path
|
|
1641
|
-
return body
|
|
1642
|
-
|
|
1643
|
-
@classmethod
|
|
1644
|
-
def from_dict(cls, d: Dict[str, Any]) -> ExternalFunctionRequest:
|
|
1645
|
-
"""Deserializes the ExternalFunctionRequest from a dictionary."""
|
|
1646
|
-
return cls(
|
|
1647
|
-
connection_name=d.get("connection_name", None),
|
|
1648
|
-
headers=d.get("headers", None),
|
|
1649
|
-
json=d.get("json", None),
|
|
1650
|
-
method=_enum(d, "method", ExternalFunctionRequestHttpMethod),
|
|
1651
|
-
params=d.get("params", None),
|
|
1652
|
-
path=d.get("path", None),
|
|
1653
|
-
)
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
1458
|
class ExternalFunctionRequestHttpMethod(Enum):
|
|
1657
1459
|
|
|
1658
1460
|
DELETE = "DELETE"
|
|
@@ -2273,49 +2075,6 @@ class PaLmConfig:
|
|
|
2273
2075
|
)
|
|
2274
2076
|
|
|
2275
2077
|
|
|
2276
|
-
@dataclass
|
|
2277
|
-
class PatchServingEndpointTags:
|
|
2278
|
-
add_tags: Optional[List[EndpointTag]] = None
|
|
2279
|
-
"""List of endpoint tags to add"""
|
|
2280
|
-
|
|
2281
|
-
delete_tags: Optional[List[str]] = None
|
|
2282
|
-
"""List of tag keys to delete"""
|
|
2283
|
-
|
|
2284
|
-
name: Optional[str] = None
|
|
2285
|
-
"""The name of the serving endpoint who's tags to patch. This field is required."""
|
|
2286
|
-
|
|
2287
|
-
def as_dict(self) -> dict:
|
|
2288
|
-
"""Serializes the PatchServingEndpointTags into a dictionary suitable for use as a JSON request body."""
|
|
2289
|
-
body = {}
|
|
2290
|
-
if self.add_tags:
|
|
2291
|
-
body["add_tags"] = [v.as_dict() for v in self.add_tags]
|
|
2292
|
-
if self.delete_tags:
|
|
2293
|
-
body["delete_tags"] = [v for v in self.delete_tags]
|
|
2294
|
-
if self.name is not None:
|
|
2295
|
-
body["name"] = self.name
|
|
2296
|
-
return body
|
|
2297
|
-
|
|
2298
|
-
def as_shallow_dict(self) -> dict:
|
|
2299
|
-
"""Serializes the PatchServingEndpointTags into a shallow dictionary of its immediate attributes."""
|
|
2300
|
-
body = {}
|
|
2301
|
-
if self.add_tags:
|
|
2302
|
-
body["add_tags"] = self.add_tags
|
|
2303
|
-
if self.delete_tags:
|
|
2304
|
-
body["delete_tags"] = self.delete_tags
|
|
2305
|
-
if self.name is not None:
|
|
2306
|
-
body["name"] = self.name
|
|
2307
|
-
return body
|
|
2308
|
-
|
|
2309
|
-
@classmethod
|
|
2310
|
-
def from_dict(cls, d: Dict[str, Any]) -> PatchServingEndpointTags:
|
|
2311
|
-
"""Deserializes the PatchServingEndpointTags from a dictionary."""
|
|
2312
|
-
return cls(
|
|
2313
|
-
add_tags=_repeated_dict(d, "add_tags", EndpointTag),
|
|
2314
|
-
delete_tags=d.get("delete_tags", None),
|
|
2315
|
-
name=d.get("name", None),
|
|
2316
|
-
)
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
2078
|
@dataclass
|
|
2320
2079
|
class PayloadTable:
|
|
2321
2080
|
name: Optional[str] = None
|
|
@@ -2442,77 +2201,6 @@ class PtServedModel:
|
|
|
2442
2201
|
)
|
|
2443
2202
|
|
|
2444
2203
|
|
|
2445
|
-
@dataclass
|
|
2446
|
-
class PutAiGatewayRequest:
|
|
2447
|
-
fallback_config: Optional[FallbackConfig] = None
|
|
2448
|
-
"""Configuration for traffic fallback which auto fallbacks to other served entities if the request
|
|
2449
|
-
to a served entity fails with certain error codes, to increase availability."""
|
|
2450
|
-
|
|
2451
|
-
guardrails: Optional[AiGatewayGuardrails] = None
|
|
2452
|
-
"""Configuration for AI Guardrails to prevent unwanted data and unsafe data in requests and
|
|
2453
|
-
responses."""
|
|
2454
|
-
|
|
2455
|
-
inference_table_config: Optional[AiGatewayInferenceTableConfig] = None
|
|
2456
|
-
"""Configuration for payload logging using inference tables. Use these tables to monitor and audit
|
|
2457
|
-
data being sent to and received from model APIs and to improve model quality."""
|
|
2458
|
-
|
|
2459
|
-
name: Optional[str] = None
|
|
2460
|
-
"""The name of the serving endpoint whose AI Gateway is being updated. This field is required."""
|
|
2461
|
-
|
|
2462
|
-
rate_limits: Optional[List[AiGatewayRateLimit]] = None
|
|
2463
|
-
"""Configuration for rate limits which can be set to limit endpoint traffic."""
|
|
2464
|
-
|
|
2465
|
-
usage_tracking_config: Optional[AiGatewayUsageTrackingConfig] = None
|
|
2466
|
-
"""Configuration to enable usage tracking using system tables. These tables allow you to monitor
|
|
2467
|
-
operational usage on endpoints and their associated costs."""
|
|
2468
|
-
|
|
2469
|
-
def as_dict(self) -> dict:
|
|
2470
|
-
"""Serializes the PutAiGatewayRequest into a dictionary suitable for use as a JSON request body."""
|
|
2471
|
-
body = {}
|
|
2472
|
-
if self.fallback_config:
|
|
2473
|
-
body["fallback_config"] = self.fallback_config.as_dict()
|
|
2474
|
-
if self.guardrails:
|
|
2475
|
-
body["guardrails"] = self.guardrails.as_dict()
|
|
2476
|
-
if self.inference_table_config:
|
|
2477
|
-
body["inference_table_config"] = self.inference_table_config.as_dict()
|
|
2478
|
-
if self.name is not None:
|
|
2479
|
-
body["name"] = self.name
|
|
2480
|
-
if self.rate_limits:
|
|
2481
|
-
body["rate_limits"] = [v.as_dict() for v in self.rate_limits]
|
|
2482
|
-
if self.usage_tracking_config:
|
|
2483
|
-
body["usage_tracking_config"] = self.usage_tracking_config.as_dict()
|
|
2484
|
-
return body
|
|
2485
|
-
|
|
2486
|
-
def as_shallow_dict(self) -> dict:
|
|
2487
|
-
"""Serializes the PutAiGatewayRequest into a shallow dictionary of its immediate attributes."""
|
|
2488
|
-
body = {}
|
|
2489
|
-
if self.fallback_config:
|
|
2490
|
-
body["fallback_config"] = self.fallback_config
|
|
2491
|
-
if self.guardrails:
|
|
2492
|
-
body["guardrails"] = self.guardrails
|
|
2493
|
-
if self.inference_table_config:
|
|
2494
|
-
body["inference_table_config"] = self.inference_table_config
|
|
2495
|
-
if self.name is not None:
|
|
2496
|
-
body["name"] = self.name
|
|
2497
|
-
if self.rate_limits:
|
|
2498
|
-
body["rate_limits"] = self.rate_limits
|
|
2499
|
-
if self.usage_tracking_config:
|
|
2500
|
-
body["usage_tracking_config"] = self.usage_tracking_config
|
|
2501
|
-
return body
|
|
2502
|
-
|
|
2503
|
-
@classmethod
|
|
2504
|
-
def from_dict(cls, d: Dict[str, Any]) -> PutAiGatewayRequest:
|
|
2505
|
-
"""Deserializes the PutAiGatewayRequest from a dictionary."""
|
|
2506
|
-
return cls(
|
|
2507
|
-
fallback_config=_from_dict(d, "fallback_config", FallbackConfig),
|
|
2508
|
-
guardrails=_from_dict(d, "guardrails", AiGatewayGuardrails),
|
|
2509
|
-
inference_table_config=_from_dict(d, "inference_table_config", AiGatewayInferenceTableConfig),
|
|
2510
|
-
name=d.get("name", None),
|
|
2511
|
-
rate_limits=_repeated_dict(d, "rate_limits", AiGatewayRateLimit),
|
|
2512
|
-
usage_tracking_config=_from_dict(d, "usage_tracking_config", AiGatewayUsageTrackingConfig),
|
|
2513
|
-
)
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
2204
|
@dataclass
|
|
2517
2205
|
class PutAiGatewayResponse:
|
|
2518
2206
|
fallback_config: Optional[FallbackConfig] = None
|
|
@@ -2576,38 +2264,6 @@ class PutAiGatewayResponse:
|
|
|
2576
2264
|
)
|
|
2577
2265
|
|
|
2578
2266
|
|
|
2579
|
-
@dataclass
|
|
2580
|
-
class PutRequest:
|
|
2581
|
-
name: Optional[str] = None
|
|
2582
|
-
"""The name of the serving endpoint whose rate limits are being updated. This field is required."""
|
|
2583
|
-
|
|
2584
|
-
rate_limits: Optional[List[RateLimit]] = None
|
|
2585
|
-
"""The list of endpoint rate limits."""
|
|
2586
|
-
|
|
2587
|
-
def as_dict(self) -> dict:
|
|
2588
|
-
"""Serializes the PutRequest into a dictionary suitable for use as a JSON request body."""
|
|
2589
|
-
body = {}
|
|
2590
|
-
if self.name is not None:
|
|
2591
|
-
body["name"] = self.name
|
|
2592
|
-
if self.rate_limits:
|
|
2593
|
-
body["rate_limits"] = [v.as_dict() for v in self.rate_limits]
|
|
2594
|
-
return body
|
|
2595
|
-
|
|
2596
|
-
def as_shallow_dict(self) -> dict:
|
|
2597
|
-
"""Serializes the PutRequest into a shallow dictionary of its immediate attributes."""
|
|
2598
|
-
body = {}
|
|
2599
|
-
if self.name is not None:
|
|
2600
|
-
body["name"] = self.name
|
|
2601
|
-
if self.rate_limits:
|
|
2602
|
-
body["rate_limits"] = self.rate_limits
|
|
2603
|
-
return body
|
|
2604
|
-
|
|
2605
|
-
@classmethod
|
|
2606
|
-
def from_dict(cls, d: Dict[str, Any]) -> PutRequest:
|
|
2607
|
-
"""Deserializes the PutRequest from a dictionary."""
|
|
2608
|
-
return cls(name=d.get("name", None), rate_limits=_repeated_dict(d, "rate_limits", RateLimit))
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
2267
|
@dataclass
|
|
2612
2268
|
class PutResponse:
|
|
2613
2269
|
rate_limits: Optional[List[RateLimit]] = None
|
|
@@ -2633,153 +2289,6 @@ class PutResponse:
|
|
|
2633
2289
|
return cls(rate_limits=_repeated_dict(d, "rate_limits", RateLimit))
|
|
2634
2290
|
|
|
2635
2291
|
|
|
2636
|
-
@dataclass
|
|
2637
|
-
class QueryEndpointInput:
|
|
2638
|
-
dataframe_records: Optional[List[Any]] = None
|
|
2639
|
-
"""Pandas Dataframe input in the records orientation."""
|
|
2640
|
-
|
|
2641
|
-
dataframe_split: Optional[DataframeSplitInput] = None
|
|
2642
|
-
"""Pandas Dataframe input in the split orientation."""
|
|
2643
|
-
|
|
2644
|
-
extra_params: Optional[Dict[str, str]] = None
|
|
2645
|
-
"""The extra parameters field used ONLY for __completions, chat,__ and __embeddings external &
|
|
2646
|
-
foundation model__ serving endpoints. This is a map of strings and should only be used with
|
|
2647
|
-
other external/foundation model query fields."""
|
|
2648
|
-
|
|
2649
|
-
input: Optional[Any] = None
|
|
2650
|
-
"""The input string (or array of strings) field used ONLY for __embeddings external & foundation
|
|
2651
|
-
model__ serving endpoints and is the only field (along with extra_params if needed) used by
|
|
2652
|
-
embeddings queries."""
|
|
2653
|
-
|
|
2654
|
-
inputs: Optional[Any] = None
|
|
2655
|
-
"""Tensor-based input in columnar format."""
|
|
2656
|
-
|
|
2657
|
-
instances: Optional[List[Any]] = None
|
|
2658
|
-
"""Tensor-based input in row format."""
|
|
2659
|
-
|
|
2660
|
-
max_tokens: Optional[int] = None
|
|
2661
|
-
"""The max tokens field used ONLY for __completions__ and __chat external & foundation model__
|
|
2662
|
-
serving endpoints. This is an integer and should only be used with other chat/completions query
|
|
2663
|
-
fields."""
|
|
2664
|
-
|
|
2665
|
-
messages: Optional[List[ChatMessage]] = None
|
|
2666
|
-
"""The messages field used ONLY for __chat external & foundation model__ serving endpoints. This is
|
|
2667
|
-
a map of strings and should only be used with other chat query fields."""
|
|
2668
|
-
|
|
2669
|
-
n: Optional[int] = None
|
|
2670
|
-
"""The n (number of candidates) field used ONLY for __completions__ and __chat external &
|
|
2671
|
-
foundation model__ serving endpoints. This is an integer between 1 and 5 with a default of 1 and
|
|
2672
|
-
should only be used with other chat/completions query fields."""
|
|
2673
|
-
|
|
2674
|
-
name: Optional[str] = None
|
|
2675
|
-
"""The name of the serving endpoint. This field is required."""
|
|
2676
|
-
|
|
2677
|
-
prompt: Optional[Any] = None
|
|
2678
|
-
"""The prompt string (or array of strings) field used ONLY for __completions external & foundation
|
|
2679
|
-
model__ serving endpoints and should only be used with other completions query fields."""
|
|
2680
|
-
|
|
2681
|
-
stop: Optional[List[str]] = None
|
|
2682
|
-
"""The stop sequences field used ONLY for __completions__ and __chat external & foundation model__
|
|
2683
|
-
serving endpoints. This is a list of strings and should only be used with other chat/completions
|
|
2684
|
-
query fields."""
|
|
2685
|
-
|
|
2686
|
-
stream: Optional[bool] = None
|
|
2687
|
-
"""The stream field used ONLY for __completions__ and __chat external & foundation model__ serving
|
|
2688
|
-
endpoints. This is a boolean defaulting to false and should only be used with other
|
|
2689
|
-
chat/completions query fields."""
|
|
2690
|
-
|
|
2691
|
-
temperature: Optional[float] = None
|
|
2692
|
-
"""The temperature field used ONLY for __completions__ and __chat external & foundation model__
|
|
2693
|
-
serving endpoints. This is a float between 0.0 and 2.0 with a default of 1.0 and should only be
|
|
2694
|
-
used with other chat/completions query fields."""
|
|
2695
|
-
|
|
2696
|
-
def as_dict(self) -> dict:
|
|
2697
|
-
"""Serializes the QueryEndpointInput into a dictionary suitable for use as a JSON request body."""
|
|
2698
|
-
body = {}
|
|
2699
|
-
if self.dataframe_records:
|
|
2700
|
-
body["dataframe_records"] = [v for v in self.dataframe_records]
|
|
2701
|
-
if self.dataframe_split:
|
|
2702
|
-
body["dataframe_split"] = self.dataframe_split.as_dict()
|
|
2703
|
-
if self.extra_params:
|
|
2704
|
-
body["extra_params"] = self.extra_params
|
|
2705
|
-
if self.input:
|
|
2706
|
-
body["input"] = self.input
|
|
2707
|
-
if self.inputs:
|
|
2708
|
-
body["inputs"] = self.inputs
|
|
2709
|
-
if self.instances:
|
|
2710
|
-
body["instances"] = [v for v in self.instances]
|
|
2711
|
-
if self.max_tokens is not None:
|
|
2712
|
-
body["max_tokens"] = self.max_tokens
|
|
2713
|
-
if self.messages:
|
|
2714
|
-
body["messages"] = [v.as_dict() for v in self.messages]
|
|
2715
|
-
if self.n is not None:
|
|
2716
|
-
body["n"] = self.n
|
|
2717
|
-
if self.name is not None:
|
|
2718
|
-
body["name"] = self.name
|
|
2719
|
-
if self.prompt:
|
|
2720
|
-
body["prompt"] = self.prompt
|
|
2721
|
-
if self.stop:
|
|
2722
|
-
body["stop"] = [v for v in self.stop]
|
|
2723
|
-
if self.stream is not None:
|
|
2724
|
-
body["stream"] = self.stream
|
|
2725
|
-
if self.temperature is not None:
|
|
2726
|
-
body["temperature"] = self.temperature
|
|
2727
|
-
return body
|
|
2728
|
-
|
|
2729
|
-
def as_shallow_dict(self) -> dict:
|
|
2730
|
-
"""Serializes the QueryEndpointInput into a shallow dictionary of its immediate attributes."""
|
|
2731
|
-
body = {}
|
|
2732
|
-
if self.dataframe_records:
|
|
2733
|
-
body["dataframe_records"] = self.dataframe_records
|
|
2734
|
-
if self.dataframe_split:
|
|
2735
|
-
body["dataframe_split"] = self.dataframe_split
|
|
2736
|
-
if self.extra_params:
|
|
2737
|
-
body["extra_params"] = self.extra_params
|
|
2738
|
-
if self.input:
|
|
2739
|
-
body["input"] = self.input
|
|
2740
|
-
if self.inputs:
|
|
2741
|
-
body["inputs"] = self.inputs
|
|
2742
|
-
if self.instances:
|
|
2743
|
-
body["instances"] = self.instances
|
|
2744
|
-
if self.max_tokens is not None:
|
|
2745
|
-
body["max_tokens"] = self.max_tokens
|
|
2746
|
-
if self.messages:
|
|
2747
|
-
body["messages"] = self.messages
|
|
2748
|
-
if self.n is not None:
|
|
2749
|
-
body["n"] = self.n
|
|
2750
|
-
if self.name is not None:
|
|
2751
|
-
body["name"] = self.name
|
|
2752
|
-
if self.prompt:
|
|
2753
|
-
body["prompt"] = self.prompt
|
|
2754
|
-
if self.stop:
|
|
2755
|
-
body["stop"] = self.stop
|
|
2756
|
-
if self.stream is not None:
|
|
2757
|
-
body["stream"] = self.stream
|
|
2758
|
-
if self.temperature is not None:
|
|
2759
|
-
body["temperature"] = self.temperature
|
|
2760
|
-
return body
|
|
2761
|
-
|
|
2762
|
-
@classmethod
|
|
2763
|
-
def from_dict(cls, d: Dict[str, Any]) -> QueryEndpointInput:
|
|
2764
|
-
"""Deserializes the QueryEndpointInput from a dictionary."""
|
|
2765
|
-
return cls(
|
|
2766
|
-
dataframe_records=d.get("dataframe_records", None),
|
|
2767
|
-
dataframe_split=_from_dict(d, "dataframe_split", DataframeSplitInput),
|
|
2768
|
-
extra_params=d.get("extra_params", None),
|
|
2769
|
-
input=d.get("input", None),
|
|
2770
|
-
inputs=d.get("inputs", None),
|
|
2771
|
-
instances=d.get("instances", None),
|
|
2772
|
-
max_tokens=d.get("max_tokens", None),
|
|
2773
|
-
messages=_repeated_dict(d, "messages", ChatMessage),
|
|
2774
|
-
n=d.get("n", None),
|
|
2775
|
-
name=d.get("name", None),
|
|
2776
|
-
prompt=d.get("prompt", None),
|
|
2777
|
-
stop=d.get("stop", None),
|
|
2778
|
-
stream=d.get("stream", None),
|
|
2779
|
-
temperature=d.get("temperature", None),
|
|
2780
|
-
)
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
2292
|
@dataclass
|
|
2784
2293
|
class QueryEndpointResponse:
|
|
2785
2294
|
choices: Optional[List[V1ResponseChoiceElement]] = None
|
|
@@ -2945,16 +2454,20 @@ class RateLimitRenewalPeriod(Enum):
|
|
|
2945
2454
|
|
|
2946
2455
|
@dataclass
|
|
2947
2456
|
class Route:
|
|
2948
|
-
served_model_name: str
|
|
2949
|
-
"""The name of the served model this route configures traffic for."""
|
|
2950
|
-
|
|
2951
2457
|
traffic_percentage: int
|
|
2952
2458
|
"""The percentage of endpoint traffic to send to this route. It must be an integer between 0 and
|
|
2953
2459
|
100 inclusive."""
|
|
2954
2460
|
|
|
2461
|
+
served_entity_name: Optional[str] = None
|
|
2462
|
+
|
|
2463
|
+
served_model_name: Optional[str] = None
|
|
2464
|
+
"""The name of the served model this route configures traffic for."""
|
|
2465
|
+
|
|
2955
2466
|
def as_dict(self) -> dict:
|
|
2956
2467
|
"""Serializes the Route into a dictionary suitable for use as a JSON request body."""
|
|
2957
2468
|
body = {}
|
|
2469
|
+
if self.served_entity_name is not None:
|
|
2470
|
+
body["served_entity_name"] = self.served_entity_name
|
|
2958
2471
|
if self.served_model_name is not None:
|
|
2959
2472
|
body["served_model_name"] = self.served_model_name
|
|
2960
2473
|
if self.traffic_percentage is not None:
|
|
@@ -2964,6 +2477,8 @@ class Route:
|
|
|
2964
2477
|
def as_shallow_dict(self) -> dict:
|
|
2965
2478
|
"""Serializes the Route into a shallow dictionary of its immediate attributes."""
|
|
2966
2479
|
body = {}
|
|
2480
|
+
if self.served_entity_name is not None:
|
|
2481
|
+
body["served_entity_name"] = self.served_entity_name
|
|
2967
2482
|
if self.served_model_name is not None:
|
|
2968
2483
|
body["served_model_name"] = self.served_model_name
|
|
2969
2484
|
if self.traffic_percentage is not None:
|
|
@@ -2974,7 +2489,9 @@ class Route:
|
|
|
2974
2489
|
def from_dict(cls, d: Dict[str, Any]) -> Route:
|
|
2975
2490
|
"""Deserializes the Route from a dictionary."""
|
|
2976
2491
|
return cls(
|
|
2977
|
-
|
|
2492
|
+
served_entity_name=d.get("served_entity_name", None),
|
|
2493
|
+
served_model_name=d.get("served_model_name", None),
|
|
2494
|
+
traffic_percentage=d.get("traffic_percentage", None),
|
|
2978
2495
|
)
|
|
2979
2496
|
|
|
2980
2497
|
|
|
@@ -3164,8 +2681,6 @@ class ServedEntityOutput:
|
|
|
3164
2681
|
external_model later. The task type of all external models within an endpoint must be the same."""
|
|
3165
2682
|
|
|
3166
2683
|
foundation_model: Optional[FoundationModel] = None
|
|
3167
|
-
"""All fields are not sensitive as they are hard-coded in the system and made available to
|
|
3168
|
-
customers."""
|
|
3169
2684
|
|
|
3170
2685
|
instance_profile_arn: Optional[str] = None
|
|
3171
2686
|
"""ARN of the instance profile that the served entity uses to access AWS resources."""
|
|
@@ -3331,8 +2846,6 @@ class ServedEntitySpec:
|
|
|
3331
2846
|
external_model: Optional[ExternalModel] = None
|
|
3332
2847
|
|
|
3333
2848
|
foundation_model: Optional[FoundationModel] = None
|
|
3334
|
-
"""All fields are not sensitive as they are hard-coded in the system and made available to
|
|
3335
|
-
customers."""
|
|
3336
2849
|
|
|
3337
2850
|
name: Optional[str] = None
|
|
3338
2851
|
|
|
@@ -3903,7 +3416,6 @@ class ServingEndpointAccessControlRequest:
|
|
|
3903
3416
|
"""name of the group"""
|
|
3904
3417
|
|
|
3905
3418
|
permission_level: Optional[ServingEndpointPermissionLevel] = None
|
|
3906
|
-
"""Permission level"""
|
|
3907
3419
|
|
|
3908
3420
|
service_principal_name: Optional[str] = None
|
|
3909
3421
|
"""application ID of a service principal"""
|
|
@@ -4179,7 +3691,6 @@ class ServingEndpointPermission:
|
|
|
4179
3691
|
inherited_from_object: Optional[List[str]] = None
|
|
4180
3692
|
|
|
4181
3693
|
permission_level: Optional[ServingEndpointPermissionLevel] = None
|
|
4182
|
-
"""Permission level"""
|
|
4183
3694
|
|
|
4184
3695
|
def as_dict(self) -> dict:
|
|
4185
3696
|
"""Serializes the ServingEndpointPermission into a dictionary suitable for use as a JSON request body."""
|
|
@@ -4266,7 +3777,6 @@ class ServingEndpointPermissionsDescription:
|
|
|
4266
3777
|
description: Optional[str] = None
|
|
4267
3778
|
|
|
4268
3779
|
permission_level: Optional[ServingEndpointPermissionLevel] = None
|
|
4269
|
-
"""Permission level"""
|
|
4270
3780
|
|
|
4271
3781
|
def as_dict(self) -> dict:
|
|
4272
3782
|
"""Serializes the ServingEndpointPermissionsDescription into a dictionary suitable for use as a JSON request body."""
|
|
@@ -4295,40 +3805,6 @@ class ServingEndpointPermissionsDescription:
|
|
|
4295
3805
|
)
|
|
4296
3806
|
|
|
4297
3807
|
|
|
4298
|
-
@dataclass
|
|
4299
|
-
class ServingEndpointPermissionsRequest:
|
|
4300
|
-
access_control_list: Optional[List[ServingEndpointAccessControlRequest]] = None
|
|
4301
|
-
|
|
4302
|
-
serving_endpoint_id: Optional[str] = None
|
|
4303
|
-
"""The serving endpoint for which to get or manage permissions."""
|
|
4304
|
-
|
|
4305
|
-
def as_dict(self) -> dict:
|
|
4306
|
-
"""Serializes the ServingEndpointPermissionsRequest into a dictionary suitable for use as a JSON request body."""
|
|
4307
|
-
body = {}
|
|
4308
|
-
if self.access_control_list:
|
|
4309
|
-
body["access_control_list"] = [v.as_dict() for v in self.access_control_list]
|
|
4310
|
-
if self.serving_endpoint_id is not None:
|
|
4311
|
-
body["serving_endpoint_id"] = self.serving_endpoint_id
|
|
4312
|
-
return body
|
|
4313
|
-
|
|
4314
|
-
def as_shallow_dict(self) -> dict:
|
|
4315
|
-
"""Serializes the ServingEndpointPermissionsRequest into a shallow dictionary of its immediate attributes."""
|
|
4316
|
-
body = {}
|
|
4317
|
-
if self.access_control_list:
|
|
4318
|
-
body["access_control_list"] = self.access_control_list
|
|
4319
|
-
if self.serving_endpoint_id is not None:
|
|
4320
|
-
body["serving_endpoint_id"] = self.serving_endpoint_id
|
|
4321
|
-
return body
|
|
4322
|
-
|
|
4323
|
-
@classmethod
|
|
4324
|
-
def from_dict(cls, d: Dict[str, Any]) -> ServingEndpointPermissionsRequest:
|
|
4325
|
-
"""Deserializes the ServingEndpointPermissionsRequest from a dictionary."""
|
|
4326
|
-
return cls(
|
|
4327
|
-
access_control_list=_repeated_dict(d, "access_control_list", ServingEndpointAccessControlRequest),
|
|
4328
|
-
serving_endpoint_id=d.get("serving_endpoint_id", None),
|
|
4329
|
-
)
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
3808
|
class ServingModelWorkloadType(Enum):
|
|
4333
3809
|
"""Please keep this in sync with with workload types in InferenceEndpointEntities.scala"""
|
|
4334
3810
|
|
|
@@ -4364,37 +3840,6 @@ class TrafficConfig:
|
|
|
4364
3840
|
return cls(routes=_repeated_dict(d, "routes", Route))
|
|
4365
3841
|
|
|
4366
3842
|
|
|
4367
|
-
@dataclass
|
|
4368
|
-
class UpdateProvisionedThroughputEndpointConfigRequest:
|
|
4369
|
-
config: PtEndpointCoreConfig
|
|
4370
|
-
|
|
4371
|
-
name: Optional[str] = None
|
|
4372
|
-
"""The name of the pt endpoint to update. This field is required."""
|
|
4373
|
-
|
|
4374
|
-
def as_dict(self) -> dict:
|
|
4375
|
-
"""Serializes the UpdateProvisionedThroughputEndpointConfigRequest into a dictionary suitable for use as a JSON request body."""
|
|
4376
|
-
body = {}
|
|
4377
|
-
if self.config:
|
|
4378
|
-
body["config"] = self.config.as_dict()
|
|
4379
|
-
if self.name is not None:
|
|
4380
|
-
body["name"] = self.name
|
|
4381
|
-
return body
|
|
4382
|
-
|
|
4383
|
-
def as_shallow_dict(self) -> dict:
|
|
4384
|
-
"""Serializes the UpdateProvisionedThroughputEndpointConfigRequest into a shallow dictionary of its immediate attributes."""
|
|
4385
|
-
body = {}
|
|
4386
|
-
if self.config:
|
|
4387
|
-
body["config"] = self.config
|
|
4388
|
-
if self.name is not None:
|
|
4389
|
-
body["name"] = self.name
|
|
4390
|
-
return body
|
|
4391
|
-
|
|
4392
|
-
@classmethod
|
|
4393
|
-
def from_dict(cls, d: Dict[str, Any]) -> UpdateProvisionedThroughputEndpointConfigRequest:
|
|
4394
|
-
"""Deserializes the UpdateProvisionedThroughputEndpointConfigRequest from a dictionary."""
|
|
4395
|
-
return cls(config=_from_dict(d, "config", PtEndpointCoreConfig), name=d.get("name", None))
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
3843
|
@dataclass
|
|
4399
3844
|
class V1ResponseChoiceElement:
|
|
4400
3845
|
finish_reason: Optional[str] = None
|
|
@@ -4531,6 +3976,7 @@ class ServingEndpointsAPI:
|
|
|
4531
3976
|
ai_gateway: Optional[AiGatewayConfig] = None,
|
|
4532
3977
|
budget_policy_id: Optional[str] = None,
|
|
4533
3978
|
config: Optional[EndpointCoreConfigInput] = None,
|
|
3979
|
+
description: Optional[str] = None,
|
|
4534
3980
|
rate_limits: Optional[List[RateLimit]] = None,
|
|
4535
3981
|
route_optimized: Optional[bool] = None,
|
|
4536
3982
|
tags: Optional[List[EndpointTag]] = None,
|
|
@@ -4548,6 +3994,7 @@ class ServingEndpointsAPI:
|
|
|
4548
3994
|
The budget policy to be applied to the serving endpoint.
|
|
4549
3995
|
:param config: :class:`EndpointCoreConfigInput` (optional)
|
|
4550
3996
|
The core config of the serving endpoint.
|
|
3997
|
+
:param description: str (optional)
|
|
4551
3998
|
:param rate_limits: List[:class:`RateLimit`] (optional)
|
|
4552
3999
|
Rate limits to be applied to the serving endpoint. NOTE: this field is deprecated, please use AI
|
|
4553
4000
|
Gateway to manage rate limits.
|
|
@@ -4567,6 +4014,8 @@ class ServingEndpointsAPI:
|
|
|
4567
4014
|
body["budget_policy_id"] = budget_policy_id
|
|
4568
4015
|
if config is not None:
|
|
4569
4016
|
body["config"] = config.as_dict()
|
|
4017
|
+
if description is not None:
|
|
4018
|
+
body["description"] = description
|
|
4570
4019
|
if name is not None:
|
|
4571
4020
|
body["name"] = name
|
|
4572
4021
|
if rate_limits is not None:
|
|
@@ -4594,6 +4043,7 @@ class ServingEndpointsAPI:
|
|
|
4594
4043
|
ai_gateway: Optional[AiGatewayConfig] = None,
|
|
4595
4044
|
budget_policy_id: Optional[str] = None,
|
|
4596
4045
|
config: Optional[EndpointCoreConfigInput] = None,
|
|
4046
|
+
description: Optional[str] = None,
|
|
4597
4047
|
rate_limits: Optional[List[RateLimit]] = None,
|
|
4598
4048
|
route_optimized: Optional[bool] = None,
|
|
4599
4049
|
tags: Optional[List[EndpointTag]] = None,
|
|
@@ -4603,6 +4053,7 @@ class ServingEndpointsAPI:
|
|
|
4603
4053
|
ai_gateway=ai_gateway,
|
|
4604
4054
|
budget_policy_id=budget_policy_id,
|
|
4605
4055
|
config=config,
|
|
4056
|
+
description=description,
|
|
4606
4057
|
name=name,
|
|
4607
4058
|
rate_limits=rate_limits,
|
|
4608
4059
|
route_optimized=route_optimized,
|
|
@@ -4822,6 +4273,7 @@ class ServingEndpointsAPI:
|
|
|
4822
4273
|
def list(self) -> Iterator[ServingEndpoint]:
|
|
4823
4274
|
"""Get all serving endpoints.
|
|
4824
4275
|
|
|
4276
|
+
|
|
4825
4277
|
:returns: Iterator over :class:`ServingEndpoint`
|
|
4826
4278
|
"""
|
|
4827
4279
|
|
|
@@ -5048,6 +4500,7 @@ class ServingEndpointsAPI:
|
|
|
5048
4500
|
"Accept": "application/json",
|
|
5049
4501
|
"Content-Type": "application/json",
|
|
5050
4502
|
}
|
|
4503
|
+
|
|
5051
4504
|
response_headers = [
|
|
5052
4505
|
"served-model-name",
|
|
5053
4506
|
]
|
|
@@ -5360,6 +4813,7 @@ class ServingEndpointsDataPlaneAPI:
|
|
|
5360
4813
|
"Accept": "application/json",
|
|
5361
4814
|
"Content-Type": "application/json",
|
|
5362
4815
|
}
|
|
4816
|
+
|
|
5363
4817
|
response_headers = [
|
|
5364
4818
|
"served-model-name",
|
|
5365
4819
|
]
|