beamlit 0.0.20rc3__py3-none-any.whl → 0.0.20rc4__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/common/generate.py +8 -3
- 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.20rc4.dist-info}/METADATA +1 -1
- {beamlit-0.0.20rc3.dist-info → beamlit-0.0.20rc4.dist-info}/RECORD +142 -95
- {beamlit-0.0.20rc3.dist-info → beamlit-0.0.20rc4.dist-info}/WHEEL +0 -0
beamlit/models/__init__.py
CHANGED
@@ -5,10 +5,10 @@ from .agent import Agent
|
|
5
5
|
from .agent_chain import AgentChain
|
6
6
|
from .agent_configuration import AgentConfiguration
|
7
7
|
from .agent_deployment import AgentDeployment
|
8
|
-
from .
|
8
|
+
from .agent_deployment_configuration import AgentDeploymentConfiguration
|
9
9
|
from .agent_deployment_history import AgentDeploymentHistory
|
10
10
|
from .agent_deployment_history_event import AgentDeploymentHistoryEvent
|
11
|
-
from .
|
11
|
+
from .agent_deployment_pod_template import AgentDeploymentPodTemplate
|
12
12
|
from .agent_release import AgentRelease
|
13
13
|
from .agent_with_deployments import AgentWithDeployments
|
14
14
|
from .api_key import ApiKey
|
@@ -23,15 +23,15 @@ from .create_workspace_service_account_response_200 import CreateWorkspaceServic
|
|
23
23
|
from .delete_workspace_service_account_response_200 import DeleteWorkspaceServiceAccountResponse200
|
24
24
|
from .deployment_configuration import DeploymentConfiguration
|
25
25
|
from .deployment_configurations import DeploymentConfigurations
|
26
|
-
from .
|
26
|
+
from .deployment_serverless_config import DeploymentServerlessConfig
|
27
27
|
from .environment import Environment
|
28
28
|
from .environment_metrics import EnvironmentMetrics
|
29
29
|
from .flavor import Flavor
|
30
30
|
from .function import Function
|
31
31
|
from .function_configuration import FunctionConfiguration
|
32
32
|
from .function_deployment import FunctionDeployment
|
33
|
-
from .
|
34
|
-
from .
|
33
|
+
from .function_deployment_configuration import FunctionDeploymentConfiguration
|
34
|
+
from .function_deployment_pod_template import FunctionDeploymentPodTemplate
|
35
35
|
from .function_kit import FunctionKit
|
36
36
|
from .function_provider_ref import FunctionProviderRef
|
37
37
|
from .function_release import FunctionRelease
|
@@ -59,7 +59,7 @@ from .model_deployment_metrics_inference_per_second_per_region import ModelDeplo
|
|
59
59
|
from .model_deployment_metrics_query_per_second_per_region_per_code import (
|
60
60
|
ModelDeploymentMetricsQueryPerSecondPerRegionPerCode,
|
61
61
|
)
|
62
|
-
from .
|
62
|
+
from .model_deployment_pod_template import ModelDeploymentPodTemplate
|
63
63
|
from .model_metrics import ModelMetrics
|
64
64
|
from .model_provider import ModelProvider
|
65
65
|
from .model_provider_ref import ModelProviderRef
|
@@ -77,31 +77,29 @@ from .provider_config import ProviderConfig
|
|
77
77
|
from .qps import QPS
|
78
78
|
from .resource_deployment_log import ResourceDeploymentLog
|
79
79
|
from .resource_deployment_metrics import ResourceDeploymentMetrics
|
80
|
-
from .
|
81
|
-
from .
|
82
|
-
|
80
|
+
from .resource_deployment_metrics_inference_per_region import ResourceDeploymentMetricsInferencePerRegion
|
81
|
+
from .resource_deployment_metrics_inference_per_second_per_region import (
|
82
|
+
ResourceDeploymentMetricsInferencePerSecondPerRegion,
|
83
83
|
)
|
84
|
-
from .
|
85
|
-
|
86
|
-
|
87
|
-
from .resource_deployment_metrics_query_per_second_per_region_per_code_type_0 import (
|
88
|
-
ResourceDeploymentMetricsQueryPerSecondPerRegionPerCodeType0,
|
84
|
+
from .resource_deployment_metrics_query_per_region_per_code import ResourceDeploymentMetricsQueryPerRegionPerCode
|
85
|
+
from .resource_deployment_metrics_query_per_second_per_region_per_code import (
|
86
|
+
ResourceDeploymentMetricsQueryPerSecondPerRegionPerCode,
|
89
87
|
)
|
90
88
|
from .resource_metrics import ResourceMetrics
|
91
89
|
from .runtime import Runtime
|
92
|
-
from .
|
90
|
+
from .runtime_readiness_probe import RuntimeReadinessProbe
|
93
91
|
from .runtime_resources import RuntimeResources
|
94
92
|
from .serverless_config import ServerlessConfig
|
95
93
|
from .standard_fields_dynamo_db import StandardFieldsDynamoDb
|
96
94
|
from .store_agent import StoreAgent
|
97
95
|
from .store_agent_configuration import StoreAgentConfiguration
|
98
|
-
from .
|
96
|
+
from .store_agent_labels import StoreAgentLabels
|
99
97
|
from .store_configuration import StoreConfiguration
|
100
98
|
from .store_configuration_option import StoreConfigurationOption
|
101
99
|
from .store_function import StoreFunction
|
102
100
|
from .store_function_configuration import StoreFunctionConfiguration
|
103
101
|
from .store_function_kit import StoreFunctionKit
|
104
|
-
from .
|
102
|
+
from .store_function_labels import StoreFunctionLabels
|
105
103
|
from .store_function_parameter import StoreFunctionParameter
|
106
104
|
from .update_workspace_service_account_body import UpdateWorkspaceServiceAccountBody
|
107
105
|
from .update_workspace_service_account_response_200 import UpdateWorkspaceServiceAccountResponse200
|
@@ -116,10 +114,10 @@ __all__ = (
|
|
116
114
|
"AgentChain",
|
117
115
|
"AgentConfiguration",
|
118
116
|
"AgentDeployment",
|
119
|
-
"
|
117
|
+
"AgentDeploymentConfiguration",
|
120
118
|
"AgentDeploymentHistory",
|
121
119
|
"AgentDeploymentHistoryEvent",
|
122
|
-
"
|
120
|
+
"AgentDeploymentPodTemplate",
|
123
121
|
"AgentRelease",
|
124
122
|
"AgentWithDeployments",
|
125
123
|
"ApiKey",
|
@@ -134,15 +132,15 @@ __all__ = (
|
|
134
132
|
"DeleteWorkspaceServiceAccountResponse200",
|
135
133
|
"DeploymentConfiguration",
|
136
134
|
"DeploymentConfigurations",
|
137
|
-
"
|
135
|
+
"DeploymentServerlessConfig",
|
138
136
|
"Environment",
|
139
137
|
"EnvironmentMetrics",
|
140
138
|
"Flavor",
|
141
139
|
"Function",
|
142
140
|
"FunctionConfiguration",
|
143
141
|
"FunctionDeployment",
|
144
|
-
"
|
145
|
-
"
|
142
|
+
"FunctionDeploymentConfiguration",
|
143
|
+
"FunctionDeploymentPodTemplate",
|
146
144
|
"FunctionKit",
|
147
145
|
"FunctionProviderRef",
|
148
146
|
"FunctionRelease",
|
@@ -168,7 +166,7 @@ __all__ = (
|
|
168
166
|
"ModelDeploymentMetrics",
|
169
167
|
"ModelDeploymentMetricsInferencePerSecondPerRegion",
|
170
168
|
"ModelDeploymentMetricsQueryPerSecondPerRegionPerCode",
|
171
|
-
"
|
169
|
+
"ModelDeploymentPodTemplate",
|
172
170
|
"ModelMetrics",
|
173
171
|
"ModelProvider",
|
174
172
|
"ModelProviderRef",
|
@@ -186,25 +184,25 @@ __all__ = (
|
|
186
184
|
"QPS",
|
187
185
|
"ResourceDeploymentLog",
|
188
186
|
"ResourceDeploymentMetrics",
|
189
|
-
"
|
190
|
-
"
|
191
|
-
"
|
192
|
-
"
|
187
|
+
"ResourceDeploymentMetricsInferencePerRegion",
|
188
|
+
"ResourceDeploymentMetricsInferencePerSecondPerRegion",
|
189
|
+
"ResourceDeploymentMetricsQueryPerRegionPerCode",
|
190
|
+
"ResourceDeploymentMetricsQueryPerSecondPerRegionPerCode",
|
193
191
|
"ResourceMetrics",
|
194
192
|
"Runtime",
|
195
|
-
"
|
193
|
+
"RuntimeReadinessProbe",
|
196
194
|
"RuntimeResources",
|
197
195
|
"ServerlessConfig",
|
198
196
|
"StandardFieldsDynamoDb",
|
199
197
|
"StoreAgent",
|
200
198
|
"StoreAgentConfiguration",
|
201
|
-
"
|
199
|
+
"StoreAgentLabels",
|
202
200
|
"StoreConfiguration",
|
203
201
|
"StoreConfigurationOption",
|
204
202
|
"StoreFunction",
|
205
203
|
"StoreFunctionConfiguration",
|
206
204
|
"StoreFunctionKit",
|
207
|
-
"
|
205
|
+
"StoreFunctionLabels",
|
208
206
|
"StoreFunctionParameter",
|
209
207
|
"UpdateWorkspaceServiceAccountBody",
|
210
208
|
"UpdateWorkspaceServiceAccountResponse200",
|
beamlit/models/acl.py
CHANGED
beamlit/models/agent.py
CHANGED
beamlit/models/agent_chain.py
CHANGED
@@ -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 import AgentDeploymentConfiguration
|
11
|
+
from ..models.agent_deployment_pod_template import AgentDeploymentPodTemplate
|
12
|
+
from ..models.deployment_serverless_config import DeploymentServerlessConfig
|
13
13
|
from ..models.flavor import Flavor
|
14
14
|
from ..models.labels_type_0 import LabelsType0
|
15
15
|
from ..models.runtime import Runtime
|
@@ -29,11 +29,11 @@ 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
|
-
|
32
|
+
configuration (Union[Unset, AgentDeploymentConfiguration]): Agent configuration, this is a key value storage. In
|
33
|
+
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[
|
36
|
+
enabled (Union[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
|
@@ -41,12 +41,11 @@ class AgentDeployment:
|
|
41
41
|
integration_connections (Union[Unset, List[str]]):
|
42
42
|
labels (Union['LabelsType0', None, Unset]): Labels
|
43
43
|
model (Union[Unset, str]): Model beamlit to use for agent, it should be compatible with function calling
|
44
|
-
pod_template (Union[
|
45
|
-
|
44
|
+
pod_template (Union[Unset, AgentDeploymentPodTemplate]): The pod template, should be a valid Kubernetes pod
|
45
|
+
template
|
46
46
|
policies (Union[Unset, List[str]]):
|
47
47
|
runtime (Union[Unset, Runtime]): Set of configurations for a deployment
|
48
|
-
serverless_config (Union[
|
49
|
-
deployment
|
48
|
+
serverless_config (Union[Unset, DeploymentServerlessConfig]): Configuration for a serverless deployment
|
50
49
|
store_id (Union[Unset, str]): Create from a store registered function
|
51
50
|
workspace (Union[Unset, str]): The workspace the agent deployment belongs to
|
52
51
|
"""
|
@@ -57,27 +56,24 @@ class AgentDeployment:
|
|
57
56
|
updated_by: Union[Unset, str] = UNSET
|
58
57
|
agent: Union[Unset, str] = UNSET
|
59
58
|
agent_chain: Union[Unset, List["AgentChain"]] = UNSET
|
60
|
-
configuration: Union["
|
59
|
+
configuration: Union[Unset, "AgentDeploymentConfiguration"] = UNSET
|
61
60
|
description: Union[Unset, str] = UNSET
|
62
|
-
enabled: Union[
|
61
|
+
enabled: Union[Unset, bool] = UNSET
|
63
62
|
environment: Union[Unset, str] = UNSET
|
64
63
|
flavors: Union[Unset, List["Flavor"]] = UNSET
|
65
64
|
functions: Union[Unset, List[str]] = UNSET
|
66
65
|
integration_connections: Union[Unset, List[str]] = UNSET
|
67
66
|
labels: Union["LabelsType0", None, Unset] = UNSET
|
68
67
|
model: Union[Unset, str] = UNSET
|
69
|
-
pod_template: Union["
|
68
|
+
pod_template: Union[Unset, "AgentDeploymentPodTemplate"] = UNSET
|
70
69
|
policies: Union[Unset, List[str]] = UNSET
|
71
70
|
runtime: Union[Unset, "Runtime"] = UNSET
|
72
|
-
serverless_config: Union["
|
71
|
+
serverless_config: Union[Unset, "DeploymentServerlessConfig"] = UNSET
|
73
72
|
store_id: Union[Unset, str] = UNSET
|
74
73
|
workspace: Union[Unset, str] = UNSET
|
75
74
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
76
75
|
|
77
76
|
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
|
81
77
|
from ..models.labels_type_0 import LabelsType0
|
82
78
|
|
83
79
|
created_at = self.created_at
|
@@ -97,21 +93,13 @@ class AgentDeployment:
|
|
97
93
|
agent_chain_item = agent_chain_item_data.to_dict()
|
98
94
|
agent_chain.append(agent_chain_item)
|
99
95
|
|
100
|
-
configuration: Union[Dict[str, Any]
|
101
|
-
if isinstance(self.configuration, Unset):
|
102
|
-
configuration = UNSET
|
103
|
-
elif isinstance(self.configuration, AgentDeploymentConfigurationType0):
|
96
|
+
configuration: Union[Unset, Dict[str, Any]] = UNSET
|
97
|
+
if not isinstance(self.configuration, Unset):
|
104
98
|
configuration = self.configuration.to_dict()
|
105
|
-
else:
|
106
|
-
configuration = self.configuration
|
107
99
|
|
108
100
|
description = self.description
|
109
101
|
|
110
|
-
enabled
|
111
|
-
if isinstance(self.enabled, Unset):
|
112
|
-
enabled = UNSET
|
113
|
-
else:
|
114
|
-
enabled = self.enabled
|
102
|
+
enabled = self.enabled
|
115
103
|
|
116
104
|
environment = self.environment
|
117
105
|
|
@@ -140,13 +128,9 @@ class AgentDeployment:
|
|
140
128
|
|
141
129
|
model = self.model
|
142
130
|
|
143
|
-
pod_template: Union[Dict[str, Any]
|
144
|
-
if isinstance(self.pod_template, Unset):
|
145
|
-
pod_template = UNSET
|
146
|
-
elif isinstance(self.pod_template, AgentDeploymentPodTemplateType0):
|
131
|
+
pod_template: Union[Unset, Dict[str, Any]] = UNSET
|
132
|
+
if not isinstance(self.pod_template, Unset):
|
147
133
|
pod_template = self.pod_template.to_dict()
|
148
|
-
else:
|
149
|
-
pod_template = self.pod_template
|
150
134
|
|
151
135
|
policies: Union[Unset, List[str]] = UNSET
|
152
136
|
if not isinstance(self.policies, Unset):
|
@@ -156,13 +140,9 @@ class AgentDeployment:
|
|
156
140
|
if not isinstance(self.runtime, Unset):
|
157
141
|
runtime = self.runtime.to_dict()
|
158
142
|
|
159
|
-
serverless_config: Union[Dict[str, Any]
|
160
|
-
if isinstance(self.serverless_config, Unset):
|
161
|
-
serverless_config = UNSET
|
162
|
-
elif isinstance(self.serverless_config, DeploymentServerlessConfigType0):
|
143
|
+
serverless_config: Union[Unset, Dict[str, Any]] = UNSET
|
144
|
+
if not isinstance(self.serverless_config, Unset):
|
163
145
|
serverless_config = self.serverless_config.to_dict()
|
164
|
-
else:
|
165
|
-
serverless_config = self.serverless_config
|
166
146
|
|
167
147
|
store_id = self.store_id
|
168
148
|
|
@@ -219,13 +199,15 @@ class AgentDeployment:
|
|
219
199
|
@classmethod
|
220
200
|
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
221
201
|
from ..models.agent_chain import AgentChain
|
222
|
-
from ..models.
|
223
|
-
from ..models.
|
224
|
-
from ..models.
|
202
|
+
from ..models.agent_deployment_configuration import AgentDeploymentConfiguration
|
203
|
+
from ..models.agent_deployment_pod_template import AgentDeploymentPodTemplate
|
204
|
+
from ..models.deployment_serverless_config import DeploymentServerlessConfig
|
225
205
|
from ..models.flavor import Flavor
|
226
206
|
from ..models.labels_type_0 import LabelsType0
|
227
207
|
from ..models.runtime import Runtime
|
228
208
|
|
209
|
+
if not src_dict:
|
210
|
+
return None
|
229
211
|
d = src_dict.copy()
|
230
212
|
created_at = d.pop("created_at", UNSET)
|
231
213
|
|
@@ -244,33 +226,16 @@ class AgentDeployment:
|
|
244
226
|
|
245
227
|
agent_chain.append(agent_chain_item)
|
246
228
|
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
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))
|
229
|
+
_configuration = d.pop("configuration", UNSET)
|
230
|
+
configuration: Union[Unset, AgentDeploymentConfiguration]
|
231
|
+
if isinstance(_configuration, Unset):
|
232
|
+
configuration = UNSET
|
233
|
+
else:
|
234
|
+
configuration = AgentDeploymentConfiguration.from_dict(_configuration)
|
263
235
|
|
264
236
|
description = d.pop("description", UNSET)
|
265
237
|
|
266
|
-
|
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))
|
238
|
+
enabled = d.pop("enabled", UNSET)
|
274
239
|
|
275
240
|
environment = d.pop("environment", UNSET)
|
276
241
|
|
@@ -304,22 +269,12 @@ class AgentDeployment:
|
|
304
269
|
|
305
270
|
model = d.pop("model", UNSET)
|
306
271
|
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
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))
|
272
|
+
_pod_template = d.pop("pod_template", UNSET)
|
273
|
+
pod_template: Union[Unset, AgentDeploymentPodTemplate]
|
274
|
+
if isinstance(_pod_template, Unset):
|
275
|
+
pod_template = UNSET
|
276
|
+
else:
|
277
|
+
pod_template = AgentDeploymentPodTemplate.from_dict(_pod_template)
|
323
278
|
|
324
279
|
policies = cast(List[str], d.pop("policies", UNSET))
|
325
280
|
|
@@ -330,22 +285,12 @@ class AgentDeployment:
|
|
330
285
|
else:
|
331
286
|
runtime = Runtime.from_dict(_runtime)
|
332
287
|
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
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))
|
288
|
+
_serverless_config = d.pop("serverless_config", UNSET)
|
289
|
+
serverless_config: Union[Unset, DeploymentServerlessConfig]
|
290
|
+
if isinstance(_serverless_config, Unset):
|
291
|
+
serverless_config = UNSET
|
292
|
+
else:
|
293
|
+
serverless_config = DeploymentServerlessConfig.from_dict(_serverless_config)
|
349
294
|
|
350
295
|
store_id = d.pop("store_id", UNSET)
|
351
296
|
|
@@ -0,0 +1,45 @@
|
|
1
|
+
from typing import Any, Type, TypeVar
|
2
|
+
|
3
|
+
from attrs import define as _attrs_define
|
4
|
+
from attrs import field as _attrs_field
|
5
|
+
|
6
|
+
T = TypeVar("T", bound="AgentDeploymentConfiguration")
|
7
|
+
|
8
|
+
|
9
|
+
@_attrs_define
|
10
|
+
class AgentDeploymentConfiguration:
|
11
|
+
"""Agent configuration, this is a key value storage. In your agent you can retrieve the value with config[key]"""
|
12
|
+
|
13
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
14
|
+
|
15
|
+
def to_dict(self) -> dict[str, Any]:
|
16
|
+
field_dict: dict[str, Any] = {}
|
17
|
+
field_dict.update(self.additional_properties)
|
18
|
+
|
19
|
+
return field_dict
|
20
|
+
|
21
|
+
@classmethod
|
22
|
+
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
23
|
+
if not src_dict:
|
24
|
+
return None
|
25
|
+
d = src_dict.copy()
|
26
|
+
agent_deployment_configuration = cls()
|
27
|
+
|
28
|
+
agent_deployment_configuration.additional_properties = d
|
29
|
+
return agent_deployment_configuration
|
30
|
+
|
31
|
+
@property
|
32
|
+
def additional_keys(self) -> list[str]:
|
33
|
+
return list(self.additional_properties.keys())
|
34
|
+
|
35
|
+
def __getitem__(self, key: str) -> Any:
|
36
|
+
return self.additional_properties[key]
|
37
|
+
|
38
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
39
|
+
self.additional_properties[key] = value
|
40
|
+
|
41
|
+
def __delitem__(self, key: str) -> None:
|
42
|
+
del self.additional_properties[key]
|
43
|
+
|
44
|
+
def __contains__(self, key: str) -> bool:
|
45
|
+
return key in self.additional_properties
|
@@ -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
|
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[
|
25
|
+
end (Union[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[
|
29
|
+
start (Union[Unset, str]): Start time
|
30
30
|
status (Union[Unset, str]): Status, eg: running, success, failed
|
31
|
-
took (Union[
|
31
|
+
took (Union[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[
|
40
|
+
end: Union[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[
|
44
|
+
start: Union[Unset, str] = UNSET
|
45
45
|
status: Union[Unset, str] = UNSET
|
46
|
-
took: Union[
|
46
|
+
took: Union[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,11 +58,7 @@ class AgentDeploymentHistory:
|
|
58
58
|
|
59
59
|
agent = self.agent
|
60
60
|
|
61
|
-
end
|
62
|
-
if isinstance(self.end, Unset):
|
63
|
-
end = UNSET
|
64
|
-
else:
|
65
|
-
end = self.end
|
61
|
+
end = self.end
|
66
62
|
|
67
63
|
environment = self.environment
|
68
64
|
|
@@ -75,19 +71,11 @@ class AgentDeploymentHistory:
|
|
75
71
|
|
76
72
|
request_id = self.request_id
|
77
73
|
|
78
|
-
start
|
79
|
-
if isinstance(self.start, Unset):
|
80
|
-
start = UNSET
|
81
|
-
else:
|
82
|
-
start = self.start
|
74
|
+
start = self.start
|
83
75
|
|
84
76
|
status = self.status
|
85
77
|
|
86
|
-
took
|
87
|
-
if isinstance(self.took, Unset):
|
88
|
-
took = UNSET
|
89
|
-
else:
|
90
|
-
took = self.took
|
78
|
+
took = self.took
|
91
79
|
|
92
80
|
workspace = self.workspace
|
93
81
|
|
@@ -127,6 +115,8 @@ class AgentDeploymentHistory:
|
|
127
115
|
def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
|
128
116
|
from ..models.agent_deployment_history_event import AgentDeploymentHistoryEvent
|
129
117
|
|
118
|
+
if not src_dict:
|
119
|
+
return None
|
130
120
|
d = src_dict.copy()
|
131
121
|
created_at = d.pop("created_at", UNSET)
|
132
122
|
|
@@ -138,14 +128,7 @@ class AgentDeploymentHistory:
|
|
138
128
|
|
139
129
|
agent = d.pop("agent", UNSET)
|
140
130
|
|
141
|
-
|
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))
|
131
|
+
end = d.pop("end", UNSET)
|
149
132
|
|
150
133
|
environment = d.pop("environment", UNSET)
|
151
134
|
|
@@ -158,25 +141,11 @@ class AgentDeploymentHistory:
|
|
158
141
|
|
159
142
|
request_id = d.pop("request_id", UNSET)
|
160
143
|
|
161
|
-
|
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))
|
144
|
+
start = d.pop("start", UNSET)
|
169
145
|
|
170
146
|
status = d.pop("status", UNSET)
|
171
147
|
|
172
|
-
|
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))
|
148
|
+
took = d.pop("took", UNSET)
|
180
149
|
|
181
150
|
workspace = d.pop("workspace", UNSET)
|
182
151
|
|