blaxel 0.1.9rc35__py3-none-any.whl → 0.1.9rc36__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. blaxel/agents/__init__.py +1 -1
  2. blaxel/authentication/__init__.py +3 -4
  3. blaxel/client/api/compute/__init__.py +0 -0
  4. blaxel/client/api/compute/create_sandbox.py +166 -0
  5. blaxel/client/api/compute/delete_sandbox.py +154 -0
  6. blaxel/client/api/compute/get_sandbox.py +154 -0
  7. blaxel/client/api/compute/list_sandboxes.py +135 -0
  8. blaxel/client/api/compute/start_sandbox.py +157 -0
  9. blaxel/client/api/compute/stop_sandbox.py +157 -0
  10. blaxel/client/api/compute/update_sandbox.py +179 -0
  11. blaxel/client/api/default/list_sandbox_hub_definitions.py +123 -0
  12. blaxel/client/api/functions/list_function_revisions.py +16 -11
  13. blaxel/client/api/knowledgebases/list_knowledgebase_revisions.py +16 -11
  14. blaxel/client/api/models/list_model_revisions.py +16 -11
  15. blaxel/client/api/templates/list_templates.py +16 -11
  16. blaxel/client/models/__init__.py +32 -2
  17. blaxel/client/models/agent_spec.py +25 -69
  18. blaxel/client/models/core_spec.py +1 -45
  19. blaxel/client/models/function_spec.py +1 -45
  20. blaxel/client/models/last_n_requests_metric.py +18 -0
  21. blaxel/client/models/metrics.py +20 -0
  22. blaxel/client/models/model_spec.py +1 -45
  23. blaxel/client/models/{agent_chain.py → port.py} +23 -32
  24. blaxel/client/models/request_total_metric.py +12 -1
  25. blaxel/client/models/request_total_response_data.py +97 -0
  26. blaxel/client/models/resource_log.py +9 -0
  27. blaxel/client/models/resource_metrics.py +144 -0
  28. blaxel/client/models/resource_metrics_request_total_per_code_previous.py +45 -0
  29. blaxel/client/models/resource_metrics_rps_per_code_previous.py +45 -0
  30. blaxel/client/models/runtime.py +83 -7
  31. blaxel/client/models/runtime_configuration.py +45 -0
  32. blaxel/client/models/sandbox.py +129 -0
  33. blaxel/client/models/sandbox_definition.py +181 -0
  34. blaxel/client/models/sandbox_spec.py +208 -0
  35. blaxel/client/models/sandboxes.py +129 -0
  36. blaxel/client/models/serverless_config.py +29 -1
  37. blaxel/client/models/serverless_config_configuration.py +45 -0
  38. blaxel/client/models/start_sandbox.py +94 -0
  39. blaxel/client/models/stop_sandbox.py +94 -0
  40. blaxel/client/models/trigger.py +98 -0
  41. blaxel/client/models/trigger_configuration.py +45 -0
  42. blaxel/client/models/workspace.py +20 -0
  43. blaxel/client/models/workspace_runtime.py +61 -0
  44. blaxel/common/autoload.py +0 -1
  45. blaxel/instrumentation/exporters.py +3 -6
  46. blaxel/instrumentation/manager.py +5 -3
  47. blaxel/mcp/client.py +1 -3
  48. blaxel/mcp/server.py +2 -3
  49. blaxel/models/__init__.py +2 -1
  50. blaxel/models/custom/langchain/gemini.py +41 -18
  51. blaxel/models/custom/llamaindex/cohere.py +25 -16
  52. blaxel/models/custom/pydantic/gemini.py +0 -1
  53. blaxel/models/livekit.py +1 -1
  54. blaxel/tools/__init__.py +1 -1
  55. blaxel/tools/langchain.py +1 -2
  56. {blaxel-0.1.9rc35.dist-info → blaxel-0.1.9rc36.dist-info}/METADATA +1 -4
  57. {blaxel-0.1.9rc35.dist-info → blaxel-0.1.9rc36.dist-info}/RECORD +59 -36
  58. {blaxel-0.1.9rc35.dist-info → blaxel-0.1.9rc36.dist-info}/WHEEL +0 -0
  59. {blaxel-0.1.9rc35.dist-info → blaxel-0.1.9rc36.dist-info}/licenses/LICENSE +0 -0
@@ -9,10 +9,8 @@ if TYPE_CHECKING:
9
9
  from ..models.core_spec_configurations import CoreSpecConfigurations
10
10
  from ..models.flavor import Flavor
11
11
  from ..models.model_private_cluster import ModelPrivateCluster
12
- from ..models.pod_template_spec import PodTemplateSpec
13
12
  from ..models.revision_configuration import RevisionConfiguration
14
13
  from ..models.runtime import Runtime
