beamlit 0.0.20rc3__py3-none-any.whl → 0.0.20rc5__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- beamlit/api/agents/delete_agent_history.py +155 -0
- beamlit/api/agents/get_agent_deployment.py +1 -22
- beamlit/api/agents/get_agent_environment_logs.py +151 -0
- beamlit/api/agents/get_agent_history.py +155 -0
- beamlit/api/agents/list_agent_history.py +151 -0
- beamlit/api/agents/put_agent_history.py +181 -0
- beamlit/api/functions/get_function_environment_logs.py +151 -0
- beamlit/api/models/get_model_environment_logs.py +155 -0
- beamlit/authentication/__init__.py +4 -0
- beamlit/authentication/apikey.py +6 -0
- beamlit/authentication/authentication.py +31 -2
- beamlit/authentication/clientcredentials.py +20 -9
- beamlit/authentication/credentials.py +1 -0
- beamlit/authentication/device_mode.py +10 -1
- beamlit/common/generate.py +8 -3
- beamlit/common/logger.py +2 -0
- beamlit/common/settings.py +1 -5
- beamlit/models/__init__.py +28 -30
- beamlit/models/acl.py +2 -0
- beamlit/models/agent.py +2 -0
- beamlit/models/agent_chain.py +2 -0
- beamlit/models/agent_configuration.py +2 -0
- beamlit/models/agent_deployment.py +44 -99
- beamlit/models/agent_deployment_configuration.py +45 -0
- beamlit/models/agent_deployment_history.py +15 -46
- beamlit/models/agent_deployment_history_event.py +24 -78
- beamlit/models/agent_deployment_pod_template.py +45 -0
- beamlit/models/agent_history.py +165 -0
- beamlit/models/agent_history_event.py +131 -0
- beamlit/models/agent_metadata.py +144 -0
- beamlit/models/agent_release.py +2 -0
- beamlit/models/agent_spec.py +238 -0
- beamlit/models/agent_with_deployments.py +2 -0
- beamlit/models/api_key.py +2 -0
- beamlit/models/authentication_provider_model.py +2 -0
- beamlit/models/authentication_provider_organization.py +2 -0
- beamlit/models/configuration.py +2 -0
- beamlit/models/continent.py +2 -0
- beamlit/models/core_spec.py +179 -0
- beamlit/models/country.py +2 -0
- beamlit/models/create_api_key_for_service_account_body.py +2 -0
- beamlit/models/create_workspace_service_account_body.py +2 -0
- beamlit/models/create_workspace_service_account_response_200.py +2 -0
- beamlit/models/delete_workspace_service_account_response_200.py +2 -0
- beamlit/models/deployment_configuration.py +2 -0
- beamlit/models/deployment_configurations.py +2 -0
- beamlit/models/deployment_serverless_config.py +131 -0
- beamlit/models/environment.py +2 -0
- beamlit/models/environment_metrics.py +2 -0
- beamlit/models/environment_spec.py +61 -0
- beamlit/models/flavor.py +2 -0
- beamlit/models/function.py +2 -0
- beamlit/models/function_configuration.py +2 -0
- beamlit/models/function_deployment.py +44 -99
- beamlit/models/function_deployment_configuration.py +45 -0
- beamlit/models/function_deployment_pod_template.py +45 -0
- beamlit/models/function_kit.py +2 -0
- beamlit/models/function_metadata.py +144 -0
- beamlit/models/function_provider_ref.py +2 -0
- beamlit/models/function_release.py +2 -0
- beamlit/models/function_spec.py +240 -0
- beamlit/models/function_with_deployments.py +2 -0
- beamlit/models/get_workspace_service_accounts_response_200_item.py +2 -0
- beamlit/models/increase_and_rate_metric.py +2 -0
- beamlit/models/integration.py +2 -0
- beamlit/models/integration_config.py +2 -0
- beamlit/models/integration_connection.py +2 -0
- beamlit/models/integration_connection_config.py +2 -0
- beamlit/models/integration_connection_secret.py +2 -0
- beamlit/models/integration_connection_spec.py +99 -0
- beamlit/models/integration_model.py +2 -0
- beamlit/models/integration_secret.py +2 -0
- beamlit/models/invite_workspace_user_body.py +2 -0
- beamlit/models/labels_type_0.py +2 -0
- beamlit/models/location.py +2 -0
- beamlit/models/location_response.py +2 -0
- beamlit/models/metadata.py +135 -0
- beamlit/models/metadata_labels.py +43 -0
- beamlit/models/metric.py +2 -0
- beamlit/models/metrics.py +2 -0
- beamlit/models/model.py +2 -0
- beamlit/models/model_deployment.py +66 -85
- beamlit/models/model_deployment_log.py +2 -0
- beamlit/models/model_deployment_metrics.py +2 -0
- beamlit/models/model_deployment_metrics_inference_per_second_per_region.py +2 -0
- beamlit/models/model_deployment_metrics_query_per_second_per_region_per_code.py +2 -0
- beamlit/models/model_deployment_pod_template.py +45 -0
- beamlit/models/model_metadata.py +144 -0
- beamlit/models/model_metrics.py +2 -0
- beamlit/models/model_provider.py +2 -0
- beamlit/models/model_provider_ref.py +2 -0
- beamlit/models/model_release.py +2 -0
- beamlit/models/model_spec.py +188 -0
- beamlit/models/model_with_deployments.py +2 -0
- beamlit/models/owner_fields.py +68 -0
- beamlit/models/pending_invitation.py +2 -0
- beamlit/models/pending_invitation_accept.py +2 -0
- beamlit/models/pending_invitation_render.py +2 -0
- beamlit/models/pending_invitation_render_invited_by.py +2 -0
- beamlit/models/pending_invitation_render_workspace.py +2 -0
- beamlit/models/pending_invitation_workspace_details.py +2 -0
- beamlit/models/pod_template_spec.py +43 -0
- beamlit/models/policy.py +36 -8
- beamlit/models/policy_location.py +2 -0
- beamlit/models/policy_spec.py +119 -0
- beamlit/models/provider_config.py +2 -0
- beamlit/models/qps.py +2 -0
- beamlit/models/resource_deployment_log.py +2 -0
- beamlit/models/resource_deployment_metrics.py +70 -155
- beamlit/models/resource_deployment_metrics_inference_per_region.py +77 -0
- beamlit/models/resource_deployment_metrics_inference_per_second_per_region.py +77 -0
- beamlit/models/resource_deployment_metrics_query_per_region_per_code.py +75 -0
- beamlit/models/resource_deployment_metrics_query_per_second_per_region_per_code.py +75 -0
- beamlit/models/resource_environment_metrics.py +172 -0
- beamlit/models/resource_environment_metrics_inference_per_second_per_region.py +75 -0
- beamlit/models/resource_environment_metrics_query_per_second_per_region_per_code.py +73 -0
- beamlit/models/resource_log.py +68 -0
- beamlit/models/resource_metrics.py +2 -0
- beamlit/models/runtime.py +14 -29
- beamlit/models/runtime_readiness_probe.py +45 -0
- beamlit/models/runtime_resources.py +2 -0
- beamlit/models/runtime_type_0.py +111 -0
- beamlit/models/runtime_type_0_readiness_probe.py +43 -0
- beamlit/models/runtime_type_0_readiness_probe_type_0.py +43 -0
- beamlit/models/runtime_type_0_resources.py +59 -0
- beamlit/models/serverless_config.py +2 -0
- beamlit/models/spec_configuration.py +68 -0
- beamlit/models/standard_fields_dynamo_db.py +2 -0
- beamlit/models/store_agent.py +15 -29
- beamlit/models/store_agent_configuration.py +2 -0
- beamlit/models/store_agent_labels.py +45 -0
- beamlit/models/store_configuration.py +6 -15
- beamlit/models/store_configuration_option.py +7 -18
- beamlit/models/store_function.py +15 -29
- beamlit/models/store_function_configuration.py +2 -0
- beamlit/models/store_function_kit.py +2 -0
- beamlit/models/store_function_labels.py +45 -0
- beamlit/models/store_function_parameter.py +2 -0
- beamlit/models/time_fields.py +68 -0
- beamlit/models/update_workspace_service_account_body.py +2 -0
- beamlit/models/update_workspace_service_account_response_200.py +2 -0
- beamlit/models/update_workspace_user_role_body.py +2 -0
- beamlit/models/websocket_channel.py +86 -0
- beamlit/models/workspace.py +2 -0
- beamlit/models/workspace_labels.py +2 -0
- beamlit/models/workspace_user.py +2 -0
- {beamlit-0.0.20rc3.dist-info → beamlit-0.0.20rc5.dist-info}/METADATA +1 -1
- {beamlit-0.0.20rc3.dist-info → beamlit-0.0.20rc5.dist-info}/RECORD +149 -102
- {beamlit-0.0.20rc3.dist-info → beamlit-0.0.20rc5.dist-info}/WHEEL +0 -0
@@ -0,0 +1,144 @@
|
|
1
|
+
from typing import TYPE_CHECKING, Any, Dict, Type, TypeVar, Union
|
2
|
+
|
3
|
+
from attrs import define as _attrs_define
|
4
|
+
from attrs import field as _attrs_field
|
5
|
+
|
6
|
+
from ..types import UNSET, Unset
|
7
|
+
|
8
|
+
if TYPE_CHECKING:
|
9
|
+
from ..models.metadata_labels import MetadataLabels
|
10
|
+
|
11
|
+
|
12
|
+
T = TypeVar("T", bound="AgentMetadata")
|
13
|
+
|
14
|
+
|
15
|
+
@_attrs_define
|
16
|
+
class AgentMetadata:
|
17
|
+
"""Agent metadata
|
18
|
+
|
19
|
+
Attributes:
|
20
|
+
created_at (Union[Unset, str]): The date and time when the resource was created
|
21
|
+
updated_at (Union[Unset, str]): The date and time when the resource was updated
|
22
|
+
created_by (Union[Unset, str]): The user or service account who created the resource
|
23
|
+
updated_by (Union[Unset, str]): The user or service account who updated the resource
|
24
|
+
display_name (Union[Unset, str]): Model display name
|
25
|
+
labels (Union[Unset, MetadataLabels]): Labels
|
26
|
+
name (Union[Unset, str]): Model name
|
27
|
+
workspace (Union[Unset, str]): Workspace name
|
28
|
+
environment (Union[Unset, str]): Environment name
|
29
|
+
"""
|
30
|
+
|
31
|
+
created_at: Union[Unset, str] = UNSET
|
32
|
+
updated_at: Union[Unset, str] = UNSET
|
33
|
+
created_by: Union[Unset, str] = UNSET
|
34
|
+
updated_by: Union[Unset, str] = UNSET
|
35
|
+
display_name: Union[Unset, str] = UNSET
|
36
|
+
labels: Union[Unset, "MetadataLabels"] = UNSET
|
37
|
+
name: Union[Unset, str] = UNSET
|
38
|
+
workspace: Union[Unset, str] = UNSET
|
39
|
+
environment: Union[Unset, str] = UNSET
|
40
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
41
|
+
|
42
|
+
def to_dict(self) -> dict[str, Any]:
|
43
|
+
created_at = self.created_at
|
44
|
+
|
45
|
+
updated_at = self.updated_at
|
46
|
+
|
47
|
+
created_by = self.created_by
|
48
|
+
|
49
|
+
updated_by = self.updated_by
|
50
|
+
|
51
|
+
display_name = self.display_name
|
52
|
+
|
53
|
+
labels: Union[Unset, Dict[str, Any]] = UNSET
|
54
|
+
if not isinstance(self.labels, Unset):
|
55
|
+
labels = self.labels.to_dict()
|
56
|
+
|
57
|
+
name = self.name
|
58
|
+
|
59
|
+
workspace = self.workspace
|
60
|
+
|
61
|
+
environment = self.environment
|
62
|
+
|
63
|
+
field_dict: dict[str, Any] = {}
|
64
|
+
field_dict.update(self.additional_properties)
|
65
|
+
field_dict.update({})
|
66
|
+
if created_at is not UNSET:
|
67
|
+
field_dict["createdAt"] = created_at
|
68
|
+
if updated_at is not UNSET:
|
69
|
+
field_dict["updatedAt"] = updated_at
|
70
|
+
if created_by is not UNSET:
|
71
|
+
field_dict["createdBy"] = created_by
|
72
|
+
if updated_by is not UNSET:
|
73
|
+
field_dict["updatedBy"] = updated_by
|
74
|
+
if display_name is not UNSET:
|
75
|
+
field_dict["displayName"] = display_name
|
76
|
+
if labels is not UNSET:
|
77
|
+
field_dict["labels"] = labels
|
78
|
+
if name is not UNSET:
|
79
|
+
field_dict["name"] = name
|
80
|
+
if workspace is not UNSET:
|
81
|
+
field_dict["workspace"] = workspace
|
82
|
+
if environment is not UNSET:
|
83
|
+
field_dict["environment"] = environment
|
84
|
+
|
85
|
+
return field_dict
|
86
|
+
|
87
|
+
@classmethod
|
88
|
+
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
89
|
+
from ..models.metadata_labels import MetadataLabels
|
90
|
+
|
91
|
+
d = src_dict.copy()
|
92
|
+
created_at = d.pop("createdAt", UNSET)
|
93
|
+
|
94
|
+
updated_at = d.pop("updatedAt", UNSET)
|
95
|
+
|
96
|
+
created_by = d.pop("createdBy", UNSET)
|
97
|
+
|
98
|
+
updated_by = d.pop("updatedBy", UNSET)
|
99
|
+
|
100
|
+
display_name = d.pop("displayName", UNSET)
|
101
|
+
|
102
|
+
_labels = d.pop("labels", UNSET)
|
103
|
+
labels: Union[Unset, MetadataLabels]
|
104
|
+
if isinstance(_labels, Unset):
|
105
|
+
labels = UNSET
|
106
|
+
else:
|
107
|
+
labels = MetadataLabels.from_dict(_labels)
|
108
|
+
|
109
|
+
name = d.pop("name", UNSET)
|
110
|
+
|
111
|
+
workspace = d.pop("workspace", UNSET)
|
112
|
+
|
113
|
+
environment = d.pop("environment", UNSET)
|
114
|
+
|
115
|
+
agent_metadata = cls(
|
116
|
+
created_at=created_at,
|
117
|
+
updated_at=updated_at,
|
118
|
+
created_by=created_by,
|
119
|
+
updated_by=updated_by,
|
120
|
+
display_name=display_name,
|
121
|
+
labels=labels,
|
122
|
+
name=name,
|
123
|
+
workspace=workspace,
|
124
|
+
environment=environment,
|
125
|
+
)
|
126
|
+
|
127
|
+
agent_metadata.additional_properties = d
|
128
|
+
return agent_metadata
|
129
|
+
|
130
|
+
@property
|
131
|
+
def additional_keys(self) -> list[str]:
|
132
|
+
return list(self.additional_properties.keys())
|
133
|
+
|
134
|
+
def __getitem__(self, key: str) -> Any:
|
135
|
+
return self.additional_properties[key]
|
136
|
+
|
137
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
138
|
+
self.additional_properties[key] = value
|
139
|
+
|
140
|
+
def __delitem__(self, key: str) -> None:
|
141
|
+
del self.additional_properties[key]
|
142
|
+
|
143
|
+
def __contains__(self, key: str) -> bool:
|
144
|
+
return key in self.additional_properties
|
beamlit/models/agent_release.py
CHANGED
@@ -0,0 +1,238 @@
|
|
1
|
+
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast
|
2
|
+
|
3
|
+
from attrs import define as _attrs_define
|
4
|
+
from attrs import field as _attrs_field
|
5
|
+
|
6
|
+
from ..types import UNSET, Unset
|
7
|
+
|
8
|
+
if TYPE_CHECKING:
|
9
|
+
from ..models.agent_chain import AgentChain
|
10
|
+
from ..models.flavor import Flavor
|
11
|
+
from ..models.pod_template_spec import PodTemplateSpec
|
12
|
+
from ..models.runtime import Runtime
|
13
|
+
from ..models.serverless_config import ServerlessConfig
|
14
|
+
from ..models.spec_configuration import SpecConfiguration
|
15
|
+
|
16
|
+
|
17
|
+
T = TypeVar("T", bound="AgentSpec")
|
18
|
+
|
19
|
+
|
20
|
+
@_attrs_define
|
21
|
+
class AgentSpec:
|
22
|
+
"""Agent specification
|
23
|
+
|
24
|
+
Attributes:
|
25
|
+
configurations (Union[Unset, SpecConfiguration]): Agent configuration, this is a key value storage. In your
|
26
|
+
agent you can retrieve the value with config[key]
|
27
|
+
enabled (Union[Unset, bool]): Enable or disable the agent
|
28
|
+
flavors (Union[Unset, List['Flavor']]): Types of hardware available for deployments
|
29
|
+
integration_connections (Union[Unset, List[str]]):
|
30
|
+
pod_template (Union[Unset, PodTemplateSpec]): Pod template specification
|
31
|
+
policies (Union[Unset, List[str]]):
|
32
|
+
runtime (Union[Unset, Runtime]): Set of configurations for a deployment
|
33
|
+
serverless_config (Union[Unset, ServerlessConfig]): Configuration for a serverless deployment
|
34
|
+
agent_chain (Union[Unset, List['AgentChain']]): Agent chain
|
35
|
+
description (Union[Unset, str]): Agent description
|
36
|
+
functions (Union[Unset, List[str]]):
|
37
|
+
model (Union[Unset, str]): Model name
|
38
|
+
store_id (Union[Unset, str]): Store id
|
39
|
+
"""
|
40
|
+
|
41
|
+
configurations: Union[Unset, "SpecConfiguration"] = UNSET
|
42
|
+
enabled: Union[Unset, bool] = UNSET
|
43
|
+
flavors: Union[Unset, List["Flavor"]] = UNSET
|
44
|
+
integration_connections: Union[Unset, List[str]] = UNSET
|
45
|
+
pod_template: Union[Unset, "PodTemplateSpec"] = UNSET
|
46
|
+
policies: Union[Unset, List[str]] = UNSET
|
47
|
+
runtime: Union[Unset, "Runtime"] = UNSET
|
48
|
+
serverless_config: Union[Unset, "ServerlessConfig"] = UNSET
|
49
|
+
agent_chain: Union[Unset, List["AgentChain"]] = UNSET
|
50
|
+
description: Union[Unset, str] = UNSET
|
51
|
+
functions: Union[Unset, List[str]] = UNSET
|
52
|
+
model: Union[Unset, str] = UNSET
|
53
|
+
store_id: Union[Unset, str] = UNSET
|
54
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
55
|
+
|
56
|
+
def to_dict(self) -> dict[str, Any]:
|
57
|
+
configurations: Union[Unset, Dict[str, Any]] = UNSET
|
58
|
+
if not isinstance(self.configurations, Unset):
|
59
|
+
configurations = self.configurations.to_dict()
|
60
|
+
|
61
|
+
enabled = self.enabled
|
62
|
+
|
63
|
+
flavors: Union[Unset, List[Dict[str, Any]]] = UNSET
|
64
|
+
if not isinstance(self.flavors, Unset):
|
65
|
+
flavors = []
|
66
|
+
for componentsschemas_flavors_item_data in self.flavors:
|
67
|
+
componentsschemas_flavors_item = componentsschemas_flavors_item_data.to_dict()
|
68
|
+
flavors.append(componentsschemas_flavors_item)
|
69
|
+
|
70
|
+
integration_connections: Union[Unset, List[str]] = UNSET
|
71
|
+
if not isinstance(self.integration_connections, Unset):
|
72
|
+
integration_connections = self.integration_connections
|
73
|
+
|
74
|
+
pod_template: Union[Unset, Dict[str, Any]] = UNSET
|
75
|
+
if not isinstance(self.pod_template, Unset):
|
76
|
+
pod_template = self.pod_template.to_dict()
|
77
|
+
|
78
|
+
policies: Union[Unset, List[str]] = UNSET
|
79
|
+
if not isinstance(self.policies, Unset):
|
80
|
+
policies = self.policies
|
81
|
+
|
82
|
+
runtime: Union[Unset, Dict[str, Any]] = UNSET
|
83
|
+
if not isinstance(self.runtime, Unset):
|
84
|
+
runtime = self.runtime.to_dict()
|
85
|
+
|
86
|
+
serverless_config: Union[Unset, Dict[str, Any]] = UNSET
|
87
|
+
if not isinstance(self.serverless_config, Unset):
|
88
|
+
serverless_config = self.serverless_config.to_dict()
|
89
|
+
|
90
|
+
agent_chain: Union[Unset, List[Dict[str, Any]]] = UNSET
|
91
|
+
if not isinstance(self.agent_chain, Unset):
|
92
|
+
agent_chain = []
|
93
|
+
for componentsschemas_agent_chains_item_data in self.agent_chain:
|
94
|
+
componentsschemas_agent_chains_item = componentsschemas_agent_chains_item_data.to_dict()
|
95
|
+
agent_chain.append(componentsschemas_agent_chains_item)
|
96
|
+
|
97
|
+
description = self.description
|
98
|
+
|
99
|
+
functions: Union[Unset, List[str]] = UNSET
|
100
|
+
if not isinstance(self.functions, Unset):
|
101
|
+
functions = self.functions
|
102
|
+
|
103
|
+
model = self.model
|
104
|
+
|
105
|
+
store_id = self.store_id
|
106
|
+
|
107
|
+
field_dict: dict[str, Any] = {}
|
108
|
+
field_dict.update(self.additional_properties)
|
109
|
+
field_dict.update({})
|
110
|
+
if configurations is not UNSET:
|
111
|
+
field_dict["configurations"] = configurations
|
112
|
+
if enabled is not UNSET:
|
113
|
+
field_dict["enabled"] = enabled
|
114
|
+
if flavors is not UNSET:
|
115
|
+
field_dict["flavors"] = flavors
|
116
|
+
if integration_connections is not UNSET:
|
117
|
+
field_dict["integrationConnections"] = integration_connections
|
118
|
+
if pod_template is not UNSET:
|
119
|
+
field_dict["podTemplate"] = pod_template
|
120
|
+
if policies is not UNSET:
|
121
|
+
field_dict["policies"] = policies
|
122
|
+
if runtime is not UNSET:
|
123
|
+
field_dict["runtime"] = runtime
|
124
|
+
if serverless_config is not UNSET:
|
125
|
+
field_dict["serverlessConfig"] = serverless_config
|
126
|
+
if agent_chain is not UNSET:
|
127
|
+
field_dict["agentChain"] = agent_chain
|
128
|
+
if description is not UNSET:
|
129
|
+
field_dict["description"] = description
|
130
|
+
if functions is not UNSET:
|
131
|
+
field_dict["functions"] = functions
|
132
|
+
if model is not UNSET:
|
133
|
+
field_dict["model"] = model
|
134
|
+
if store_id is not UNSET:
|
135
|
+
field_dict["storeId"] = store_id
|
136
|
+
|
137
|
+
return field_dict
|
138
|
+
|
139
|
+
@classmethod
|
140
|
+
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
141
|
+
from ..models.agent_chain import AgentChain
|
142
|
+
from ..models.flavor import Flavor
|
143
|
+
from ..models.pod_template_spec import PodTemplateSpec
|
144
|
+
from ..models.runtime import Runtime
|
145
|
+
from ..models.serverless_config import ServerlessConfig
|
146
|
+
from ..models.spec_configuration import SpecConfiguration
|
147
|
+
|
148
|
+
d = src_dict.copy()
|
149
|
+
_configurations = d.pop("configurations", UNSET)
|
150
|
+
configurations: Union[Unset, SpecConfiguration]
|
151
|
+
if isinstance(_configurations, Unset):
|
152
|
+
configurations = UNSET
|
153
|
+
else:
|
154
|
+
configurations = SpecConfiguration.from_dict(_configurations)
|
155
|
+
|
156
|
+
enabled = d.pop("enabled", UNSET)
|
157
|
+
|
158
|
+
flavors = []
|
159
|
+
_flavors = d.pop("flavors", UNSET)
|
160
|
+
for componentsschemas_flavors_item_data in _flavors or []:
|
161
|
+
componentsschemas_flavors_item = Flavor.from_dict(componentsschemas_flavors_item_data)
|
162
|
+
|
163
|
+
flavors.append(componentsschemas_flavors_item)
|
164
|
+
|
165
|
+
integration_connections = cast(List[str], d.pop("integrationConnections", UNSET))
|
166
|
+
|
167
|
+
_pod_template = d.pop("podTemplate", UNSET)
|
168
|
+
pod_template: Union[Unset, PodTemplateSpec]
|
169
|
+
if isinstance(_pod_template, Unset):
|
170
|
+
pod_template = UNSET
|
171
|
+
else:
|
172
|
+
pod_template = PodTemplateSpec.from_dict(_pod_template)
|
173
|
+
|
174
|
+
policies = cast(List[str], d.pop("policies", UNSET))
|
175
|
+
|
176
|
+
_runtime = d.pop("runtime", UNSET)
|
177
|
+
runtime: Union[Unset, Runtime]
|
178
|
+
if isinstance(_runtime, Unset):
|
179
|
+
runtime = UNSET
|
180
|
+
else:
|
181
|
+
runtime = Runtime.from_dict(_runtime)
|
182
|
+
|
183
|
+
_serverless_config = d.pop("serverlessConfig", UNSET)
|
184
|
+
serverless_config: Union[Unset, ServerlessConfig]
|
185
|
+
if isinstance(_serverless_config, Unset):
|
186
|
+
serverless_config = UNSET
|
187
|
+
else:
|
188
|
+
serverless_config = ServerlessConfig.from_dict(_serverless_config)
|
189
|
+
|
190
|
+
agent_chain = []
|
191
|
+
_agent_chain = d.pop("agentChain", UNSET)
|
192
|
+
for componentsschemas_agent_chains_item_data in _agent_chain or []:
|
193
|
+
componentsschemas_agent_chains_item = AgentChain.from_dict(componentsschemas_agent_chains_item_data)
|
194
|
+
|
195
|
+
agent_chain.append(componentsschemas_agent_chains_item)
|
196
|
+
|
197
|
+
description = d.pop("description", UNSET)
|
198
|
+
|
199
|
+
functions = cast(List[str], d.pop("functions", UNSET))
|
200
|
+
|
201
|
+
model = d.pop("model", UNSET)
|
202
|
+
|
203
|
+
store_id = d.pop("storeId", UNSET)
|
204
|
+
|
205
|
+
agent_spec = cls(
|
206
|
+
configurations=configurations,
|
207
|
+
enabled=enabled,
|
208
|
+
flavors=flavors,
|
209
|
+
integration_connections=integration_connections,
|
210
|
+
pod_template=pod_template,
|
211
|
+
policies=policies,
|
212
|
+
runtime=runtime,
|
213
|
+
serverless_config=serverless_config,
|
214
|
+
agent_chain=agent_chain,
|
215
|
+
description=description,
|
216
|
+
functions=functions,
|
217
|
+
model=model,
|
218
|
+
store_id=store_id,
|
219
|
+
)
|
220
|
+
|
221
|
+
agent_spec.additional_properties = d
|
222
|
+
return agent_spec
|
223
|
+
|
224
|
+
@property
|
225
|
+
def additional_keys(self) -> list[str]:
|
226
|
+
return list(self.additional_properties.keys())
|
227
|
+
|
228
|
+
def __getitem__(self, key: str) -> Any:
|
229
|
+
return self.additional_properties[key]
|
230
|
+
|
231
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
232
|
+
self.additional_properties[key] = value
|
233
|
+
|
234
|
+
def __delitem__(self, key: str) -> None:
|
235
|
+
del self.additional_properties[key]
|
236
|
+
|
237
|
+
def __contains__(self, key: str) -> bool:
|
238
|
+
return key in self.additional_properties
|
beamlit/models/api_key.py
CHANGED
beamlit/models/configuration.py
CHANGED
beamlit/models/continent.py
CHANGED
@@ -0,0 +1,179 @@
|
|
1
|
+
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast
|
2
|
+
|
3
|
+
from attrs import define as _attrs_define
|
4
|
+
from attrs import field as _attrs_field
|
5
|
+
|
6
|
+
from ..types import UNSET, Unset
|
7
|
+
|
8
|
+
if TYPE_CHECKING:
|
9
|
+
from ..models.flavor import Flavor
|
10
|
+
from ..models.pod_template_spec import PodTemplateSpec
|
11
|
+
from ..models.runtime import Runtime
|
12
|
+
from ..models.serverless_config import ServerlessConfig
|
13
|
+
from ..models.spec_configuration import SpecConfiguration
|
14
|
+
|
15
|
+
|
16
|
+
T = TypeVar("T", bound="CoreSpec")
|
17
|
+
|
18
|
+
|
19
|
+
@_attrs_define
|
20
|
+
class CoreSpec:
|
21
|
+
"""Core specification
|
22
|
+
|
23
|
+
Attributes:
|
24
|
+
configurations (Union[Unset, SpecConfiguration]): Agent configuration, this is a key value storage. In your
|
25
|
+
agent you can retrieve the value with config[key]
|
26
|
+
enabled (Union[Unset, bool]): Enable or disable the agent
|
27
|
+
flavors (Union[Unset, List['Flavor']]): Types of hardware available for deployments
|
28
|
+
integration_connections (Union[Unset, List[str]]):
|
29
|
+
pod_template (Union[Unset, PodTemplateSpec]): Pod template specification
|
30
|
+
policies (Union[Unset, List[str]]):
|
31
|
+
runtime (Union[Unset, Runtime]): Set of configurations for a deployment
|
32
|
+
serverless_config (Union[Unset, ServerlessConfig]): Configuration for a serverless deployment
|
33
|
+
"""
|
34
|
+
|
35
|
+
configurations: Union[Unset, "SpecConfiguration"] = UNSET
|
36
|
+
enabled: Union[Unset, bool] = UNSET
|
37
|
+
flavors: Union[Unset, List["Flavor"]] = UNSET
|
38
|
+
integration_connections: Union[Unset, List[str]] = UNSET
|
39
|
+
pod_template: Union[Unset, "PodTemplateSpec"] = UNSET
|
40
|
+
policies: Union[Unset, List[str]] = UNSET
|
41
|
+
runtime: Union[Unset, "Runtime"] = UNSET
|
42
|
+
serverless_config: Union[Unset, "ServerlessConfig"] = UNSET
|
43
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
44
|
+
|
45
|
+
def to_dict(self) -> dict[str, Any]:
|
46
|
+
configurations: Union[Unset, Dict[str, Any]] = UNSET
|
47
|
+
if not isinstance(self.configurations, Unset):
|
48
|
+
configurations = self.configurations.to_dict()
|
49
|
+
|
50
|
+
enabled = self.enabled
|
51
|
+
|
52
|
+
flavors: Union[Unset, List[Dict[str, Any]]] = UNSET
|
53
|
+
if not isinstance(self.flavors, Unset):
|
54
|
+
flavors = []
|
55
|
+
for componentsschemas_flavors_item_data in self.flavors:
|
56
|
+
componentsschemas_flavors_item = componentsschemas_flavors_item_data.to_dict()
|
57
|
+
flavors.append(componentsschemas_flavors_item)
|
58
|
+
|
59
|
+
integration_connections: Union[Unset, List[str]] = UNSET
|
60
|
+
if not isinstance(self.integration_connections, Unset):
|
61
|
+
integration_connections = self.integration_connections
|
62
|
+
|
63
|
+
pod_template: Union[Unset, Dict[str, Any]] = UNSET
|
64
|
+
if not isinstance(self.pod_template, Unset):
|
65
|
+
pod_template = self.pod_template.to_dict()
|
66
|
+
|
67
|
+
policies: Union[Unset, List[str]] = UNSET
|
68
|
+
if not isinstance(self.policies, Unset):
|
69
|
+
policies = self.policies
|
70
|
+
|
71
|
+
runtime: Union[Unset, Dict[str, Any]] = UNSET
|
72
|
+
if not isinstance(self.runtime, Unset):
|
73
|
+
runtime = self.runtime.to_dict()
|
74
|
+
|
75
|
+
serverless_config: Union[Unset, Dict[str, Any]] = UNSET
|
76
|
+
if not isinstance(self.serverless_config, Unset):
|
77
|
+
serverless_config = self.serverless_config.to_dict()
|
78
|
+
|
79
|
+
field_dict: dict[str, Any] = {}
|
80
|
+
field_dict.update(self.additional_properties)
|
81
|
+
field_dict.update({})
|
82
|
+
if configurations is not UNSET:
|
83
|
+
field_dict["configurations"] = configurations
|
84
|
+
if enabled is not UNSET:
|
85
|
+
field_dict["enabled"] = enabled
|
86
|
+
if flavors is not UNSET:
|
87
|
+
field_dict["flavors"] = flavors
|
88
|
+
if integration_connections is not UNSET:
|
89
|
+
field_dict["integrationConnections"] = integration_connections
|
90
|
+
if pod_template is not UNSET:
|
91
|
+
field_dict["podTemplate"] = pod_template
|
92
|
+
if policies is not UNSET:
|
93
|
+
field_dict["policies"] = policies
|
94
|
+
if runtime is not UNSET:
|
95
|
+
field_dict["runtime"] = runtime
|
96
|
+
if serverless_config is not UNSET:
|
97
|
+
field_dict["serverlessConfig"] = serverless_config
|
98
|
+
|
99
|
+
return field_dict
|
100
|
+
|
101
|
+
@classmethod
|
102
|
+
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
103
|
+
from ..models.flavor import Flavor
|
104
|
+
from ..models.pod_template_spec import PodTemplateSpec
|
105
|
+
from ..models.runtime import Runtime
|
106
|
+
from ..models.serverless_config import ServerlessConfig
|
107
|
+
from ..models.spec_configuration import SpecConfiguration
|
108
|
+
|
109
|
+
d = src_dict.copy()
|
110
|
+
_configurations = d.pop("configurations", UNSET)
|
111
|
+
configurations: Union[Unset, SpecConfiguration]
|
112
|
+
if isinstance(_configurations, Unset):
|
113
|
+
configurations = UNSET
|
114
|
+
else:
|
115
|
+
configurations = SpecConfiguration.from_dict(_configurations)
|
116
|
+
|
117
|
+
enabled = d.pop("enabled", UNSET)
|
118
|
+
|
119
|
+
flavors = []
|
120
|
+
_flavors = d.pop("flavors", UNSET)
|
121
|
+
for componentsschemas_flavors_item_data in _flavors or []:
|
122
|
+
componentsschemas_flavors_item = Flavor.from_dict(componentsschemas_flavors_item_data)
|
123
|
+
|
124
|
+
flavors.append(componentsschemas_flavors_item)
|
125
|
+
|
126
|
+
integration_connections = cast(List[str], d.pop("integrationConnections", UNSET))
|
127
|
+
|
128
|
+
_pod_template = d.pop("podTemplate", UNSET)
|
129
|
+
pod_template: Union[Unset, PodTemplateSpec]
|
130
|
+
if isinstance(_pod_template, Unset):
|
131
|
+
pod_template = UNSET
|
132
|
+
else:
|
133
|
+
pod_template = PodTemplateSpec.from_dict(_pod_template)
|
134
|
+
|
135
|
+
policies = cast(List[str], d.pop("policies", UNSET))
|
136
|
+
|
137
|
+
_runtime = d.pop("runtime", UNSET)
|
138
|
+
runtime: Union[Unset, Runtime]
|
139
|
+
if isinstance(_runtime, Unset):
|
140
|
+
runtime = UNSET
|
141
|
+
else:
|
142
|
+
runtime = Runtime.from_dict(_runtime)
|
143
|
+
|
144
|
+
_serverless_config = d.pop("serverlessConfig", UNSET)
|
145
|
+
serverless_config: Union[Unset, ServerlessConfig]
|
146
|
+
if isinstance(_serverless_config, Unset):
|
147
|
+
serverless_config = UNSET
|
148
|
+
else:
|
149
|
+
serverless_config = ServerlessConfig.from_dict(_serverless_config)
|
150
|
+
|
151
|
+
core_spec = cls(
|
152
|
+
configurations=configurations,
|
153
|
+
enabled=enabled,
|
154
|
+
flavors=flavors,
|
155
|
+
integration_connections=integration_connections,
|
156
|
+
pod_template=pod_template,
|
157
|
+
policies=policies,
|
158
|
+
runtime=runtime,
|
159
|
+
serverless_config=serverless_config,
|
160
|
+
)
|
161
|
+
|
162
|
+
core_spec.additional_properties = d
|
163
|
+
return core_spec
|
164
|
+
|
165
|
+
@property
|
166
|
+
def additional_keys(self) -> list[str]:
|
167
|
+
return list(self.additional_properties.keys())
|
168
|
+
|
169
|
+
def __getitem__(self, key: str) -> Any:
|
170
|
+
return self.additional_properties[key]
|
171
|
+
|
172
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
173
|
+
self.additional_properties[key] = value
|
174
|
+
|
175
|
+
def __delitem__(self, key: str) -> None:
|
176
|
+
del self.additional_properties[key]
|
177
|
+
|
178
|
+
def __contains__(self, key: str) -> bool:
|
179
|
+
return key in self.additional_properties
|
beamlit/models/country.py
CHANGED