beamlit 0.0.19__py3-none-any.whl → 0.0.20rc1__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.
- beamlit/api/agents/create_agent.py +14 -9
- beamlit/api/agents/get_agent_deployment.py +22 -1
- beamlit/api/agents/update_agent.py +14 -9
- beamlit/api/functions/create_function.py +14 -9
- beamlit/api/functions/update_function.py +14 -9
- beamlit/api/{authentication_providers/list_organizations_for_authentication_provider.py → integrations/create_integration_connection.py} +45 -41
- beamlit/api/integrations/delete_integration_connection.py +158 -0
- beamlit/api/integrations/get_integration.py +97 -0
- beamlit/api/integrations/get_integration_connection.py +154 -0
- beamlit/api/integrations/get_integration_connection_model.py +97 -0
- beamlit/api/integrations/get_integration_model.py +97 -0
- beamlit/api/integrations/list_integration_connection_models.py +97 -0
- beamlit/api/{authentication_providers/list_models_for_authentication_provider.py → integrations/list_integration_connections.py} +24 -48
- beamlit/api/integrations/list_integration_models.py +97 -0
- beamlit/api/integrations/update_integration_connection.py +180 -0
- beamlit/authentication/__init__.py +2 -1
- beamlit/authentication/authentication.py +3 -0
- beamlit/authentication/clientcredentials.py +99 -0
- beamlit/authentication/credentials.py +7 -1
- beamlit/authentication/device_mode.py +0 -2
- beamlit/common/generate.py +166 -0
- beamlit/common/logger.py +30 -0
- beamlit/common/settings.py +112 -0
- beamlit/common/utils.py +13 -0
- beamlit/models/__init__.py +50 -24
- beamlit/models/agent_deployment.py +117 -49
- beamlit/models/{agent_deployment_configuration.py → agent_deployment_configuration_type_0.py} +5 -5
- beamlit/models/agent_deployment_history.py +46 -13
- beamlit/models/agent_deployment_history_event.py +78 -22
- beamlit/models/{function_deployment_pod_template.py → agent_deployment_pod_template_type_0.py} +5 -5
- beamlit/models/agent_with_deployments.py +174 -0
- beamlit/models/deployment_configurations.py +19 -6
- beamlit/models/deployment_serverless_config_type_0.py +218 -0
- beamlit/models/environment_metrics.py +19 -0
- beamlit/models/function_deployment.py +110 -42
- beamlit/models/{function_deployment_configuration.py → function_deployment_configuration_type_0.py} +5 -5
- beamlit/models/{agent_deployment_pod_template.py → function_deployment_pod_template_type_0.py} +5 -5
- beamlit/models/function_with_deployments.py +174 -0
- beamlit/models/increase_and_rate_metric.py +102 -0
- beamlit/models/integration.py +196 -0
- beamlit/models/integration_config.py +43 -0
- beamlit/models/integration_connection.py +196 -0
- beamlit/models/integration_connection_config.py +43 -0
- beamlit/models/integration_connection_secret.py +59 -0
- beamlit/models/integration_model.py +142 -0
- beamlit/models/integration_secret.py +59 -0
- beamlit/models/metrics.py +61 -20
- beamlit/models/model_deployment.py +96 -64
- beamlit/models/{model_deployment_pod_template.py → model_deployment_pod_template_type_0.py} +5 -5
- beamlit/models/policy.py +8 -34
- beamlit/models/provider_config.py +0 -9
- beamlit/models/resource_deployment_metrics.py +231 -36
- beamlit/models/resource_deployment_metrics_inference_per_region_type_0.py +75 -0
- beamlit/models/{resource_deployment_metrics_inference_per_second_per_region.py → resource_deployment_metrics_inference_per_second_per_region_type_0.py} +5 -5
- beamlit/models/resource_deployment_metrics_query_per_region_per_code_type_0.py +73 -0
- beamlit/models/{resource_deployment_metrics_query_per_second_per_region_per_code.py → resource_deployment_metrics_query_per_second_per_region_per_code_type_0.py} +5 -5
- beamlit/models/resource_metrics.py +36 -0
- beamlit/models/runtime.py +29 -12
- beamlit/models/{runtime_readiness_probe.py → runtime_readiness_probe_type_0.py} +5 -5
- beamlit/models/store_agent.py +29 -13
- beamlit/models/{store_agent_labels.py → store_agent_labels_type_0.py} +5 -5
- beamlit/models/store_configuration.py +15 -4
- beamlit/models/store_configuration_option.py +18 -5
- beamlit/models/store_function.py +29 -13
- beamlit/models/{store_function_labels.py → store_function_labels_type_0.py} +5 -5
- beamlit/run.py +49 -0
- {beamlit-0.0.19.dist-info → beamlit-0.0.20rc1.dist-info}/METADATA +5 -2
- {beamlit-0.0.19.dist-info → beamlit-0.0.20rc1.dist-info}/RECORD +70 -46
- beamlit/api/authentication_providers/get_model_with_repo_for_authentication_provider.py +0 -184
- beamlit/models/deployment_serverless_config.py +0 -129
- beamlit/models/labels.py +0 -43
- /beamlit/api/{authentication_providers → integrations}/__init__.py +0 -0
- {beamlit-0.0.19.dist-info → beamlit-0.0.20rc1.dist-info}/WHEEL +0 -0
@@ -7,9 +7,9 @@ from ..types import UNSET, Unset
|
|
7
7
|
|
8
8
|
if TYPE_CHECKING:
|
9
9
|
from ..models.agent_chain import AgentChain
|
10
|
-
from ..models.
|
11
|
-
from ..models.
|
12
|
-
from ..models.
|
10
|
+
from ..models.agent_deployment_configuration_type_0 import AgentDeploymentConfigurationType0
|
11
|
+
from ..models.agent_deployment_pod_template_type_0 import AgentDeploymentPodTemplateType0
|
12
|
+
from ..models.deployment_serverless_config_type_0 import DeploymentServerlessConfigType0
|
13
13
|
from ..models.flavor import Flavor
|
14
14
|
from ..models.labels_type_0 import LabelsType0
|
15
15
|
from ..models.runtime import Runtime
|
@@ -29,22 +29,24 @@ class AgentDeployment:
|
|
29
29
|
updated_by (Union[Unset, str]): The user or service account who updated the resource
|
30
30
|
agent (Union[Unset, str]): The name of the agent
|
31
31
|
agent_chain (Union[Unset, List['AgentChain']]): Agent chaining configuration
|
32
|
-
configuration (Union[
|
33
|
-
your agent you can retrieve the value with config[key]
|
32
|
+
configuration (Union['AgentDeploymentConfigurationType0', None, Unset]): Agent configuration, this is a key
|
33
|
+
value storage. In your agent you can retrieve the value with config[key]
|
34
34
|
description (Union[Unset, str]): Agent description, very important to have a clear description for your agent if
|
35
35
|
you want to make it work with agent chaining
|
36
|
-
enabled (Union[Unset, bool]): Whether the agent deployment is enabled
|
36
|
+
enabled (Union[None, Unset, bool]): Whether the agent deployment is enabled
|
37
37
|
environment (Union[Unset, str]): The name of the environment
|
38
38
|
flavors (Union[Unset, List['Flavor']]): Types of hardware available for deployments
|
39
39
|
functions (Union[Unset, List[str]]): Functions used by the agent, those functions needs to be created before
|
40
40
|
setting it here
|
41
|
+
integration_connections (Union[Unset, List[str]]):
|
41
42
|
labels (Union['LabelsType0', None, Unset]): Labels
|
42
|
-
|
43
|
-
pod_template (Union[
|
44
|
-
template
|
43
|
+
model (Union[Unset, str]): Model beamlit to use for agent, it should be compatible with function calling
|
44
|
+
pod_template (Union['AgentDeploymentPodTemplateType0', None, Unset]): The pod template, should be a valid
|
45
|
+
Kubernetes pod template
|
45
46
|
policies (Union[Unset, List[str]]):
|
46
47
|
runtime (Union[Unset, Runtime]): Set of configurations for a deployment
|
47
|
-
serverless_config (Union[
|
48
|
+
serverless_config (Union['DeploymentServerlessConfigType0', None, Unset]): Configuration for a serverless
|
49
|
+
deployment
|
48
50
|
store_id (Union[Unset, str]): Create from a store registered function
|
49
51
|
workspace (Union[Unset, str]): The workspace the agent deployment belongs to
|
50
52
|
"""
|
@@ -55,23 +57,27 @@ class AgentDeployment:
|
|
55
57
|
updated_by: Union[Unset, str] = UNSET
|
56
58
|
agent: Union[Unset, str] = UNSET
|
57
59
|
agent_chain: Union[Unset, List["AgentChain"]] = UNSET
|
58
|
-
configuration: Union[
|
60
|
+
configuration: Union["AgentDeploymentConfigurationType0", None, Unset] = UNSET
|
59
61
|
description: Union[Unset, str] = UNSET
|
60
|
-
enabled: Union[Unset, bool] = UNSET
|
62
|
+
enabled: Union[None, Unset, bool] = UNSET
|
61
63
|
environment: Union[Unset, str] = UNSET
|
62
64
|
flavors: Union[Unset, List["Flavor"]] = UNSET
|
63
65
|
functions: Union[Unset, List[str]] = UNSET
|
66
|
+
integration_connections: Union[Unset, List[str]] = UNSET
|
64
67
|
labels: Union["LabelsType0", None, Unset] = UNSET
|
65
|
-
|
66
|
-
pod_template: Union[
|
68
|
+
model: Union[Unset, str] = UNSET
|
69
|
+
pod_template: Union["AgentDeploymentPodTemplateType0", None, Unset] = UNSET
|
67
70
|
policies: Union[Unset, List[str]] = UNSET
|
68
71
|
runtime: Union[Unset, "Runtime"] = UNSET
|
69
|
-
serverless_config: Union[
|
72
|
+
serverless_config: Union["DeploymentServerlessConfigType0", None, Unset] = UNSET
|
70
73
|
store_id: Union[Unset, str] = UNSET
|
71
74
|
workspace: Union[Unset, str] = UNSET
|
72
75
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
73
76
|
|
74
77
|
def to_dict(self) -> dict[str, Any]:
|
78
|
+
from ..models.agent_deployment_configuration_type_0 import AgentDeploymentConfigurationType0
|
79
|
+
from ..models.agent_deployment_pod_template_type_0 import AgentDeploymentPodTemplateType0
|
80
|
+
from ..models.deployment_serverless_config_type_0 import DeploymentServerlessConfigType0
|
75
81
|
from ..models.labels_type_0 import LabelsType0
|
76
82
|
|
77
83
|
created_at = self.created_at
|
@@ -91,13 +97,21 @@ class AgentDeployment:
|
|
91
97
|
agent_chain_item = agent_chain_item_data.to_dict()
|
92
98
|
agent_chain.append(agent_chain_item)
|
93
99
|
|
94
|
-
configuration: Union[
|
95
|
-
if
|
100
|
+
configuration: Union[Dict[str, Any], None, Unset]
|
101
|
+
if isinstance(self.configuration, Unset):
|
102
|
+
configuration = UNSET
|
103
|
+
elif isinstance(self.configuration, AgentDeploymentConfigurationType0):
|
96
104
|
configuration = self.configuration.to_dict()
|
105
|
+
else:
|
106
|
+
configuration = self.configuration
|
97
107
|
|
98
108
|
description = self.description
|
99
109
|
|
100
|
-
enabled
|
110
|
+
enabled: Union[None, Unset, bool]
|
111
|
+
if isinstance(self.enabled, Unset):
|
112
|
+
enabled = UNSET
|
113
|
+
else:
|
114
|
+
enabled = self.enabled
|
101
115
|
|
102
116
|
environment = self.environment
|
103
117
|
|
@@ -112,6 +126,10 @@ class AgentDeployment:
|
|
112
126
|
if not isinstance(self.functions, Unset):
|
113
127
|
functions = self.functions
|
114
128
|
|
129
|
+
integration_connections: Union[Unset, List[str]] = UNSET
|
130
|
+
if not isinstance(self.integration_connections, Unset):
|
131
|
+
integration_connections = self.integration_connections
|
132
|
+
|
115
133
|
labels: Union[Dict[str, Any], None, Unset]
|
116
134
|
if isinstance(self.labels, Unset):
|
117
135
|
labels = UNSET
|
@@ -120,11 +138,15 @@ class AgentDeployment:
|
|
120
138
|
else:
|
121
139
|
labels = self.labels
|
122
140
|
|
123
|
-
|
141
|
+
model = self.model
|
124
142
|
|
125
|
-
pod_template: Union[
|
126
|
-
if
|
143
|
+
pod_template: Union[Dict[str, Any], None, Unset]
|
144
|
+
if isinstance(self.pod_template, Unset):
|
145
|
+
pod_template = UNSET
|
146
|
+
elif isinstance(self.pod_template, AgentDeploymentPodTemplateType0):
|
127
147
|
pod_template = self.pod_template.to_dict()
|
148
|
+
else:
|
149
|
+
pod_template = self.pod_template
|
128
150
|
|
129
151
|
policies: Union[Unset, List[str]] = UNSET
|
130
152
|
if not isinstance(self.policies, Unset):
|
@@ -134,9 +156,13 @@ class AgentDeployment:
|
|
134
156
|
if not isinstance(self.runtime, Unset):
|
135
157
|
runtime = self.runtime.to_dict()
|
136
158
|
|
137
|
-
serverless_config: Union[
|
138
|
-
if
|
159
|
+
serverless_config: Union[Dict[str, Any], None, Unset]
|
160
|
+
if isinstance(self.serverless_config, Unset):
|
161
|
+
serverless_config = UNSET
|
162
|
+
elif isinstance(self.serverless_config, DeploymentServerlessConfigType0):
|
139
163
|
serverless_config = self.serverless_config.to_dict()
|
164
|
+
else:
|
165
|
+
serverless_config = self.serverless_config
|
140
166
|
|
141
167
|
store_id = self.store_id
|
142
168
|
|
@@ -169,10 +195,12 @@ class AgentDeployment:
|
|
169
195
|
field_dict["flavors"] = flavors
|
170
196
|
if functions is not UNSET:
|
171
197
|
field_dict["functions"] = functions
|
198
|
+
if integration_connections is not UNSET:
|
199
|
+
field_dict["integration_connections"] = integration_connections
|
172
200
|
if labels is not UNSET:
|
173
201
|
field_dict["labels"] = labels
|
174
|
-
if
|
175
|
-
field_dict["
|
202
|
+
if model is not UNSET:
|
203
|
+
field_dict["model"] = model
|
176
204
|
if pod_template is not UNSET:
|
177
205
|
field_dict["pod_template"] = pod_template
|
178
206
|
if policies is not UNSET:
|
@@ -191,9 +219,9 @@ class AgentDeployment:
|
|
191
219
|
@classmethod
|
192
220
|
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
193
221
|
from ..models.agent_chain import AgentChain
|
194
|
-
from ..models.
|
195
|
-
from ..models.
|
196
|
-
from ..models.
|
222
|
+
from ..models.agent_deployment_configuration_type_0 import AgentDeploymentConfigurationType0
|
223
|
+
from ..models.agent_deployment_pod_template_type_0 import AgentDeploymentPodTemplateType0
|
224
|
+
from ..models.deployment_serverless_config_type_0 import DeploymentServerlessConfigType0
|
197
225
|
from ..models.flavor import Flavor
|
198
226
|
from ..models.labels_type_0 import LabelsType0
|
199
227
|
from ..models.runtime import Runtime
|
@@ -216,16 +244,33 @@ class AgentDeployment:
|
|
216
244
|
|
217
245
|
agent_chain.append(agent_chain_item)
|
218
246
|
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
247
|
+
def _parse_configuration(data: object) -> Union["AgentDeploymentConfigurationType0", None, Unset]:
|
248
|
+
if data is None:
|
249
|
+
return data
|
250
|
+
if isinstance(data, Unset):
|
251
|
+
return data
|
252
|
+
try:
|
253
|
+
if not isinstance(data, dict):
|
254
|
+
raise TypeError()
|
255
|
+
configuration_type_0 = AgentDeploymentConfigurationType0.from_dict(data)
|
256
|
+
|
257
|
+
return configuration_type_0
|
258
|
+
except: # noqa: E722
|
259
|
+
pass
|
260
|
+
return cast(Union["AgentDeploymentConfigurationType0", None, Unset], data)
|
261
|
+
|
262
|
+
configuration = _parse_configuration(d.pop("configuration", UNSET))
|
225
263
|
|
226
264
|
description = d.pop("description", UNSET)
|
227
265
|
|
228
|
-
|
266
|
+
def _parse_enabled(data: object) -> Union[None, Unset, bool]:
|
267
|
+
if data is None:
|
268
|
+
return data
|
269
|
+
if isinstance(data, Unset):
|
270
|
+
return data
|
271
|
+
return cast(Union[None, Unset, bool], data)
|
272
|
+
|
273
|
+
enabled = _parse_enabled(d.pop("enabled", UNSET))
|
229
274
|
|
230
275
|
environment = d.pop("environment", UNSET)
|
231
276
|
|
@@ -238,6 +283,8 @@ class AgentDeployment:
|
|
238
283
|
|
239
284
|
functions = cast(List[str], d.pop("functions", UNSET))
|
240
285
|
|
286
|
+
integration_connections = cast(List[str], d.pop("integration_connections", UNSET))
|
287
|
+
|
241
288
|
def _parse_labels(data: object) -> Union["LabelsType0", None, Unset]:
|
242
289
|
if data is None:
|
243
290
|
return data
|
@@ -255,14 +302,24 @@ class AgentDeployment:
|
|
255
302
|
|
256
303
|
labels = _parse_labels(d.pop("labels", UNSET))
|
257
304
|
|
258
|
-
|
305
|
+
model = d.pop("model", UNSET)
|
259
306
|
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
307
|
+
def _parse_pod_template(data: object) -> Union["AgentDeploymentPodTemplateType0", None, Unset]:
|
308
|
+
if data is None:
|
309
|
+
return data
|
310
|
+
if isinstance(data, Unset):
|
311
|
+
return data
|
312
|
+
try:
|
313
|
+
if not isinstance(data, dict):
|
314
|
+
raise TypeError()
|
315
|
+
pod_template_type_0 = AgentDeploymentPodTemplateType0.from_dict(data)
|
316
|
+
|
317
|
+
return pod_template_type_0
|
318
|
+
except: # noqa: E722
|
319
|
+
pass
|
320
|
+
return cast(Union["AgentDeploymentPodTemplateType0", None, Unset], data)
|
321
|
+
|
322
|
+
pod_template = _parse_pod_template(d.pop("pod_template", UNSET))
|
266
323
|
|
267
324
|
policies = cast(List[str], d.pop("policies", UNSET))
|
268
325
|
|
@@ -273,12 +330,22 @@ class AgentDeployment:
|
|
273
330
|
else:
|
274
331
|
runtime = Runtime.from_dict(_runtime)
|
275
332
|
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
333
|
+
def _parse_serverless_config(data: object) -> Union["DeploymentServerlessConfigType0", None, Unset]:
|
334
|
+
if data is None:
|
335
|
+
return data
|
336
|
+
if isinstance(data, Unset):
|
337
|
+
return data
|
338
|
+
try:
|
339
|
+
if not isinstance(data, dict):
|
340
|
+
raise TypeError()
|
341
|
+
componentsschemas_deployment_serverless_config_type_0 = DeploymentServerlessConfigType0.from_dict(data)
|
342
|
+
|
343
|
+
return componentsschemas_deployment_serverless_config_type_0
|
344
|
+
except: # noqa: E722
|
345
|
+
pass
|
346
|
+
return cast(Union["DeploymentServerlessConfigType0", None, Unset], data)
|
347
|
+
|
348
|
+
serverless_config = _parse_serverless_config(d.pop("serverless_config", UNSET))
|
282
349
|
|
283
350
|
store_id = d.pop("store_id", UNSET)
|
284
351
|
|
@@ -297,8 +364,9 @@ class AgentDeployment:
|
|
297
364
|
environment=environment,
|
298
365
|
flavors=flavors,
|
299
366
|
functions=functions,
|
367
|
+
integration_connections=integration_connections,
|
300
368
|
labels=labels,
|
301
|
-
|
369
|
+
model=model,
|
302
370
|
pod_template=pod_template,
|
303
371
|
policies=policies,
|
304
372
|
runtime=runtime,
|
beamlit/models/{agent_deployment_configuration.py → agent_deployment_configuration_type_0.py}
RENAMED
@@ -3,11 +3,11 @@ from typing import Any, Type, TypeVar
|
|
3
3
|
from attrs import define as _attrs_define
|
4
4
|
from attrs import field as _attrs_field
|
5
5
|
|
6
|
-
T = TypeVar("T", bound="
|
6
|
+
T = TypeVar("T", bound="AgentDeploymentConfigurationType0")
|
7
7
|
|
8
8
|
|
9
9
|
@_attrs_define
|
10
|
-
class
|
10
|
+
class AgentDeploymentConfigurationType0:
|
11
11
|
"""Agent configuration, this is a key value storage. In your agent you can retrieve the value with config[key]"""
|
12
12
|
|
13
13
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
@@ -21,10 +21,10 @@ class AgentDeploymentConfiguration:
|
|
21
21
|
@classmethod
|
22
22
|
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
23
23
|
d = src_dict.copy()
|
24
|
-
|
24
|
+
agent_deployment_configuration_type_0 = cls()
|
25
25
|
|
26
|
-
|
27
|
-
return
|
26
|
+
agent_deployment_configuration_type_0.additional_properties = d
|
27
|
+
return agent_deployment_configuration_type_0
|
28
28
|
|
29
29
|
@property
|
30
30
|
def additional_keys(self) -> list[str]:
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
|
1
|
+
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast
|
2
2
|
|
3
3
|
from attrs import define as _attrs_define
|
4
4
|
from attrs import field as _attrs_field
|
@@ -22,13 +22,13 @@ class AgentDeploymentHistory:
|
|
22
22
|
updated_at (Union[Unset, str]): The date and time when the resource was updated
|
23
23
|
updated_by (Union[Unset, str]): The user or service account who updated the resource
|
24
24
|
agent (Union[Unset, str]): Agent name
|
25
|
-
end (Union[Unset, str]): End time
|
25
|
+
end (Union[None, Unset, str]): End time
|
26
26
|
environment (Union[Unset, str]): Environment name
|
27
27
|
events (Union[Unset, List['AgentDeploymentHistoryEvent']]): Events
|
28
28
|
request_id (Union[Unset, str]): Request ID
|
29
|
-
start (Union[Unset, str]): Start time
|
29
|
+
start (Union[None, Unset, str]): Start time
|
30
30
|
status (Union[Unset, str]): Status, eg: running, success, failed
|
31
|
-
took (Union[Unset, int]): Number of milliseconds it took to complete the event
|
31
|
+
took (Union[None, Unset, int]): Number of milliseconds it took to complete the event
|
32
32
|
workspace (Union[Unset, str]): The workspace the agent deployment belongs to
|
33
33
|
"""
|
34
34
|
|
@@ -37,13 +37,13 @@ class AgentDeploymentHistory:
|
|
37
37
|
updated_at: Union[Unset, str] = UNSET
|
38
38
|
updated_by: Union[Unset, str] = UNSET
|
39
39
|
agent: Union[Unset, str] = UNSET
|
40
|
-
end: Union[Unset, str] = UNSET
|
40
|
+
end: Union[None, Unset, str] = UNSET
|
41
41
|
environment: Union[Unset, str] = UNSET
|
42
42
|
events: Union[Unset, List["AgentDeploymentHistoryEvent"]] = UNSET
|
43
43
|
request_id: Union[Unset, str] = UNSET
|
44
|
-
start: Union[Unset, str] = UNSET
|
44
|
+
start: Union[None, Unset, str] = UNSET
|
45
45
|
status: Union[Unset, str] = UNSET
|
46
|
-
took: Union[Unset, int] = UNSET
|
46
|
+
took: Union[None, Unset, int] = UNSET
|
47
47
|
workspace: Union[Unset, str] = UNSET
|
48
48
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
49
49
|
|
@@ -58,7 +58,11 @@ class AgentDeploymentHistory:
|
|
58
58
|
|
59
59
|
agent = self.agent
|
60
60
|
|
61
|
-
end
|
61
|
+
end: Union[None, Unset, str]
|
62
|
+
if isinstance(self.end, Unset):
|
63
|
+
end = UNSET
|
64
|
+
else:
|
65
|
+
end = self.end
|
62
66
|
|
63
67
|
environment = self.environment
|
64
68
|
|
@@ -71,11 +75,19 @@ class AgentDeploymentHistory:
|
|
71
75
|
|
72
76
|
request_id = self.request_id
|
73
77
|
|
74
|
-
start
|
78
|
+
start: Union[None, Unset, str]
|
79
|
+
if isinstance(self.start, Unset):
|
80
|
+
start = UNSET
|
81
|
+
else:
|
82
|
+
start = self.start
|
75
83
|
|
76
84
|
status = self.status
|
77
85
|
|
78
|
-
took
|
86
|
+
took: Union[None, Unset, int]
|
87
|
+
if isinstance(self.took, Unset):
|
88
|
+
took = UNSET
|
89
|
+
else:
|
90
|
+
took = self.took
|
79
91
|
|
80
92
|
workspace = self.workspace
|
81
93
|
|
@@ -126,7 +138,14 @@ class AgentDeploymentHistory:
|
|
126
138
|
|
127
139
|
agent = d.pop("agent", UNSET)
|
128
140
|
|
129
|
-
|
141
|
+
def _parse_end(data: object) -> Union[None, Unset, str]:
|
142
|
+
if data is None:
|
143
|
+
return data
|
144
|
+
if isinstance(data, Unset):
|
145
|
+
return data
|
146
|
+
return cast(Union[None, Unset, str], data)
|
147
|
+
|
148
|
+
end = _parse_end(d.pop("end", UNSET))
|
130
149
|
|
131
150
|
environment = d.pop("environment", UNSET)
|
132
151
|
|
@@ -139,11 +158,25 @@ class AgentDeploymentHistory:
|
|
139
158
|
|
140
159
|
request_id = d.pop("request_id", UNSET)
|
141
160
|
|
142
|
-
|
161
|
+
def _parse_start(data: object) -> Union[None, Unset, str]:
|
162
|
+
if data is None:
|
163
|
+
return data
|
164
|
+
if isinstance(data, Unset):
|
165
|
+
return data
|
166
|
+
return cast(Union[None, Unset, str], data)
|
167
|
+
|
168
|
+
start = _parse_start(d.pop("start", UNSET))
|
143
169
|
|
144
170
|
status = d.pop("status", UNSET)
|
145
171
|
|
146
|
-
|
172
|
+
def _parse_took(data: object) -> Union[None, Unset, int]:
|
173
|
+
if data is None:
|
174
|
+
return data
|
175
|
+
if isinstance(data, Unset):
|
176
|
+
return data
|
177
|
+
return cast(Union[None, Unset, int], data)
|
178
|
+
|
179
|
+
took = _parse_took(d.pop("took", UNSET))
|
147
180
|
|
148
181
|
workspace = d.pop("workspace", UNSET)
|
149
182
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import Any, Type, TypeVar, Union
|
1
|
+
from typing import Any, Type, TypeVar, Union, cast
|
2
2
|
|
3
3
|
from attrs import define as _attrs_define
|
4
4
|
from attrs import field as _attrs_field
|
@@ -13,44 +13,64 @@ class AgentDeploymentHistoryEvent:
|
|
13
13
|
"""Agent deployment history event
|
14
14
|
|
15
15
|
Attributes:
|
16
|
-
end (Union[Unset, str]): End time
|
17
|
-
error (Union[Unset, str]): Error message
|
16
|
+
end (Union[None, Unset, str]): End time
|
17
|
+
error (Union[None, Unset, str]): Error message
|
18
18
|
name (Union[Unset, str]): Name of the function or agent
|
19
19
|
parameters (Union[Unset, str]): Parameters
|
20
|
-
start (Union[Unset, str]): Start time
|
20
|
+
start (Union[None, Unset, str]): Start time
|
21
21
|
status (Union[Unset, str]): Status, eg: running, success, failed
|
22
|
-
sub_function (Union[Unset, str]): Function used in kit if a kit was used
|
23
|
-
took (Union[Unset, int]): Number of milliseconds it took to complete the event
|
22
|
+
sub_function (Union[None, Unset, str]): Function used in kit if a kit was used
|
23
|
+
took (Union[None, Unset, int]): Number of milliseconds it took to complete the event
|
24
24
|
type (Union[Unset, str]): Type, one of function or agent
|
25
25
|
"""
|
26
26
|
|
27
|
-
end: Union[Unset, str] = UNSET
|
28
|
-
error: Union[Unset, str] = UNSET
|
27
|
+
end: Union[None, Unset, str] = UNSET
|
28
|
+
error: Union[None, Unset, str] = UNSET
|
29
29
|
name: Union[Unset, str] = UNSET
|
30
30
|
parameters: Union[Unset, str] = UNSET
|
31
|
-
start: Union[Unset, str] = UNSET
|
31
|
+
start: Union[None, Unset, str] = UNSET
|
32
32
|
status: Union[Unset, str] = UNSET
|
33
|
-
sub_function: Union[Unset, str] = UNSET
|
34
|
-
took: Union[Unset, int] = UNSET
|
33
|
+
sub_function: Union[None, Unset, str] = UNSET
|
34
|
+
took: Union[None, Unset, int] = UNSET
|
35
35
|
type: Union[Unset, str] = UNSET
|
36
36
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
37
37
|
|
38
38
|
def to_dict(self) -> dict[str, Any]:
|
39
|
-
end
|
40
|
-
|
41
|
-
|
39
|
+
end: Union[None, Unset, str]
|
40
|
+
if isinstance(self.end, Unset):
|
41
|
+
end = UNSET
|
42
|
+
else:
|
43
|
+
end = self.end
|
44
|
+
|
45
|
+
error: Union[None, Unset, str]
|
46
|
+
if isinstance(self.error, Unset):
|
47
|
+
error = UNSET
|
48
|
+
else:
|
49
|
+
error = self.error
|
42
50
|
|
43
51
|
name = self.name
|
44
52
|
|
45
53
|
parameters = self.parameters
|
46
54
|
|
47
|
-
start
|
55
|
+
start: Union[None, Unset, str]
|
56
|
+
if isinstance(self.start, Unset):
|
57
|
+
start = UNSET
|
58
|
+
else:
|
59
|
+
start = self.start
|
48
60
|
|
49
61
|
status = self.status
|
50
62
|
|
51
|
-
sub_function
|
63
|
+
sub_function: Union[None, Unset, str]
|
64
|
+
if isinstance(self.sub_function, Unset):
|
65
|
+
sub_function = UNSET
|
66
|
+
else:
|
67
|
+
sub_function = self.sub_function
|
52
68
|
|
53
|
-
took
|
69
|
+
took: Union[None, Unset, int]
|
70
|
+
if isinstance(self.took, Unset):
|
71
|
+
took = UNSET
|
72
|
+
else:
|
73
|
+
took = self.took
|
54
74
|
|
55
75
|
type = self.type
|
56
76
|
|
@@ -81,21 +101,57 @@ class AgentDeploymentHistoryEvent:
|
|
81
101
|
@classmethod
|
82
102
|
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
83
103
|
d = src_dict.copy()
|
84
|
-
end = d.pop("end", UNSET)
|
85
104
|
|
86
|
-
|
105
|
+
def _parse_end(data: object) -> Union[None, Unset, str]:
|
106
|
+
if data is None:
|
107
|
+
return data
|
108
|
+
if isinstance(data, Unset):
|
109
|
+
return data
|
110
|
+
return cast(Union[None, Unset, str], data)
|
111
|
+
|
112
|
+
end = _parse_end(d.pop("end", UNSET))
|
113
|
+
|
114
|
+
def _parse_error(data: object) -> Union[None, Unset, str]:
|
115
|
+
if data is None:
|
116
|
+
return data
|
117
|
+
if isinstance(data, Unset):
|
118
|
+
return data
|
119
|
+
return cast(Union[None, Unset, str], data)
|
120
|
+
|
121
|
+
error = _parse_error(d.pop("error", UNSET))
|
87
122
|
|
88
123
|
name = d.pop("name", UNSET)
|
89
124
|
|
90
125
|
parameters = d.pop("parameters", UNSET)
|
91
126
|
|
92
|
-
|
127
|
+
def _parse_start(data: object) -> Union[None, Unset, str]:
|
128
|
+
if data is None:
|
129
|
+
return data
|
130
|
+
if isinstance(data, Unset):
|
131
|
+
return data
|
132
|
+
return cast(Union[None, Unset, str], data)
|
133
|
+
|
134
|
+
start = _parse_start(d.pop("start", UNSET))
|
93
135
|
|
94
136
|
status = d.pop("status", UNSET)
|
95
137
|
|
96
|
-
|
138
|
+
def _parse_sub_function(data: object) -> Union[None, Unset, str]:
|
139
|
+
if data is None:
|
140
|
+
return data
|
141
|
+
if isinstance(data, Unset):
|
142
|
+
return data
|
143
|
+
return cast(Union[None, Unset, str], data)
|
144
|
+
|
145
|
+
sub_function = _parse_sub_function(d.pop("sub_function", UNSET))
|
146
|
+
|
147
|
+
def _parse_took(data: object) -> Union[None, Unset, int]:
|
148
|
+
if data is None:
|
149
|
+
return data
|
150
|
+
if isinstance(data, Unset):
|
151
|
+
return data
|
152
|
+
return cast(Union[None, Unset, int], data)
|
97
153
|
|
98
|
-
took = d.pop("took", UNSET)
|
154
|
+
took = _parse_took(d.pop("took", UNSET))
|
99
155
|
|
100
156
|
type = d.pop("type", UNSET)
|
101
157
|
|
beamlit/models/{function_deployment_pod_template.py → agent_deployment_pod_template_type_0.py}
RENAMED
@@ -3,11 +3,11 @@ from typing import Any, Type, TypeVar
|
|
3
3
|
from attrs import define as _attrs_define
|
4
4
|
from attrs import field as _attrs_field
|
5
5
|
|
6
|
-
T = TypeVar("T", bound="
|
6
|
+
T = TypeVar("T", bound="AgentDeploymentPodTemplateType0")
|
7
7
|
|
8
8
|
|
9
9
|
@_attrs_define
|
10
|
-
class
|
10
|
+
class AgentDeploymentPodTemplateType0:
|
11
11
|
"""The pod template, should be a valid Kubernetes pod template"""
|
12
12
|
|
13
13
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
@@ -21,10 +21,10 @@ class FunctionDeploymentPodTemplate:
|
|
21
21
|
@classmethod
|
22
22
|
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
23
23
|
d = src_dict.copy()
|
24
|
-
|
24
|
+
agent_deployment_pod_template_type_0 = cls()
|
25
25
|
|
26
|
-
|
27
|
-
return
|
26
|
+
agent_deployment_pod_template_type_0.additional_properties = d
|
27
|
+
return agent_deployment_pod_template_type_0
|
28
28
|
|
29
29
|
@property
|
30
30
|
def additional_keys(self) -> list[str]:
|