15
- from ..models.serverless_config import ServerlessConfig
16
14
 
17
15
 
18
16
  T = TypeVar("T", bound="CoreSpec")
@@ -24,29 +22,25 @@ class CoreSpec:
24
22
 
25
23
  Attributes:
26
24
  configurations (Union[Unset, CoreSpecConfigurations]): Optional configurations for the object
27
- enabled (Union[Unset, bool]): Enable or disable the agent
25
+ enabled (Union[Unset, bool]): Enable or disable the resource
28
26
  flavors (Union[Unset, list['Flavor']]): Types of hardware available for deployments
29
27
  integration_connections (Union[Unset, list[str]]):
30
- pod_template (Union[Unset, PodTemplateSpec]): Pod template specification
31
28
  policies (Union[Unset, list[str]]):
32
29
  private_clusters (Union[Unset, ModelPrivateCluster]): Private cluster where the model deployment is deployed
33
30
  revision (Union[Unset, RevisionConfiguration]): Revision configuration
34
31
  runtime (Union[Unset, Runtime]): Set of configurations for a deployment
35
32
  sandbox (Union[Unset, bool]): Sandbox mode
36
- serverless_config (Union[Unset, ServerlessConfig]): Configuration for a serverless deployment
37
33
  """
38
34
 
39
35
  configurations: Union[Unset, "CoreSpecConfigurations"] = UNSET
40
36
  enabled: Union[Unset, bool] = UNSET
41
37
  flavors: Union[Unset, list["Flavor"]] = UNSET
42
38
  integration_connections: Union[Unset, list[str]] = UNSET
43
- pod_template: Union[Unset, "PodTemplateSpec"] = UNSET
44
39
  policies: Union[Unset, list[str]] = UNSET
45
40
  private_clusters: Union[Unset, "ModelPrivateCluster"] = UNSET
46
41
  revision: Union[Unset, "RevisionConfiguration"] = UNSET
47
42
  runtime: Union[Unset, "Runtime"] = UNSET
48
43
  sandbox: Union[Unset, bool] = UNSET
49
- serverless_config: Union[Unset, "ServerlessConfig"] = UNSET
50
44
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
51
45
 
52
46
  def to_dict(self) -> dict[str, Any]:
@@ -76,12 +70,6 @@ class CoreSpec:
76
70
  if not isinstance(self.integration_connections, Unset):
77
71
  integration_connections = self.integration_connections
78
72
 
79
- pod_template: Union[Unset, dict[str, Any]] = UNSET
80
- if self.pod_template and not isinstance(self.pod_template, Unset) and not isinstance(self.pod_template, dict):
81
- pod_template = self.pod_template.to_dict()
82
- elif self.pod_template and isinstance(self.pod_template, dict):
83
- pod_template = self.pod_template
84
-
85
73
  policies: Union[Unset, list[str]] = UNSET
86
74
  if not isinstance(self.policies, Unset):
87
75
  policies = self.policies
@@ -110,16 +98,6 @@ class CoreSpec:
110
98
 
111
99
  sandbox = self.sandbox
112
100
 
113
- serverless_config: Union[Unset, dict[str, Any]] = UNSET
114
- if (
115
- self.serverless_config
116
- and not isinstance(self.serverless_config, Unset)
117
- and not isinstance(self.serverless_config, dict)
118
- ):
119
- serverless_config = self.serverless_config.to_dict()
120
- elif self.serverless_config and isinstance(self.serverless_config, dict):
121
- serverless_config = self.serverless_config
122
-
123
101
  field_dict: dict[str, Any] = {}
124
102
  field_dict.update(self.additional_properties)
125
103
  field_dict.update({})
@@ -131,8 +109,6 @@ class CoreSpec:
131
109
  field_dict["flavors"] = flavors
132
110
  if integration_connections is not UNSET:
133
111
  field_dict["integrationConnections"] = integration_connections
134
- if pod_template is not UNSET:
135
- field_dict["podTemplate"] = pod_template
136
112
  if policies is not UNSET:
137
113
  field_dict["policies"] = policies
138
114
  if private_clusters is not UNSET:
@@ -143,8 +119,6 @@ class CoreSpec:
143
119
  field_dict["runtime"] = runtime
144
120
  if sandbox is not UNSET:
145
121
  field_dict["sandbox"] = sandbox
146
- if serverless_config is not UNSET:
147
- field_dict["serverlessConfig"] = serverless_config
148
122
 
149
123
  return field_dict
150
124
 
@@ -153,10 +127,8 @@ class CoreSpec:
153
127
  from ..models.core_spec_configurations import CoreSpecConfigurations
154
128
  from ..models.flavor import Flavor
155
129
  from ..models.model_private_cluster import ModelPrivateCluster
156
- from ..models.pod_template_spec import PodTemplateSpec
157
130
  from ..models.revision_configuration import RevisionConfiguration
158
131
  from ..models.runtime import Runtime
159
- from ..models.serverless_config import ServerlessConfig
160
132
 
161
133
  if not src_dict:
162
134
  return None
@@ -179,13 +151,6 @@ class CoreSpec:
179
151
 
180
152
  integration_connections = cast(list[str], d.pop("integrationConnections", UNSET))
181
153
 
182
- _pod_template = d.pop("podTemplate", UNSET)
183
- pod_template: Union[Unset, PodTemplateSpec]
184
- if isinstance(_pod_template, Unset):
185
- pod_template = UNSET
186
- else:
187
- pod_template = PodTemplateSpec.from_dict(_pod_template)
188
-
189
154
  policies = cast(list[str], d.pop("policies", UNSET))
190
155
 
191
156
  _private_clusters = d.pop("privateClusters", UNSET)
@@ -211,25 +176,16 @@ class CoreSpec:
211
176
 
212
177
  sandbox = d.pop("sandbox", UNSET)
213
178
 
214
- _serverless_config = d.pop("serverlessConfig", UNSET)
215
- serverless_config: Union[Unset, ServerlessConfig]
216
- if isinstance(_serverless_config, Unset):
217
- serverless_config = UNSET
218
- else:
219
- serverless_config = ServerlessConfig.from_dict(_serverless_config)
220
-
221
179
  core_spec = cls(
222
180
  configurations=configurations,
223
181
  enabled=enabled,
224
182
  flavors=flavors,
225
183
  integration_connections=integration_connections,
226
- pod_template=pod_template,
227
184
  policies=policies,
228
185
  private_clusters=private_clusters,
229
186
  revision=revision,
230
187
  runtime=runtime,
231
188
  sandbox=sandbox,
232
- serverless_config=serverless_config,
233
189
  )
234
190
 
235
191
  core_spec.additional_properties = d
@@ -11,10 +11,8 @@ if TYPE_CHECKING:
11
11
  from ..models.function_kit import FunctionKit
12
12
  from ..models.function_schema import FunctionSchema
13
13
  from ..models.model_private_cluster import ModelPrivateCluster
14
- from ..models.pod_template_spec import PodTemplateSpec
15
14
  from ..models.revision_configuration import RevisionConfiguration
16
15
  from ..models.runtime import Runtime
17
- from ..models.serverless_config import ServerlessConfig
18
16
 
19
17
 
20
18
  T = TypeVar("T", bound="FunctionSpec")
@@ -26,16 +24,14 @@ class FunctionSpec:
26
24
 
27
25
  Attributes:
28
26
  configurations (Union[Unset, CoreSpecConfigurations]): Optional configurations for the object
29
- enabled (Union[Unset, bool]): Enable or disable the agent
27
+ enabled (Union[Unset, bool]): Enable or disable the resource
30
28
  flavors (Union[Unset, list['Flavor']]): Types of hardware available for deployments
31
29
  integration_connections (Union[Unset, list[str]]):
32
- pod_template (Union[Unset, PodTemplateSpec]): Pod template specification
33
30
  policies (Union[Unset, list[str]]):
34
31
  private_clusters (Union[Unset, ModelPrivateCluster]): Private cluster where the model deployment is deployed
35
32
  revision (Union[Unset, RevisionConfiguration]): Revision configuration
36
33
  runtime (Union[Unset, Runtime]): Set of configurations for a deployment
37
34
  sandbox (Union[Unset, bool]): Sandbox mode
38
- serverless_config (Union[Unset, ServerlessConfig]): Configuration for a serverless deployment
39
35
  description (Union[Unset, str]): Function description, very important for the agent function to work with an LLM
40
36
  kit (Union[Unset, list['FunctionKit']]): Function kits
41
37
  schema (Union[Unset, FunctionSchema]): Function schema
@@ -45,13 +41,11 @@ class FunctionSpec:
45
41
  enabled: Union[Unset, bool] = UNSET
46
42
  flavors: Union[Unset, list["Flavor"]] = UNSET
47
43
  integration_connections: Union[Unset, list[str]] = UNSET
48
- pod_template: Union[Unset, "PodTemplateSpec"] = UNSET
49
44
  policies: Union[Unset, list[str]] = UNSET
50
45
  private_clusters: Union[Unset, "ModelPrivateCluster"] = UNSET
51
46
  revision: Union[Unset, "RevisionConfiguration"] = UNSET
52
47
  runtime: Union[Unset, "Runtime"] = UNSET
53
48
  sandbox: Union[Unset, bool] = UNSET
54
- serverless_config: Union[Unset, "ServerlessConfig"] = UNSET
55
49
  description: Union[Unset, str] = UNSET
56
50
  kit: Union[Unset, list["FunctionKit"]] = UNSET
57
51
  schema: Union[Unset, "FunctionSchema"] = UNSET
@@ -84,12 +78,6 @@ class FunctionSpec:
84
78
  if not isinstance(self.integration_connections, Unset):
85
79
  integration_connections = self.integration_connections
86
80
 
87
- pod_template: Union[Unset, dict[str, Any]] = UNSET
88
- if self.pod_template and not isinstance(self.pod_template, Unset) and not isinstance(self.pod_template, dict):
89
- pod_template = self.pod_template.to_dict()
90
- elif self.pod_template and isinstance(self.pod_template, dict):
91
- pod_template = self.pod_template
92
-
93
81
  policies: Union[Unset, list[str]] = UNSET
94
82
  if not isinstance(self.policies, Unset):
95
83
  policies = self.policies
@@ -118,16 +106,6 @@ class FunctionSpec:
118
106
 
119
107
  sandbox = self.sandbox
120
108
 
121
- serverless_config: Union[Unset, dict[str, Any]] = UNSET
122
- if (
123
- self.serverless_config
124
- and not isinstance(self.serverless_config, Unset)
125
- and not isinstance(self.serverless_config, dict)
126
- ):
127
- serverless_config = self.serverless_config.to_dict()
128
- elif self.serverless_config and isinstance(self.serverless_config, dict):
129
- serverless_config = self.serverless_config
130
-
131
109
  description = self.description
132
110
 
133
111
  kit: Union[Unset, list[dict[str, Any]]] = UNSET
@@ -157,8 +135,6 @@ class FunctionSpec:
157
135
  field_dict["flavors"] = flavors
158
136
  if integration_connections is not UNSET:
159
137
  field_dict["integrationConnections"] = integration_connections
160
- if pod_template is not UNSET:
161
- field_dict["podTemplate"] = pod_template
162
138
  if policies is not UNSET:
163
139
  field_dict["policies"] = policies
164
140
  if private_clusters is not UNSET:
@@ -169,8 +145,6 @@ class FunctionSpec:
169
145
  field_dict["runtime"] = runtime
170
146
  if sandbox is not UNSET:
171
147
  field_dict["sandbox"] = sandbox
172
- if serverless_config is not UNSET:
173
- field_dict["serverlessConfig"] = serverless_config
174
148
  if description is not UNSET:
175
149
  field_dict["description"] = description
176
150
  if kit is not UNSET:
@@ -187,10 +161,8 @@ class FunctionSpec:
187
161
  from ..models.function_kit import FunctionKit
188
162
  from ..models.function_schema import FunctionSchema
189
163
  from ..models.model_private_cluster import ModelPrivateCluster
190
- from ..models.pod_template_spec import PodTemplateSpec
191
164
  from ..models.revision_configuration import RevisionConfiguration
192
165
  from ..models.runtime import Runtime
193
- from ..models.serverless_config import ServerlessConfig
194
166
 
195
167
  if not src_dict:
196
168
  return None
@@ -213,13 +185,6 @@ class FunctionSpec:
213
185
 
214
186
  integration_connections = cast(list[str], d.pop("integrationConnections", UNSET))
215
187
 
216
- _pod_template = d.pop("podTemplate", UNSET)
217
- pod_template: Union[Unset, PodTemplateSpec]
218
- if isinstance(_pod_template, Unset):
219
- pod_template = UNSET
220
- else:
221
- pod_template = PodTemplateSpec.from_dict(_pod_template)
222
-
223
188
  policies = cast(list[str], d.pop("policies", UNSET))
224
189
 
225
190
  _private_clusters = d.pop("privateClusters", UNSET)
@@ -245,13 +210,6 @@ class FunctionSpec:
245
210
 
246
211
  sandbox = d.pop("sandbox", UNSET)
247
212
 
248
- _serverless_config = d.pop("serverlessConfig", UNSET)
249
- serverless_config: Union[Unset, ServerlessConfig]
250
- if isinstance(_serverless_config, Unset):
251
- serverless_config = UNSET
252
- else:
253
- serverless_config = ServerlessConfig.from_dict(_serverless_config)
254
-
255
213
  description = d.pop("description", UNSET)
256
214
 
257
215
  kit = []
@@ -273,13 +231,11 @@ class FunctionSpec:
273
231
  enabled=enabled,
274
232
  flavors=flavors,
275
233
  integration_connections=integration_connections,
276
- pod_template=pod_template,
277
234
  policies=policies,
278
235
  private_clusters=private_clusters,
279
236
  revision=revision,
280
237
  runtime=runtime,
281
238
  sandbox=sandbox,
282
- serverless_config=serverless_config,
283
239
  description=description,
284
240
  kit=kit,
285
241
  schema=schema,
@@ -14,11 +14,15 @@ class LastNRequestsMetric:
14
14
 
15
15
  Attributes:
16
16
  date (Union[Unset, str]): Timestamp
17
+ status_code (Union[Unset, str]): Status code
18
+ workload_id (Union[Unset, str]): Workload ID
17
19
  workload_type (Union[Unset, str]): Workload type
18
20
  workspace (Union[Unset, str]): Workspace
19
21
  """
