beamlit 0.0.20rc5__py3-none-any.whl → 0.0.20rc7__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- beamlit/agents/__init__.py +4 -0
- beamlit/agents/chat.py +87 -0
- beamlit/agents/decorator.py +147 -0
- beamlit/api/agents/delete_agent_history.py +6 -2
- beamlit/api/agents/get_agent_deployment_logs.py +11 -11
- beamlit/api/agents/get_agent_history.py +6 -2
- beamlit/api/agents/list_agent_deployment_history.py +11 -11
- beamlit/api/agents/list_agent_deployments.py +11 -11
- beamlit/api/agents/list_agents.py +11 -11
- beamlit/api/agents/put_agent_history.py +6 -2
- beamlit/api/environments/list_environments.py +11 -11
- beamlit/api/functions/get_function_deployment_logs.py +11 -11
- beamlit/api/functions/list_function_deployments.py +11 -11
- beamlit/api/functions/list_functions.py +11 -11
- beamlit/api/history/get_agents_history.py +11 -11
- beamlit/api/history/list_agents_history.py +11 -11
- beamlit/api/integrations/list_integration_connections.py +11 -11
- beamlit/api/invitations/list_all_pending_invitations.py +11 -11
- beamlit/api/locations/list_locations.py +11 -11
- beamlit/api/model_providers/list_model_providers.py +11 -11
- beamlit/api/models/get_model_deployment_logs.py +11 -11
- beamlit/api/models/list_model_deployments.py +11 -11
- beamlit/api/models/list_models.py +11 -11
- beamlit/api/policies/list_policies.py +11 -11
- beamlit/api/service_accounts/get_workspace_service_accounts.py +11 -11
- beamlit/api/service_accounts/list_api_keys_for_service_account.py +11 -11
- beamlit/api/store/list_store_agents.py +11 -11
- beamlit/api/store/list_store_functions.py +11 -11
- beamlit/api/workspaces/list_workspace_users.py +11 -11
- beamlit/api/workspaces/list_workspaces.py +11 -11
- beamlit/authentication/__init__.py +26 -10
- beamlit/authentication/apikey.py +4 -4
- beamlit/authentication/authentication.py +36 -5
- beamlit/authentication/clientcredentials.py +18 -20
- beamlit/authentication/credentials.py +18 -11
- beamlit/authentication/device_mode.py +15 -12
- beamlit/common/__init__.py +13 -0
- beamlit/common/generate.py +31 -19
- beamlit/common/logger.py +9 -12
- beamlit/common/secrets.py +11 -0
- beamlit/common/settings.py +78 -30
- beamlit/common/utils.py +4 -2
- beamlit/functions/__init__.py +5 -0
- beamlit/functions/decorator.py +90 -0
- beamlit/models/acl.py +2 -2
- beamlit/models/agent.py +3 -3
- beamlit/models/agent_chain.py +2 -2
- beamlit/models/agent_configuration.py +2 -2
- beamlit/models/agent_deployment.py +25 -25
- beamlit/models/agent_deployment_configuration.py +2 -2
- beamlit/models/agent_deployment_history.py +5 -5
- beamlit/models/agent_deployment_history_event.py +9 -9
- beamlit/models/agent_deployment_pod_template.py +2 -2
- beamlit/models/agent_release.py +2 -2
- beamlit/models/agent_spec.py +15 -5
- beamlit/models/agent_with_deployments.py +6 -6
- beamlit/models/api_key.py +2 -2
- beamlit/models/authentication_provider_model.py +6 -6
- beamlit/models/authentication_provider_organization.py +2 -2
- beamlit/models/configuration.py +10 -10
- beamlit/models/continent.py +2 -2
- beamlit/models/core_spec.py +9 -3
- beamlit/models/country.py +2 -2
- beamlit/models/create_api_key_for_service_account_body.py +2 -2
- beamlit/models/create_workspace_service_account_body.py +2 -2
- beamlit/models/create_workspace_service_account_response_200.py +2 -2
- beamlit/models/delete_workspace_service_account_response_200.py +2 -2
- beamlit/models/deployment_configuration.py +2 -2
- beamlit/models/deployment_configurations.py +2 -2
- beamlit/models/deployment_serverless_config.py +2 -2
- beamlit/models/deployment_serverless_config_type_0.py +3 -1
- beamlit/models/environment.py +7 -7
- beamlit/models/environment_metrics.py +8 -8
- beamlit/models/flavor.py +9 -9
- beamlit/models/function.py +3 -3
- beamlit/models/function_configuration.py +2 -2
- beamlit/models/function_deployment.py +24 -24
- beamlit/models/function_deployment_configuration.py +2 -2
- beamlit/models/function_deployment_pod_template.py +2 -2
- beamlit/models/function_kit.py +5 -5
- beamlit/models/function_provider_ref.py +2 -2
- beamlit/models/function_release.py +2 -2
- beamlit/models/function_spec.py +9 -3
- beamlit/models/function_with_deployments.py +6 -6
- beamlit/models/get_workspace_service_accounts_response_200_item.py +2 -2
- beamlit/models/increase_and_rate_metric.py +5 -5
- beamlit/models/integration.py +12 -12
- beamlit/models/integration_config.py +2 -2
- beamlit/models/integration_connection.py +5 -5
- beamlit/models/integration_connection_config.py +2 -2
- beamlit/models/integration_connection_secret.py +2 -2
- beamlit/models/integration_model.py +6 -6
- beamlit/models/integration_secret.py +2 -2
- beamlit/models/invite_workspace_user_body.py +2 -2
- beamlit/models/labels_type_0.py +2 -2
- beamlit/models/location.py +5 -5
- beamlit/models/location_response.py +5 -5
- beamlit/models/metric.py +2 -2
- beamlit/models/metrics.py +8 -8
- beamlit/models/model.py +3 -3
- beamlit/models/model_deployment.py +18 -18
- beamlit/models/model_deployment_log.py +2 -2
- beamlit/models/model_deployment_metrics.py +9 -9
- beamlit/models/model_deployment_metrics_inference_per_second_per_region.py +5 -5
- beamlit/models/model_deployment_metrics_query_per_second_per_region_per_code.py +3 -3
- beamlit/models/model_deployment_pod_template.py +2 -2
- beamlit/models/model_metrics.py +6 -6
- beamlit/models/model_provider.py +11 -11
- beamlit/models/model_provider_ref.py +2 -2
- beamlit/models/model_release.py +2 -2
- beamlit/models/model_spec.py +9 -3
- beamlit/models/model_with_deployments.py +6 -6
- beamlit/models/pending_invitation.py +2 -2
- beamlit/models/pending_invitation_accept.py +3 -3
- beamlit/models/pending_invitation_render.py +5 -5
- beamlit/models/pending_invitation_render_invited_by.py +2 -2
- beamlit/models/pending_invitation_render_workspace.py +2 -2
- beamlit/models/pending_invitation_workspace_details.py +6 -6
- beamlit/models/policy.py +20 -20
- beamlit/models/policy_location.py +9 -9
- beamlit/models/policy_spec.py +9 -3
- beamlit/models/provider_config.py +7 -7
- beamlit/models/qps.py +2 -2
- beamlit/models/resource_deployment_log.py +2 -2
- beamlit/models/resource_deployment_metrics.py +16 -16
- beamlit/models/resource_deployment_metrics_inference_per_region.py +5 -5
- beamlit/models/resource_deployment_metrics_inference_per_region_type_0.py +6 -2
- beamlit/models/resource_deployment_metrics_inference_per_second_per_region.py +5 -5
- beamlit/models/resource_deployment_metrics_inference_per_second_per_region_type_0.py +6 -2
- beamlit/models/resource_deployment_metrics_query_per_region_per_code.py +3 -3
- beamlit/models/resource_deployment_metrics_query_per_second_per_region_per_code.py +3 -3
- beamlit/models/resource_environment_metrics.py +62 -24
- beamlit/models/resource_environment_metrics_inference_per_second_per_region.py +6 -2
- beamlit/models/resource_metrics.py +10 -10
- beamlit/models/runtime.py +23 -23
- beamlit/models/runtime_readiness_probe.py +2 -2
- beamlit/models/runtime_resources.py +2 -2
- beamlit/models/serverless_config.py +2 -2
- beamlit/models/standard_fields_dynamo_db.py +2 -2
- beamlit/models/store_agent.py +6 -6
- beamlit/models/store_agent_configuration.py +2 -2
- beamlit/models/store_agent_labels.py +2 -2
- beamlit/models/store_configuration.py +16 -16
- beamlit/models/store_configuration_option.py +2 -2
- beamlit/models/store_function.py +12 -12
- beamlit/models/store_function_configuration.py +2 -2
- beamlit/models/store_function_kit.py +5 -5
- beamlit/models/store_function_labels.py +2 -2
- beamlit/models/store_function_parameter.py +9 -9
- beamlit/models/update_workspace_service_account_body.py +2 -2
- beamlit/models/update_workspace_service_account_response_200.py +2 -2
- beamlit/models/update_workspace_user_role_body.py +2 -2
- beamlit/models/workspace.py +3 -3
- beamlit/models/workspace_labels.py +2 -2
- beamlit/models/workspace_user.py +2 -2
- beamlit/run.py +6 -6
- beamlit/serve/app.py +73 -0
- beamlit/serve/middlewares/__init__.py +4 -0
- beamlit/serve/middlewares/accesslog.py +14 -0
- beamlit/serve/middlewares/processtime.py +12 -0
- {beamlit-0.0.20rc5.dist-info → beamlit-0.0.20rc7.dist-info}/METADATA +7 -1
- beamlit-0.0.20rc7.dist-info/RECORD +293 -0
- beamlit-0.0.20rc5.dist-info/RECORD +0 -282
- {beamlit-0.0.20rc5.dist-info → beamlit-0.0.20rc7.dist-info}/WHEEL +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import TYPE_CHECKING, Any,
|
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
|
@@ -33,16 +33,16 @@ class FunctionDeployment:
|
|
33
33
|
description (Union[Unset, str]): Function description, very important for the agent function to work with an LLM
|
34
34
|
enabled (Union[Unset, bool]): Whether the function deployment is enabled
|
35
35
|
environment (Union[Unset, str]): The name of the environment
|
36
|
-
flavors (Union[Unset,
|
36
|
+
flavors (Union[Unset, list['Flavor']]): Types of hardware available for deployments
|
37
37
|
function (Union[Unset, str]): The name of the function
|
38
|
-
integration_connections (Union[Unset,
|
39
|
-
kit (Union[Unset,
|
38
|
+
integration_connections (Union[Unset, list[str]]):
|
39
|
+
kit (Union[Unset, list['FunctionKit']]): The kit of the function deployment
|
40
40
|
labels (Union['LabelsType0', None, Unset]): Labels
|
41
|
-
parameters (Union[Unset,
|
41
|
+
parameters (Union[Unset, list['StoreFunctionParameter']]): Function parameters, for your function to be callable
|
42
42
|
with Agent
|
43
43
|
pod_template (Union[Unset, FunctionDeploymentPodTemplate]): The pod template, should be a valid Kubernetes pod
|
44
44
|
template
|
45
|
-
policies (Union[Unset,
|
45
|
+
policies (Union[Unset, list[str]]):
|
46
46
|
runtime (Union[Unset, Runtime]): Set of configurations for a deployment
|
47
47
|
serverless_config (Union[Unset, DeploymentServerlessConfig]): Configuration for a serverless deployment
|
48
48
|
store_id (Union[Unset, str]): Create from a store registered function
|
@@ -57,14 +57,14 @@ class FunctionDeployment:
|
|
57
57
|
description: Union[Unset, str] = UNSET
|
58
58
|
enabled: Union[Unset, bool] = UNSET
|
59
59
|
environment: Union[Unset, str] = UNSET
|
60
|
-
flavors: Union[Unset,
|
60
|
+
flavors: Union[Unset, list["Flavor"]] = UNSET
|
61
61
|
function: Union[Unset, str] = UNSET
|
62
|
-
integration_connections: Union[Unset,
|
63
|
-
kit: Union[Unset,
|
62
|
+
integration_connections: Union[Unset, list[str]] = UNSET
|
63
|
+
kit: Union[Unset, list["FunctionKit"]] = UNSET
|
64
64
|
labels: Union["LabelsType0", None, Unset] = UNSET
|
65
|
-
parameters: Union[Unset,
|
65
|
+
parameters: Union[Unset, list["StoreFunctionParameter"]] = UNSET
|
66
66
|
pod_template: Union[Unset, "FunctionDeploymentPodTemplate"] = UNSET
|
67
|
-
policies: Union[Unset,
|
67
|
+
policies: Union[Unset, list[str]] = UNSET
|
68
68
|
runtime: Union[Unset, "Runtime"] = UNSET
|
69
69
|
serverless_config: Union[Unset, "DeploymentServerlessConfig"] = UNSET
|
70
70
|
store_id: Union[Unset, str] = UNSET
|
@@ -82,7 +82,7 @@ class FunctionDeployment:
|
|
82
82
|
|
83
83
|
updated_by = self.updated_by
|
84
84
|
|
85
|
-
configuration: Union[Unset,
|
85
|
+
configuration: Union[Unset, dict[str, Any]] = UNSET
|
86
86
|
if not isinstance(self.configuration, Unset):
|
87
87
|
configuration = self.configuration.to_dict()
|
88
88
|
|
@@ -92,7 +92,7 @@ class FunctionDeployment:
|
|
92
92
|
|
93
93
|
environment = self.environment
|
94
94
|
|
95
|
-
flavors: Union[Unset,
|
95
|
+
flavors: Union[Unset, list[dict[str, Any]]] = UNSET
|
96
96
|
if not isinstance(self.flavors, Unset):
|
97
97
|
flavors = []
|
98
98
|
for componentsschemas_flavors_item_data in self.flavors:
|
@@ -101,18 +101,18 @@ class FunctionDeployment:
|
|
101
101
|
|
102
102
|
function = self.function
|
103
103
|
|
104
|
-
integration_connections: Union[Unset,
|
104
|
+
integration_connections: Union[Unset, list[str]] = UNSET
|
105
105
|
if not isinstance(self.integration_connections, Unset):
|
106
106
|
integration_connections = self.integration_connections
|
107
107
|
|
108
|
-
kit: Union[Unset,
|
108
|
+
kit: Union[Unset, list[dict[str, Any]]] = UNSET
|
109
109
|
if not isinstance(self.kit, Unset):
|
110
110
|
kit = []
|
111
111
|
for kit_item_data in self.kit:
|
112
112
|
kit_item = kit_item_data.to_dict()
|
113
113
|
kit.append(kit_item)
|
114
114
|
|
115
|
-
labels: Union[
|
115
|
+
labels: Union[None, Unset, dict[str, Any]]
|
116
116
|
if isinstance(self.labels, Unset):
|
117
117
|
labels = UNSET
|
118
118
|
elif isinstance(self.labels, LabelsType0):
|
@@ -120,26 +120,26 @@ class FunctionDeployment:
|
|
120
120
|
else:
|
121
121
|
labels = self.labels
|
122
122
|
|
123
|
-
parameters: Union[Unset,
|
123
|
+
parameters: Union[Unset, list[dict[str, Any]]] = UNSET
|
124
124
|
if not isinstance(self.parameters, Unset):
|
125
125
|
parameters = []
|
126
126
|
for parameters_item_data in self.parameters:
|
127
127
|
parameters_item = parameters_item_data.to_dict()
|
128
128
|
parameters.append(parameters_item)
|
129
129
|
|
130
|
-
pod_template: Union[Unset,
|
130
|
+
pod_template: Union[Unset, dict[str, Any]] = UNSET
|
131
131
|
if not isinstance(self.pod_template, Unset):
|
132
132
|
pod_template = self.pod_template.to_dict()
|
133
133
|
|
134
|
-
policies: Union[Unset,
|
134
|
+
policies: Union[Unset, list[str]] = UNSET
|
135
135
|
if not isinstance(self.policies, Unset):
|
136
136
|
policies = self.policies
|
137
137
|
|
138
|
-
runtime: Union[Unset,
|
138
|
+
runtime: Union[Unset, dict[str, Any]] = UNSET
|
139
139
|
if not isinstance(self.runtime, Unset):
|
140
140
|
runtime = self.runtime.to_dict()
|
141
141
|
|
142
|
-
serverless_config: Union[Unset,
|
142
|
+
serverless_config: Union[Unset, dict[str, Any]] = UNSET
|
143
143
|
if not isinstance(self.serverless_config, Unset):
|
144
144
|
serverless_config = self.serverless_config.to_dict()
|
145
145
|
|
@@ -194,7 +194,7 @@ class FunctionDeployment:
|
|
194
194
|
return field_dict
|
195
195
|
|
196
196
|
@classmethod
|
197
|
-
def from_dict(cls:
|
197
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
198
198
|
from ..models.deployment_serverless_config import DeploymentServerlessConfig
|
199
199
|
from ..models.flavor import Flavor
|
200
200
|
from ..models.function_deployment_configuration import FunctionDeploymentConfiguration
|
@@ -237,7 +237,7 @@ class FunctionDeployment:
|
|
237
237
|
|
238
238
|
function = d.pop("function", UNSET)
|
239
239
|
|
240
|
-
integration_connections = cast(
|
240
|
+
integration_connections = cast(list[str], d.pop("integration_connections", UNSET))
|
241
241
|
|
242
242
|
kit = []
|
243
243
|
_kit = d.pop("kit", UNSET)
|
@@ -277,7 +277,7 @@ class FunctionDeployment:
|
|
277
277
|
else:
|
278
278
|
pod_template = FunctionDeploymentPodTemplate.from_dict(_pod_template)
|
279
279
|
|
280
|
-
policies = cast(
|
280
|
+
policies = cast(list[str], d.pop("policies", UNSET))
|
281
281
|
|
282
282
|
_runtime = d.pop("runtime", UNSET)
|
283
283
|
runtime: Union[Unset, Runtime]
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import Any,
|
1
|
+
from typing import Any, TypeVar
|
2
2
|
|
3
3
|
from attrs import define as _attrs_define
|
4
4
|
from attrs import field as _attrs_field
|
@@ -19,7 +19,7 @@ class FunctionDeploymentConfiguration:
|
|
19
19
|
return field_dict
|
20
20
|
|
21
21
|
@classmethod
|
22
|
-
def from_dict(cls:
|
22
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
23
23
|
if not src_dict:
|
24
24
|
return None
|
25
25
|
d = src_dict.copy()
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import Any,
|
1
|
+
from typing import Any, TypeVar
|
2
2
|
|
3
3
|
from attrs import define as _attrs_define
|
4
4
|
from attrs import field as _attrs_field
|
@@ -19,7 +19,7 @@ class FunctionDeploymentPodTemplate:
|
|
19
19
|
return field_dict
|
20
20
|
|
21
21
|
@classmethod
|
22
|
-
def from_dict(cls:
|
22
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
23
23
|
if not src_dict:
|
24
24
|
return None
|
25
25
|
d = src_dict.copy()
|
beamlit/models/function_kit.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import TYPE_CHECKING, Any,
|
1
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
2
2
|
|
3
3
|
from attrs import define as _attrs_define
|
4
4
|
from attrs import field as _attrs_field
|
@@ -20,13 +20,13 @@ class FunctionKit:
|
|
20
20
|
description (Union[Unset, str]): Description of the function kit, very important for the agent to work with your
|
21
21
|
kit
|
22
22
|
name (Union[Unset, str]): The kit name, very important for the agent to work with your kit
|
23
|
-
parameters (Union[Unset,
|
23
|
+
parameters (Union[Unset, list['StoreFunctionParameter']]): Kit parameters, for your kit to be callable with an
|
24
24
|
Agent
|
25
25
|
"""
|
26
26
|
|
27
27
|
description: Union[Unset, str] = UNSET
|
28
28
|
name: Union[Unset, str] = UNSET
|
29
|
-
parameters: Union[Unset,
|
29
|
+
parameters: Union[Unset, list["StoreFunctionParameter"]] = UNSET
|
30
30
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
31
31
|
|
32
32
|
def to_dict(self) -> dict[str, Any]:
|
@@ -34,7 +34,7 @@ class FunctionKit:
|
|
34
34
|
|
35
35
|
name = self.name
|
36
36
|
|
37
|
-
parameters: Union[Unset,
|
37
|
+
parameters: Union[Unset, list[dict[str, Any]]] = UNSET
|
38
38
|
if not isinstance(self.parameters, Unset):
|
39
39
|
parameters = []
|
40
40
|
for parameters_item_data in self.parameters:
|
@@ -54,7 +54,7 @@ class FunctionKit:
|
|
54
54
|
return field_dict
|
55
55
|
|
56
56
|
@classmethod
|
57
|
-
def from_dict(cls:
|
57
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
58
58
|
from ..models.store_function_parameter import StoreFunctionParameter
|
59
59
|
|
60
60
|
if not src_dict:
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import Any,
|
1
|
+
from typing import Any, TypeVar, Union
|
2
2
|
|
3
3
|
from attrs import define as _attrs_define
|
4
4
|
from attrs import field as _attrs_field
|
@@ -37,7 +37,7 @@ class FunctionProviderRef:
|
|
37
37
|
return field_dict
|
38
38
|
|
39
39
|
@classmethod
|
40
|
-
def from_dict(cls:
|
40
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
41
41
|
if not src_dict:
|
42
42
|
return None
|
43
43
|
d = src_dict.copy()
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import Any,
|
1
|
+
from typing import Any, TypeVar, Union
|
2
2
|
|
3
3
|
from attrs import define as _attrs_define
|
4
4
|
from attrs import field as _attrs_field
|
@@ -37,7 +37,7 @@ class FunctionRelease:
|
|
37
37
|
return field_dict
|
38
38
|
|
39
39
|
@classmethod
|
40
|
-
def from_dict(cls:
|
40
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
41
41
|
if not src_dict:
|
42
42
|
return None
|
43
43
|
d = src_dict.copy()
|
beamlit/models/function_spec.py
CHANGED
@@ -64,7 +64,9 @@ class FunctionSpec:
|
|
64
64
|
if not isinstance(self.flavors, Unset):
|
65
65
|
flavors = []
|
66
66
|
for componentsschemas_flavors_item_data in self.flavors:
|
67
|
-
componentsschemas_flavors_item =
|
67
|
+
componentsschemas_flavors_item = (
|
68
|
+
componentsschemas_flavors_item_data.to_dict()
|
69
|
+
)
|
68
70
|
flavors.append(componentsschemas_flavors_item)
|
69
71
|
|
70
72
|
integration_connections: Union[Unset, List[str]] = UNSET
|
@@ -158,11 +160,15 @@ class FunctionSpec:
|
|
158
160
|
flavors = []
|
159
161
|
_flavors = d.pop("flavors", UNSET)
|
160
162
|
for componentsschemas_flavors_item_data in _flavors or []:
|
161
|
-
componentsschemas_flavors_item = Flavor.from_dict(
|
163
|
+
componentsschemas_flavors_item = Flavor.from_dict(
|
164
|
+
componentsschemas_flavors_item_data
|
165
|
+
)
|
162
166
|
|
163
167
|
flavors.append(componentsschemas_flavors_item)
|
164
168
|
|
165
|
-
integration_connections = cast(
|
169
|
+
integration_connections = cast(
|
170
|
+
List[str], d.pop("integrationConnections", UNSET)
|
171
|
+
)
|
166
172
|
|
167
173
|
_pod_template = d.pop("podTemplate", UNSET)
|
168
174
|
pod_template: Union[Unset, PodTemplateSpec]
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import TYPE_CHECKING, Any,
|
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
|
@@ -26,7 +26,7 @@ class FunctionWithDeployments:
|
|
26
26
|
labels (Union['LabelsType0', None, Unset]): Labels
|
27
27
|
name (Union[Unset, str]): Function name
|
28
28
|
workspace (Union[Unset, str]): Workspace name
|
29
|
-
deployments (Union[Unset,
|
29
|
+
deployments (Union[Unset, list['FunctionDeployment']]):
|
30
30
|
"""
|
31
31
|
|
32
32
|
created_at: Union[Unset, str] = UNSET
|
@@ -37,7 +37,7 @@ class FunctionWithDeployments:
|
|
37
37
|
labels: Union["LabelsType0", None, Unset] = UNSET
|
38
38
|
name: Union[Unset, str] = UNSET
|
39
39
|
workspace: Union[Unset, str] = UNSET
|
40
|
-
deployments: Union[Unset,
|
40
|
+
deployments: Union[Unset, list["FunctionDeployment"]] = UNSET
|
41
41
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
42
42
|
|
43
43
|
def to_dict(self) -> dict[str, Any]:
|
@@ -53,7 +53,7 @@ class FunctionWithDeployments:
|
|
53
53
|
|
54
54
|
display_name = self.display_name
|
55
55
|
|
56
|
-
labels: Union[
|
56
|
+
labels: Union[None, Unset, dict[str, Any]]
|
57
57
|
if isinstance(self.labels, Unset):
|
58
58
|
labels = UNSET
|
59
59
|
elif isinstance(self.labels, LabelsType0):
|
@@ -65,7 +65,7 @@ class FunctionWithDeployments:
|
|
65
65
|
|
66
66
|
workspace = self.workspace
|
67
67
|
|
68
|
-
deployments: Union[Unset,
|
68
|
+
deployments: Union[Unset, list[dict[str, Any]]] = UNSET
|
69
69
|
if not isinstance(self.deployments, Unset):
|
70
70
|
deployments = []
|
71
71
|
for componentsschemas_function_deployments_item_data in self.deployments:
|
@@ -97,7 +97,7 @@ class FunctionWithDeployments:
|
|
97
97
|
return field_dict
|
98
98
|
|
99
99
|
@classmethod
|
100
|
-
def from_dict(cls:
|
100
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
101
101
|
from ..models.function_deployment import FunctionDeployment
|
102
102
|
from ..models.labels_type_0 import LabelsType0
|
103
103
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import Any,
|
1
|
+
from typing import Any, TypeVar, Union
|
2
2
|
|
3
3
|
from attrs import define as _attrs_define
|
4
4
|
from attrs import field as _attrs_field
|
@@ -54,7 +54,7 @@ class GetWorkspaceServiceAccountsResponse200Item:
|
|
54
54
|
return field_dict
|
55
55
|
|
56
56
|
@classmethod
|
57
|
-
def from_dict(cls:
|
57
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
58
58
|
if not src_dict:
|
59
59
|
return None
|
60
60
|
d = src_dict.copy()
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import TYPE_CHECKING, Any,
|
1
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
2
2
|
|
3
3
|
from attrs import define as _attrs_define
|
4
4
|
from attrs import field as _attrs_field
|
@@ -18,13 +18,13 @@ class IncreaseAndRateMetric:
|
|
18
18
|
|
19
19
|
Attributes:
|
20
20
|
inference_global (Union[Unset, Any]): Historical requests for all resources globally
|
21
|
-
inference_per_second_global (Union[Unset,
|
21
|
+
inference_per_second_global (Union[Unset, list['Metric']]): Array of metrics
|
22
22
|
query (Union[Unset, Any]): Number of requests for all resources globally
|
23
23
|
query_per_second (Union[Unset, float]): RPS value (in last 24 hours) per location, for all resources globally
|
24
24
|
"""
|
25
25
|
|
26
26
|
inference_global: Union[Unset, Any] = UNSET
|
27
|
-
inference_per_second_global: Union[Unset,
|
27
|
+
inference_per_second_global: Union[Unset, list["Metric"]] = UNSET
|
28
28
|
query: Union[Unset, Any] = UNSET
|
29
29
|
query_per_second: Union[Unset, float] = UNSET
|
30
30
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
@@ -32,7 +32,7 @@ class IncreaseAndRateMetric:
|
|
32
32
|
def to_dict(self) -> dict[str, Any]:
|
33
33
|
inference_global = self.inference_global
|
34
34
|
|
35
|
-
inference_per_second_global: Union[Unset,
|
35
|
+
inference_per_second_global: Union[Unset, list[dict[str, Any]]] = UNSET
|
36
36
|
if not isinstance(self.inference_per_second_global, Unset):
|
37
37
|
inference_per_second_global = []
|
38
38
|
for componentsschemas_array_metric_item_data in self.inference_per_second_global:
|
@@ -58,7 +58,7 @@ class IncreaseAndRateMetric:
|
|
58
58
|
return field_dict
|
59
59
|
|
60
60
|
@classmethod
|
61
|
-
def from_dict(cls:
|
61
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
62
62
|
from ..models.metric import Metric
|
63
63
|
|
64
64
|
if not src_dict:
|
beamlit/models/integration.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import TYPE_CHECKING, Any,
|
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
|
@@ -28,7 +28,7 @@ class Integration:
|
|
28
28
|
labels (Union['LabelsType0', None, Unset]): Labels
|
29
29
|
name (Union[Unset, str]): Integration name
|
30
30
|
secret (Union[Unset, IntegrationSecret]): Integration secret
|
31
|
-
|
31
|
+
type_ (Union[Unset, str]): Integration type
|
32
32
|
workspace (Union[Unset, str]): Workspace name
|
33
33
|
"""
|
34
34
|
|
@@ -41,7 +41,7 @@ class Integration:
|
|
41
41
|
labels: Union["LabelsType0", None, Unset] = UNSET
|
42
42
|
name: Union[Unset, str] = UNSET
|
43
43
|
secret: Union[Unset, "IntegrationSecret"] = UNSET
|
44
|
-
|
44
|
+
type_: Union[Unset, str] = UNSET
|
45
45
|
workspace: Union[Unset, str] = UNSET
|
46
46
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
47
47
|
|
@@ -56,13 +56,13 @@ class Integration:
|
|
56
56
|
|
57
57
|
updated_by = self.updated_by
|
58
58
|
|
59
|
-
config: Union[Unset,
|
59
|
+
config: Union[Unset, dict[str, Any]] = UNSET
|
60
60
|
if not isinstance(self.config, Unset):
|
61
61
|
config = self.config.to_dict()
|
62
62
|
|
63
63
|
display_name = self.display_name
|
64
64
|
|
65
|
-
labels: Union[
|
65
|
+
labels: Union[None, Unset, dict[str, Any]]
|
66
66
|
if isinstance(self.labels, Unset):
|
67
67
|
labels = UNSET
|
68
68
|
elif isinstance(self.labels, LabelsType0):
|
@@ -72,11 +72,11 @@ class Integration:
|
|
72
72
|
|
73
73
|
name = self.name
|
74
74
|
|
75
|
-
secret: Union[Unset,
|
75
|
+
secret: Union[Unset, dict[str, Any]] = UNSET
|
76
76
|
if not isinstance(self.secret, Unset):
|
77
77
|
secret = self.secret.to_dict()
|
78
78
|
|
79
|
-
|
79
|
+
type_ = self.type_
|
80
80
|
|
81
81
|
workspace = self.workspace
|
82
82
|
|
@@ -101,15 +101,15 @@ class Integration:
|
|
101
101
|
field_dict["name"] = name
|
102
102
|
if secret is not UNSET:
|
103
103
|
field_dict["secret"] = secret
|
104
|
-
if
|
105
|
-
field_dict["type"] =
|
104
|
+
if type_ is not UNSET:
|
105
|
+
field_dict["type"] = type_
|
106
106
|
if workspace is not UNSET:
|
107
107
|
field_dict["workspace"] = workspace
|
108
108
|
|
109
109
|
return field_dict
|
110
110
|
|
111
111
|
@classmethod
|
112
|
-
def from_dict(cls:
|
112
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
113
113
|
from ..models.integration_config import IntegrationConfig
|
114
114
|
from ..models.integration_secret import IntegrationSecret
|
115
115
|
from ..models.labels_type_0 import LabelsType0
|
@@ -160,7 +160,7 @@ class Integration:
|
|
160
160
|
else:
|
161
161
|
secret = IntegrationSecret.from_dict(_secret)
|
162
162
|
|
163
|
-
|
163
|
+
type_ = d.pop("type", UNSET)
|
164
164
|
|
165
165
|
workspace = d.pop("workspace", UNSET)
|
166
166
|
|
@@ -174,7 +174,7 @@ class Integration:
|
|
174
174
|
labels=labels,
|
175
175
|
name=name,
|
176
176
|
secret=secret,
|
177
|
-
|
177
|
+
type_=type_,
|
178
178
|
workspace=workspace,
|
179
179
|
)
|
180
180
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import Any,
|
1
|
+
from typing import Any, TypeVar
|
2
2
|
|
3
3
|
from attrs import define as _attrs_define
|
4
4
|
from attrs import field as _attrs_field
|
@@ -19,7 +19,7 @@ class IntegrationConfig:
|
|
19
19
|
return field_dict
|
20
20
|
|
21
21
|
@classmethod
|
22
|
-
def from_dict(cls:
|
22
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
23
23
|
if not src_dict:
|
24
24
|
return None
|
25
25
|
d = src_dict.copy()
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import TYPE_CHECKING, Any,
|
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
|
@@ -56,7 +56,7 @@ class IntegrationConnection:
|
|
56
56
|
|
57
57
|
updated_by = self.updated_by
|
58
58
|
|
59
|
-
config: Union[Unset,
|
59
|
+
config: Union[Unset, dict[str, Any]] = UNSET
|
60
60
|
if not isinstance(self.config, Unset):
|
61
61
|
config = self.config.to_dict()
|
62
62
|
|
@@ -64,7 +64,7 @@ class IntegrationConnection:
|
|
64
64
|
|
65
65
|
integration = self.integration
|
66
66
|
|
67
|
-
labels: Union[
|
67
|
+
labels: Union[None, Unset, dict[str, Any]]
|
68
68
|
if isinstance(self.labels, Unset):
|
69
69
|
labels = UNSET
|
70
70
|
elif isinstance(self.labels, LabelsType0):
|
@@ -74,7 +74,7 @@ class IntegrationConnection:
|
|
74
74
|
|
75
75
|
name = self.name
|
76
76
|
|
77
|
-
secret: Union[Unset,
|
77
|
+
secret: Union[Unset, dict[str, Any]] = UNSET
|
78
78
|
if not isinstance(self.secret, Unset):
|
79
79
|
secret = self.secret.to_dict()
|
80
80
|
|
@@ -109,7 +109,7 @@ class IntegrationConnection:
|
|
109
109
|
return field_dict
|
110
110
|
|
111
111
|
@classmethod
|
112
|
-
def from_dict(cls:
|
112
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
113
113
|
from ..models.integration_connection_config import IntegrationConnectionConfig
|
114
114
|
from ..models.integration_connection_secret import IntegrationConnectionSecret
|
115
115
|
from ..models.labels_type_0 import LabelsType0
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import Any,
|
1
|
+
from typing import Any, TypeVar
|
2
2
|
|
3
3
|
from attrs import define as _attrs_define
|
4
4
|
from attrs import field as _attrs_field
|
@@ -19,7 +19,7 @@ class IntegrationConnectionConfig:
|
|
19
19
|
return field_dict
|
20
20
|
|
21
21
|
@classmethod
|
22
|
-
def from_dict(cls:
|
22
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
23
23
|
if not src_dict:
|
24
24
|
return None
|
25
25
|
d = src_dict.copy()
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import Any,
|
1
|
+
from typing import Any, TypeVar, Union
|
2
2
|
|
3
3
|
from attrs import define as _attrs_define
|
4
4
|
from attrs import field as _attrs_field
|
@@ -31,7 +31,7 @@ class IntegrationConnectionSecret:
|
|
31
31
|
return field_dict
|
32
32
|
|
33
33
|
@classmethod
|
34
|
-
def from_dict(cls:
|
34
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
35
35
|
if not src_dict:
|
36
36
|
return None
|
37
37
|
d = src_dict.copy()
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import Any,
|
1
|
+
from typing import Any, TypeVar, Union, cast
|
2
2
|
|
3
3
|
from attrs import define as _attrs_define
|
4
4
|
from attrs import field as _attrs_field
|
@@ -21,7 +21,7 @@ class IntegrationModel:
|
|
21
21
|
name (Union[Unset, str]): Provider model name
|
22
22
|
pipeline_tag (Union[Unset, str]): Provider model pipeline tag
|
23
23
|
private (Union[Unset, bool]): Provider model private
|
24
|
-
tags (Union[Unset,
|
24
|
+
tags (Union[Unset, list[str]]): Provider model tags
|
25
25
|
trending_score (Union[Unset, int]): Provider model trending score
|
26
26
|
"""
|
27
27
|
|
@@ -33,7 +33,7 @@ class IntegrationModel:
|
|
33
33
|
name: Union[Unset, str] = UNSET
|
34
34
|
pipeline_tag: Union[Unset, str] = UNSET
|
35
35
|
private: Union[Unset, bool] = UNSET
|
36
|
-
tags: Union[Unset,
|
36
|
+
tags: Union[Unset, list[str]] = UNSET
|
37
37
|
trending_score: Union[Unset, int] = UNSET
|
38
38
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
39
39
|
|
@@ -54,7 +54,7 @@ class IntegrationModel:
|
|
54
54
|
|
55
55
|
private = self.private
|
56
56
|
|
57
|
-
tags: Union[Unset,
|
57
|
+
tags: Union[Unset, list[str]] = UNSET
|
58
58
|
if not isinstance(self.tags, Unset):
|
59
59
|
tags = self.tags
|
60
60
|
|
@@ -87,7 +87,7 @@ class IntegrationModel:
|
|
87
87
|
return field_dict
|
88
88
|
|
89
89
|
@classmethod
|
90
|
-
def from_dict(cls:
|
90
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
91
91
|
if not src_dict:
|
92
92
|
return None
|
93
93
|
d = src_dict.copy()
|
@@ -107,7 +107,7 @@ class IntegrationModel:
|
|
107
107
|
|
108
108
|
private = d.pop("private", UNSET)
|
109
109
|
|
110
|
-
tags = cast(
|
110
|
+
tags = cast(list[str], d.pop("tags", UNSET))
|
111
111
|
|
112
112
|
trending_score = d.pop("trending_score", UNSET)
|
113
113
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import Any,
|
1
|
+
from typing import Any, TypeVar, Union
|
2
2
|
|
3
3
|
from attrs import define as _attrs_define
|
4
4
|
from attrs import field as _attrs_field
|
@@ -31,7 +31,7 @@ class IntegrationSecret:
|
|
31
31
|
return field_dict
|
32
32
|
|
33
33
|
@classmethod
|
34
|
-
def from_dict(cls:
|
34
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
35
35
|
if not src_dict:
|
36
36
|
return None
|
37
37
|
d = src_dict.copy()
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import Any,
|
1
|
+
from typing import Any, TypeVar, Union
|
2
2
|
|
3
3
|
from attrs import define as _attrs_define
|
4
4
|
from attrs import field as _attrs_field
|
@@ -30,7 +30,7 @@ class InviteWorkspaceUserBody:
|
|
30
30
|
return field_dict
|
31
31
|
|
32
32
|
@classmethod
|
33
|
-
def from_dict(cls:
|
33
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
34
34
|
if not src_dict:
|
35
35
|
return None
|
36
36
|
d = src_dict.copy()
|
beamlit/models/labels_type_0.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import Any,
|
1
|
+
from typing import Any, TypeVar
|
2
2
|
|
3
3
|
from attrs import define as _attrs_define
|
4
4
|
from attrs import field as _attrs_field
|
@@ -19,7 +19,7 @@ class LabelsType0:
|
|
19
19
|
return field_dict
|
20
20
|
|
21
21
|
@classmethod
|
22
|
-
def from_dict(cls:
|
22
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
23
23
|
if not src_dict:
|
24
24
|
return None
|
25
25
|
d = src_dict.copy()
|