20
22
 
21
23
  date: Union[Unset, str] = UNSET
24
+ status_code: Union[Unset, str] = UNSET
25
+ workload_id: Union[Unset, str] = UNSET
22
26
  workload_type: Union[Unset, str] = UNSET
23
27
  workspace: Union[Unset, str] = UNSET
24
28
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
@@ -26,6 +30,10 @@ class LastNRequestsMetric:
26
30
  def to_dict(self) -> dict[str, Any]:
27
31
  date = self.date
28
32
 
33
+ status_code = self.status_code
34
+
35
+ workload_id = self.workload_id
36
+
29
37
  workload_type = self.workload_type
30
38
 
31
39
  workspace = self.workspace
@@ -35,6 +43,10 @@ class LastNRequestsMetric:
35
43
  field_dict.update({})
36
44
  if date is not UNSET:
37
45
  field_dict["date"] = date
46
+ if status_code is not UNSET:
47
+ field_dict["statusCode"] = status_code
48
+ if workload_id is not UNSET:
49
+ field_dict["workloadId"] = workload_id
38
50
  if workload_type is not UNSET:
39
51
  field_dict["workloadType"] = workload_type
40
52
  if workspace is not UNSET:
@@ -49,12 +61,18 @@ class LastNRequestsMetric:
49
61
  d = src_dict.copy()
50
62
  date = d.pop("date", UNSET)
51
63
 
64
+ status_code = d.pop("statusCode", UNSET)
65
+
66
+ workload_id = d.pop("workloadId", UNSET)
67
+
52
68
  workload_type = d.pop("workloadType", UNSET)
53
69
 
54
70
  workspace = d.pop("workspace", UNSET)
55
71
 
56
72
  last_n_requests_metric = cls(
57
73
  date=date,
74
+ status_code=status_code,
75
+ workload_id=workload_id,
58
76
  workload_type=workload_type,
59
77
  workspace=workspace,
60
78
  )
@@ -22,6 +22,8 @@ class Metrics:
22
22
  agents (Union[Unset, Any]): Metrics for agents
23
23
  functions (Union[Unset, Any]): Metrics for functions
24
24
  inference_global (Union[Unset, list[Any]]): Historical requests for all resources globally
25
+ items (Union[Unset, list[Any]]): Historical requests for all resources globally
26
+ last_n_requests (Union[Unset, int]): Metric value
25
27
  models (Union[Unset, MetricsModels]): Metrics for models
26
28
  request_total (Union[Unset, float]): Number of requests for all resources globally
27
29
  request_total_per_code (Union[Unset, MetricsRequestTotalPerCode]): Number of requests for all resources globally
@@ -34,6 +36,8 @@ class Metrics:
34
36
  agents: Union[Unset, Any] = UNSET
35
37
  functions: Union[Unset, Any] = UNSET
36
38
  inference_global: Union[Unset, list[Any]] = UNSET
39
+ items: Union[Unset, list[Any]] = UNSET
40
+ last_n_requests: Union[Unset, int] = UNSET
37
41
  models: Union[Unset, "MetricsModels"] = UNSET
38
42
  request_total: Union[Unset, float] = UNSET
39
43
  request_total_per_code: Union[Unset, "MetricsRequestTotalPerCode"] = UNSET
@@ -50,6 +54,12 @@ class Metrics:
50
54
  if not isinstance(self.inference_global, Unset):
51
55
  inference_global = self.inference_global
52
56
 
57
+ items: Union[Unset, list[Any]] = UNSET
58
+ if not isinstance(self.items, Unset):
59
+ items = self.items
60
+
61
+ last_n_requests = self.last_n_requests
62
+
53
63
  models: Union[Unset, dict[str, Any]] = UNSET
54
64
  if self.models and not isinstance(self.models, Unset) and not isinstance(self.models, dict):
55
65
  models = self.models.to_dict()
@@ -85,6 +95,10 @@ class Metrics:
85
95
  field_dict["functions"] = functions
86
96
  if inference_global is not UNSET:
87
97
  field_dict["inferenceGlobal"] = inference_global
98
+ if items is not UNSET:
99
+ field_dict["items"] = items
100
+ if last_n_requests is not UNSET:
101
+ field_dict["lastNRequests"] = last_n_requests
88
102
  if models is not UNSET:
89
103
  field_dict["models"] = models
90
104
  if request_total is not UNSET:
@@ -113,6 +127,10 @@ class Metrics:
113
127
 
114
128
  inference_global = cast(list[Any], d.pop("inferenceGlobal", UNSET))
115
129
 
130
+ items = cast(list[Any], d.pop("items", UNSET))
131
+
132
+ last_n_requests = d.pop("lastNRequests", UNSET)
133
+
116
134
  _models = d.pop("models", UNSET)
117
135
  models: Union[Unset, MetricsModels]
118
136
  if isinstance(_models, Unset):
@@ -142,6 +160,8 @@ class Metrics:
142
160
  agents=agents,
143
161
  functions=functions,
144
162
  inference_global=inference_global,
163
+ items=items,
164
+ last_n_requests=last_n_requests,
145
165
  models=models,
146
166
  request_total=request_total,
147
167
  request_total_per_code=request_total_per_code,
@@ -9,10 +9,8 @@ if TYPE_CHECKING:
9
9
  from ..models.core_spec_configurations import CoreSpecConfigurations
10
10
  from ..models.flavor import Flavor
11
11
  from ..models.model_private_cluster import ModelPrivateCluster
12
- from ..models.pod_template_spec import PodTemplateSpec
13
12
  from ..models.revision_configuration import RevisionConfiguration
14
13
  from ..models.runtime import Runtime
15
- from ..models.serverless_config import ServerlessConfig
16
14
 
17
15
 
18
16
  T = TypeVar("T", bound="ModelSpec")
@@ -24,29 +22,25 @@ class ModelSpec:
24
22
 
25
23
  Attributes:
26
24
  configurations (Union[Unset, CoreSpecConfigurations]): Optional configurations for the object
27
- enabled (Union[Unset, bool]): Enable or disable the agent
25
+ enabled (Union[Unset, bool]): Enable or disable the resource
28
26
  flavors (Union[Unset, list['Flavor']]): Types of hardware available for deployments
29
27
  integration_connections (Union[Unset, list[str]]):
30
- pod_template (Union[Unset, PodTemplateSpec]): Pod template specification
31
28
  policies (Union[Unset, list[str]]):
32
29
  private_clusters (Union[Unset, ModelPrivateCluster]): Private cluster where the model deployment is deployed
33
30
  revision (Union[Unset, RevisionConfiguration]): Revision configuration
34
31
  runtime (Union[Unset, Runtime]): Set of configurations for a deployment
35
32
  sandbox (Union[Unset, bool]): Sandbox mode
36
- serverless_config (Union[Unset, ServerlessConfig]): Configuration for a serverless deployment
37
33
  """
38
34
 
39
35
  configurations: Union[Unset, "CoreSpecConfigurations"] = UNSET
40
36
  enabled: Union[Unset, bool] = UNSET
41
37
  flavors: Union[Unset, list["Flavor"]] = UNSET
42
38
  integration_connections: Union[Unset, list[str]] = UNSET
43
- pod_template: Union[Unset, "PodTemplateSpec"] = UNSET
44
39
  policies: Union[Unset, list[str]] = UNSET
45
40
  private_clusters: Union[Unset, "ModelPrivateCluster"] = UNSET
46
41
  revision: Union[Unset, "RevisionConfiguration"] = UNSET
47
42
  runtime: Union[Unset, "Runtime"] = UNSET
48
43
  sandbox: Union[Unset, bool] = UNSET
49
- serverless_config: Union[Unset, "ServerlessConfig"] = UNSET
50
44
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
51
45
 
52
46
  def to_dict(self) -> dict[str, Any]:
@@ -76,12 +70,6 @@ class ModelSpec:
76
70
  if not isinstance(self.integration_connections, Unset):
77
71
  integration_connections = self.integration_connections
78
72
 
79
- pod_template: Union[Unset, dict[str, Any]] = UNSET
80
- if self.pod_template and not isinstance(self.pod_template, Unset) and not isinstance(self.pod_template, dict):
81
- pod_template = self.pod_template.to_dict()
82
- elif self.pod_template and isinstance(self.pod_template, dict):
83
- pod_template = self.pod_template
84
-
85
73
  policies: Union[Unset, list[str]] = UNSET
86
74
  if not isinstance(self.policies, Unset):
87
75
  policies = self.policies
@@ -110,16 +98,6 @@ class ModelSpec:
110
98
 
111
99
  sandbox = self.sandbox
112
100
 
113
- serverless_config: Union[Unset, dict[str, Any]] = UNSET
114
- if (
115
- self.serverless_config
116
- and not isinstance(self.serverless_config, Unset)
117
- and not isinstance(self.serverless_config, dict)
118
- ):
119
- serverless_config = self.serverless_config.to_dict()
120
- elif self.serverless_config and isinstance(self.serverless_config, dict):
121
- serverless_config = self.serverless_config
122
-
123
101
  field_dict: dict[str, Any] = {}
124
102
  field_dict.update(self.additional_properties)
125
103
  field_dict.update({})
@@ -131,8 +109,6 @@ class ModelSpec:
131
109
  field_dict["flavors"] = flavors
132
110
  if integration_connections is not UNSET:
133
111
  field_dict["integrationConnections"] = integration_connections
134
- if pod_template is not UNSET:
135
- field_dict["podTemplate"] = pod_template
136
112
  if policies is not UNSET:
137
113
  field_dict["policies"] = policies
138
114
  if private_clusters is not UNSET:
@@ -143,8 +119,6 @@ class ModelSpec:
143
119
  field_dict["runtime"] = runtime
144
120
  if sandbox is not UNSET:
145
121
  field_dict["sandbox"] = sandbox
146
- if serverless_config is not UNSET:
147
- field_dict["serverlessConfig"] = serverless_config
148
122
 
149
123
  return field_dict
150
124
 
@@ -153,10 +127,8 @@ class ModelSpec:
153
127
  from ..models.core_spec_configurations import CoreSpecConfigurations
154
128
  from ..models.flavor import Flavor
155
129
  from ..models.model_private_cluster import ModelPrivateCluster
156
- from ..models.pod_template_spec import PodTemplateSpec
157
130
  from ..models.revision_configuration import RevisionConfiguration
158
131
  from ..models.runtime import Runtime
159
- from ..models.serverless_config import ServerlessConfig
160
132
 
161
133
  if not src_dict:
162
134
  return None
@@ -179,13 +151,6 @@ class ModelSpec:
179
151
 
180
152
  integration_connections = cast(list[str], d.pop("integrationConnections", UNSET))
181
153
 
182
- _pod_template = d.pop("podTemplate", UNSET)
183
- pod_template: Union[Unset, PodTemplateSpec]
184
- if isinstance(_pod_template, Unset):
185
- pod_template = UNSET
186
- else:
187
- pod_template = PodTemplateSpec.from_dict(_pod_template)
188
-
189
154
  policies = cast(list[str], d.pop("policies", UNSET))
190
155
 
191
156
  _private_clusters = d.pop("privateClusters", UNSET)
@@ -211,25 +176,16 @@ class ModelSpec:
211
176
 
212
177
  sandbox = d.pop("sandbox", UNSET)
213
178
 
214
- _serverless_config = d.pop("serverlessConfig", UNSET)
215
- serverless_config: Union[Unset, ServerlessConfig]
216
- if isinstance(_serverless_config, Unset):
217
- serverless_config = UNSET
218
- else:
219
- serverless_config = ServerlessConfig.from_dict(_serverless_config)
220
-
221
179
  model_spec = cls(
222
180
  configurations=configurations,
223
181
  enabled=enabled,
224
182
  flavors=flavors,
225
183
  integration_connections=integration_connections,
226
- pod_template=pod_template,
227
184
  policies=policies,
228
185
  private_clusters=private_clusters,
229
186
  revision=revision,
230
187
  runtime=runtime,
231
188
  sandbox=sandbox,
232
- serverless_config=serverless_config,
233
189
  )
234
190
 
235
191
  model_spec.additional_properties = d
@@ -5,46 +5,40 @@ from attrs import field as _attrs_field
5
5
 
6
6
  from ..types import UNSET, Unset
7
7
 
8
- T = TypeVar("T", bound="AgentChain")
8
+ T = TypeVar("T", bound="Port")
9
9
 
10
10
 
11
11
  @_attrs_define
12
- class AgentChain:
13
- """Agent chain configuration
12
+ class Port:
13
+ """A port for a resource
14
14
 
15
15
  Attributes:
16
- description (Union[Unset, str]): Description of the agent in case you want to override the default one
17
- enabled (Union[Unset, bool]): Whether the agent chain is enabled
18
- name (Union[Unset, str]): The name of the agent to chain to
19
- prompt (Union[Unset, str]): Prompt of the agent in case you want to override the default one
16
+ name (Union[Unset, str]): The name of the port
17
+ protocol (Union[Unset, str]): The protocol of the port
18
+ target (Union[Unset, int]): The target port of the port
20
19
  """
21
20
 
22
- description: Union[Unset, str] = UNSET
23
- enabled: Union[Unset, bool] = UNSET
24
21
  name: Union[Unset, str] = UNSET
25
- prompt: Union[Unset, str] = UNSET
22
+ protocol: Union[Unset, str] = UNSET
23
+ target: Union[Unset, int] = UNSET
26
24
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
27
25
 
28
26
  def to_dict(self) -> dict[str, Any]:
29
- description = self.description
30
-
31
- enabled = self.enabled
32
-
33
27
  name = self.name
34
28
 
35
- prompt = self.prompt
29
+ protocol = self.protocol
30
+
31
+ target = self.target
36
32
 
37
33
  field_dict: dict[str, Any] = {}
38
34
  field_dict.update(self.additional_properties)
39
35
  field_dict.update({})
40
- if description is not UNSET:
41
- field_dict["description"] = description
42
- if enabled is not UNSET:
43
- field_dict["enabled"] = enabled
44
36
  if name is not UNSET:
45
37
  field_dict["name"] = name
46
- if prompt is not UNSET:
47
- field_dict["prompt"] = prompt
38
+ if protocol is not UNSET:
39
+ field_dict["protocol"] = protocol
40
+ if target is not UNSET:
41
+ field_dict["target"] = target
48
42
 
49
43
  return field_dict
50
44
 
@@ -53,23 +47,20 @@ class AgentChain:
53
47
  if not src_dict:
54
48
  return None
55
49
  d = src_dict.copy()
56
- description = d.pop("description", UNSET)
57
-
58
- enabled = d.pop("enabled", UNSET)
59
-
60
50
  name = d.pop("name", UNSET)
61
51
 
62
- prompt = d.pop("prompt", UNSET)
52
+ protocol = d.pop("protocol", UNSET)
53
+
54
+ target = d.pop("target", UNSET)
63
55
 
64
- agent_chain = cls(
65
- description=description,
66
- enabled=enabled,
56
+ port = cls(
67
57
  name=name,
68
- prompt=prompt,
58
+ protocol=protocol,
59
+ target=target,
69
60
  )
70
61
 
71
- agent_chain.additional_properties = d
72
- return agent_chain
62
+ port.additional_properties = d
63
+ return port
73
64
 
74
65
  @property
75
66
  def additional_keys(self) -> list[str]:
@@ -1,4 +1,4 @@
1
- from typing import TYPE_CHECKING, Any, TypeVar, Union
1
+ from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
2
2
 
3
3
  from attrs import define as _attrs_define
4
4
  from attrs import field as _attrs_field
@@ -20,6 +20,7 @@ class RequestTotalMetric:
20
20
  """Metrics for request total
21
21
 
22
22
  Attributes:
23
+ items (Union[Unset, list[Any]]): Historical requests for all resources globally
23
24
  request_total (Union[Unset, float]): Number of requests for all resources globally
24
25
  request_total_per_code (Union[Unset, RequestTotalMetricRequestTotalPerCode]): Number of requests for all
25
26
  resources globally per code
@@ -27,6 +28,7 @@ class RequestTotalMetric:
27
28
  rps_per_code (Union[Unset, RequestTotalMetricRpsPerCode]): Number of requests for all resources globally
28
29
  """
29
30
 
31
+ items: Union[Unset, list[Any]] = UNSET
30
32
  request_total: Union[Unset, float] = UNSET
31
33
  request_total_per_code: Union[Unset, "RequestTotalMetricRequestTotalPerCode"] = UNSET
32
34
  rps: Union[Unset, float] = UNSET
@@ -34,6 +36,10 @@ class RequestTotalMetric:
34
36
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
35
37
 
36
38
  def to_dict(self) -> dict[str, Any]:
39
+ items: Union[Unset, list[Any]] = UNSET
40
+ if not isinstance(self.items, Unset):
41
+ items = self.items
42
+
37
43
  request_total = self.request_total
38
44
 
39
45
  request_total_per_code: Union[Unset, dict[str, Any]] = UNSET
@@ -57,6 +63,8 @@ class RequestTotalMetric:
57
63
  field_dict: dict[str, Any] = {}
58
64
  field_dict.update(self.additional_properties)
59
65
  field_dict.update({})
66
+ if items is not UNSET:
67
+ field_dict["items"] = items
60
68
  if request_total is not UNSET:
61
69
  field_dict["requestTotal"] = request_total
62
70
  if request_total_per_code is not UNSET:
@@ -78,6 +86,8 @@ class RequestTotalMetric:
78
86
  if not src_dict:
79
87
  return None
80
88
  d = src_dict.copy()
89
+ items = cast(list[Any], d.pop("items", UNSET))
90
+
81
91
  request_total = d.pop("requestTotal", UNSET)
82
92
 
83
93
  _request_total_per_code = d.pop("requestTotalPerCode", UNSET)
@@ -97,6 +107,7 @@ class RequestTotalMetric:
97
107
  rps_per_code = RequestTotalMetricRpsPerCode.from_dict(_rps_per_code)
98
108
 
99
109
  request_total_metric = cls(
110
+ items=items,
100
111
  request_total=request_total,
101
112
  request_total_per_code=request_total_per_code,
102
113
  rps=rps,