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.
Files changed (142) hide show
  1. beamlit/api/agents/delete_agent_history.py +155 -0
  2. beamlit/api/agents/get_agent_deployment.py +1 -22
  3. beamlit/api/agents/get_agent_environment_logs.py +151 -0
  4. beamlit/api/agents/get_agent_history.py +155 -0
  5. beamlit/api/agents/list_agent_history.py +151 -0
  6. beamlit/api/agents/put_agent_history.py +181 -0
  7. beamlit/api/functions/get_function_environment_logs.py +151 -0
  8. beamlit/api/models/get_model_environment_logs.py +155 -0
  9. beamlit/common/generate.py +8 -3
  10. beamlit/common/settings.py +1 -5
  11. beamlit/models/__init__.py +28 -30
  12. beamlit/models/acl.py +2 -0
  13. beamlit/models/agent.py +2 -0
  14. beamlit/models/agent_chain.py +2 -0
  15. beamlit/models/agent_configuration.py +2 -0
  16. beamlit/models/agent_deployment.py +44 -99
  17. beamlit/models/agent_deployment_configuration.py +45 -0
  18. beamlit/models/agent_deployment_history.py +15 -46
  19. beamlit/models/agent_deployment_history_event.py +24 -78
  20. beamlit/models/agent_deployment_pod_template.py +45 -0
  21. beamlit/models/agent_history.py +165 -0
  22. beamlit/models/agent_history_event.py +131 -0
  23. beamlit/models/agent_metadata.py +144 -0
  24. beamlit/models/agent_release.py +2 -0
  25. beamlit/models/agent_spec.py +238 -0
  26. beamlit/models/agent_with_deployments.py +2 -0
  27. beamlit/models/api_key.py +2 -0
  28. beamlit/models/authentication_provider_model.py +2 -0
  29. beamlit/models/authentication_provider_organization.py +2 -0
  30. beamlit/models/configuration.py +2 -0
  31. beamlit/models/continent.py +2 -0
  32. beamlit/models/core_spec.py +179 -0
  33. beamlit/models/country.py +2 -0
  34. beamlit/models/create_api_key_for_service_account_body.py +2 -0
  35. beamlit/models/create_workspace_service_account_body.py +2 -0
  36. beamlit/models/create_workspace_service_account_response_200.py +2 -0
  37. beamlit/models/delete_workspace_service_account_response_200.py +2 -0
  38. beamlit/models/deployment_configuration.py +2 -0
  39. beamlit/models/deployment_configurations.py +2 -0
  40. beamlit/models/deployment_serverless_config.py +131 -0
  41. beamlit/models/environment.py +2 -0
  42. beamlit/models/environment_metrics.py +2 -0
  43. beamlit/models/environment_spec.py +61 -0
  44. beamlit/models/flavor.py +2 -0
  45. beamlit/models/function.py +2 -0
  46. beamlit/models/function_configuration.py +2 -0
  47. beamlit/models/function_deployment.py +44 -99
  48. beamlit/models/function_deployment_configuration.py +45 -0
  49. beamlit/models/function_deployment_pod_template.py +45 -0
  50. beamlit/models/function_kit.py +2 -0
  51. beamlit/models/function_metadata.py +144 -0
  52. beamlit/models/function_provider_ref.py +2 -0
  53. beamlit/models/function_release.py +2 -0
  54. beamlit/models/function_spec.py +240 -0
  55. beamlit/models/function_with_deployments.py +2 -0
  56. beamlit/models/get_workspace_service_accounts_response_200_item.py +2 -0
  57. beamlit/models/increase_and_rate_metric.py +2 -0
  58. beamlit/models/integration.py +2 -0
  59. beamlit/models/integration_config.py +2 -0
  60. beamlit/models/integration_connection.py +2 -0
  61. beamlit/models/integration_connection_config.py +2 -0
  62. beamlit/models/integration_connection_secret.py +2 -0
  63. beamlit/models/integration_connection_spec.py +99 -0
  64. beamlit/models/integration_model.py +2 -0
  65. beamlit/models/integration_secret.py +2 -0
  66. beamlit/models/invite_workspace_user_body.py +2 -0
  67. beamlit/models/labels_type_0.py +2 -0
  68. beamlit/models/location.py +2 -0
  69. beamlit/models/location_response.py +2 -0
  70. beamlit/models/metadata.py +135 -0
  71. beamlit/models/metadata_labels.py +43 -0
  72. beamlit/models/metric.py +2 -0
  73. beamlit/models/metrics.py +2 -0
  74. beamlit/models/model.py +2 -0
  75. beamlit/models/model_deployment.py +66 -85
  76. beamlit/models/model_deployment_log.py +2 -0
  77. beamlit/models/model_deployment_metrics.py +2 -0
  78. beamlit/models/model_deployment_metrics_inference_per_second_per_region.py +2 -0
  79. beamlit/models/model_deployment_metrics_query_per_second_per_region_per_code.py +2 -0
  80. beamlit/models/model_deployment_pod_template.py +45 -0
  81. beamlit/models/model_metadata.py +144 -0
  82. beamlit/models/model_metrics.py +2 -0
  83. beamlit/models/model_provider.py +2 -0
  84. beamlit/models/model_provider_ref.py +2 -0
  85. beamlit/models/model_release.py +2 -0
  86. beamlit/models/model_spec.py +188 -0
  87. beamlit/models/model_with_deployments.py +2 -0
  88. beamlit/models/owner_fields.py +68 -0
  89. beamlit/models/pending_invitation.py +2 -0
  90. beamlit/models/pending_invitation_accept.py +2 -0
  91. beamlit/models/pending_invitation_render.py +2 -0
  92. beamlit/models/pending_invitation_render_invited_by.py +2 -0
  93. beamlit/models/pending_invitation_render_workspace.py +2 -0
  94. beamlit/models/pending_invitation_workspace_details.py +2 -0
  95. beamlit/models/pod_template_spec.py +43 -0
  96. beamlit/models/policy.py +36 -8
  97. beamlit/models/policy_location.py +2 -0
  98. beamlit/models/policy_spec.py +119 -0
  99. beamlit/models/provider_config.py +2 -0
  100. beamlit/models/qps.py +2 -0
  101. beamlit/models/resource_deployment_log.py +2 -0
  102. beamlit/models/resource_deployment_metrics.py +70 -155
  103. beamlit/models/resource_deployment_metrics_inference_per_region.py +77 -0
  104. beamlit/models/resource_deployment_metrics_inference_per_second_per_region.py +77 -0
  105. beamlit/models/resource_deployment_metrics_query_per_region_per_code.py +75 -0
  106. beamlit/models/resource_deployment_metrics_query_per_second_per_region_per_code.py +75 -0
  107. beamlit/models/resource_environment_metrics.py +172 -0
  108. beamlit/models/resource_environment_metrics_inference_per_second_per_region.py +75 -0
  109. beamlit/models/resource_environment_metrics_query_per_second_per_region_per_code.py +73 -0
  110. beamlit/models/resource_log.py +68 -0
  111. beamlit/models/resource_metrics.py +2 -0
  112. beamlit/models/runtime.py +14 -29
  113. beamlit/models/runtime_readiness_probe.py +45 -0
  114. beamlit/models/runtime_resources.py +2 -0
  115. beamlit/models/runtime_type_0.py +111 -0
  116. beamlit/models/runtime_type_0_readiness_probe.py +43 -0
  117. beamlit/models/runtime_type_0_readiness_probe_type_0.py +43 -0
  118. beamlit/models/runtime_type_0_resources.py +59 -0
  119. beamlit/models/serverless_config.py +2 -0
  120. beamlit/models/spec_configuration.py +68 -0
  121. beamlit/models/standard_fields_dynamo_db.py +2 -0
  122. beamlit/models/store_agent.py +15 -29
  123. beamlit/models/store_agent_configuration.py +2 -0
  124. beamlit/models/store_agent_labels.py +45 -0
  125. beamlit/models/store_configuration.py +6 -15
  126. beamlit/models/store_configuration_option.py +7 -18
  127. beamlit/models/store_function.py +15 -29
  128. beamlit/models/store_function_configuration.py +2 -0
  129. beamlit/models/store_function_kit.py +2 -0
  130. beamlit/models/store_function_labels.py +45 -0
  131. beamlit/models/store_function_parameter.py +2 -0
  132. beamlit/models/time_fields.py +68 -0
  133. beamlit/models/update_workspace_service_account_body.py +2 -0
  134. beamlit/models/update_workspace_service_account_response_200.py +2 -0
  135. beamlit/models/update_workspace_user_role_body.py +2 -0
  136. beamlit/models/websocket_channel.py +86 -0
  137. beamlit/models/workspace.py +2 -0
  138. beamlit/models/workspace_labels.py +2 -0
  139. beamlit/models/workspace_user.py +2 -0
  140. {beamlit-0.0.20rc3.dist-info → beamlit-0.0.20rc4.dist-info}/METADATA +1 -1
  141. {beamlit-0.0.20rc3.dist-info → beamlit-0.0.20rc4.dist-info}/RECORD +142 -95
  142. {beamlit-0.0.20rc3.dist-info → beamlit-0.0.20rc4.dist-info}/WHEEL +0 -0
@@ -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 .agent_deployment_configuration_type_0 import AgentDeploymentConfigurationType0
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 .agent_deployment_pod_template_type_0 import AgentDeploymentPodTemplateType0
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 .deployment_serverless_config_type_0 import DeploymentServerlessConfigType0
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 .function_deployment_configuration_type_0 import FunctionDeploymentConfigurationType0
34
- from .function_deployment_pod_template_type_0 import FunctionDeploymentPodTemplateType0
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 .model_deployment_pod_template_type_0 import ModelDeploymentPodTemplateType0
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 .resource_deployment_metrics_inference_per_region_type_0 import ResourceDeploymentMetricsInferencePerRegionType0
81
- from .resource_deployment_metrics_inference_per_second_per_region_type_0 import (
82
- ResourceDeploymentMetricsInferencePerSecondPerRegionType0,
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 .resource_deployment_metrics_query_per_region_per_code_type_0 import (
85
- ResourceDeploymentMetricsQueryPerRegionPerCodeType0,
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 .runtime_readiness_probe_type_0 import RuntimeReadinessProbeType0
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 .store_agent_labels_type_0 import StoreAgentLabelsType0
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 .store_function_labels_type_0 import StoreFunctionLabelsType0
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
- "AgentDeploymentConfigurationType0",
117
+ "AgentDeploymentConfiguration",
120
118
  "AgentDeploymentHistory",
121
119
  "AgentDeploymentHistoryEvent",
122
- "AgentDeploymentPodTemplateType0",
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
- "DeploymentServerlessConfigType0",
135
+ "DeploymentServerlessConfig",
138
136
  "Environment",
139
137
  "EnvironmentMetrics",
140
138
  "Flavor",
141
139
  "Function",
142
140
  "FunctionConfiguration",
143
141
  "FunctionDeployment",
144
- "FunctionDeploymentConfigurationType0",
145
- "FunctionDeploymentPodTemplateType0",
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
- "ModelDeploymentPodTemplateType0",
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
- "ResourceDeploymentMetricsInferencePerRegionType0",
190
- "ResourceDeploymentMetricsInferencePerSecondPerRegionType0",
191
- "ResourceDeploymentMetricsQueryPerRegionPerCodeType0",
192
- "ResourceDeploymentMetricsQueryPerSecondPerRegionPerCodeType0",
187
+ "ResourceDeploymentMetricsInferencePerRegion",
188
+ "ResourceDeploymentMetricsInferencePerSecondPerRegion",
189
+ "ResourceDeploymentMetricsQueryPerRegionPerCode",
190
+ "ResourceDeploymentMetricsQueryPerSecondPerRegionPerCode",
193
191
  "ResourceMetrics",
194
192
  "Runtime",
195
- "RuntimeReadinessProbeType0",
193
+ "RuntimeReadinessProbe",
196
194
  "RuntimeResources",
197
195
  "ServerlessConfig",
198
196
  "StandardFieldsDynamoDb",
199
197
  "StoreAgent",
200
198
  "StoreAgentConfiguration",
201
- "StoreAgentLabelsType0",
199
+ "StoreAgentLabels",
202
200
  "StoreConfiguration",
203
201
  "StoreConfigurationOption",
204
202
  "StoreFunction",
205
203
  "StoreFunctionConfiguration",
206
204
  "StoreFunctionKit",
207
- "StoreFunctionLabelsType0",
205
+ "StoreFunctionLabels",
208
206
  "StoreFunctionParameter",
209
207
  "UpdateWorkspaceServiceAccountBody",
210
208
  "UpdateWorkspaceServiceAccountResponse200",
beamlit/models/acl.py CHANGED
@@ -92,6 +92,8 @@ class ACL:
92
92
 
93
93
  @classmethod
94
94
  def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
95
+ if not src_dict:
96
+ return None
95
97
  d = src_dict.copy()
96
98
  created_at = d.pop("created_at", UNSET)
97
99
 
beamlit/models/agent.py CHANGED
@@ -88,6 +88,8 @@ class Agent:
88
88
  def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
89
89
  from ..models.labels_type_0 import LabelsType0
90
90
 
91
+ if not src_dict:
92
+ return None
91
93
  d = src_dict.copy()
92
94
  created_at = d.pop("created_at", UNSET)
93
95
 
@@ -44,6 +44,8 @@ class AgentChain:
44
44
 
45
45
  @classmethod
46
46
  def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
47
+ if not src_dict:
48
+ return None
47
49
  d = src_dict.copy()
48
50
  description = d.pop("description", UNSET)
49
51
 
@@ -38,6 +38,8 @@ class AgentConfiguration:
38
38
 
39
39
  @classmethod
40
40
  def from_dict(cls: Type[T], src_dict: dict[str, Any]) -> T:
41
+ if not src_dict:
42
+ return None
41
43
  d = src_dict.copy()
42
44
  secret = d.pop("secret", UNSET)
43
45
 
@@ -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.agent_deployment_configuration_type_0 import AgentDeploymentConfigurationType0
11
- from ..models.agent_deployment_pod_template_type_0 import AgentDeploymentPodTemplateType0
12
- from ..models.deployment_serverless_config_type_0 import DeploymentServerlessConfigType0
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['AgentDeploymentConfigurationType0', None, Unset]): Agent configuration, this is a key
33
- value storage. In your agent you can retrieve the value with config[key]
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[None, Unset, bool]): Whether the agent deployment is enabled
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['AgentDeploymentPodTemplateType0', None, Unset]): The pod template, should be a valid
45
- Kubernetes pod template
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['DeploymentServerlessConfigType0', None, Unset]): Configuration for a serverless
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["AgentDeploymentConfigurationType0", None, Unset] = UNSET
59
+ configuration: Union[Unset, "AgentDeploymentConfiguration"] = UNSET
61
60
  description: Union[Unset, str] = UNSET
62
- enabled: Union[None, Unset, bool] = UNSET
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["AgentDeploymentPodTemplateType0", None, Unset] = UNSET
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["DeploymentServerlessConfigType0", None, Unset] = UNSET
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], None, Unset]
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: Union[None, Unset, bool]
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], None, Unset]
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], None, Unset]
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.agent_deployment_configuration_type_0 import AgentDeploymentConfigurationType0
223
- from ..models.agent_deployment_pod_template_type_0 import AgentDeploymentPodTemplateType0
224
- from ..models.deployment_serverless_config_type_0 import DeploymentServerlessConfigType0
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
- def _parse_configuration(data: object) -> Union["AgentDeploymentConfigurationType0", None, Unset]:
248
- if data is None:
249
- return data
250
- if isinstance(data, Unset):
251
- return data
252
- try:
253
- if not isinstance(data, dict):
254
- raise TypeError()
255
- configuration_type_0 = AgentDeploymentConfigurationType0.from_dict(data)
256
-
257
- return configuration_type_0
258
- except: # noqa: E722
259
- pass
260
- return cast(Union["AgentDeploymentConfigurationType0", None, Unset], data)
261
-
262
- configuration = _parse_configuration(d.pop("configuration", UNSET))
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
- def _parse_enabled(data: object) -> Union[None, Unset, bool]:
267
- if data is None:
268
- return data
269
- if isinstance(data, Unset):
270
- return data
271
- return cast(Union[None, Unset, bool], data)
272
-
273
- enabled = _parse_enabled(d.pop("enabled", UNSET))
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
- def _parse_pod_template(data: object) -> Union["AgentDeploymentPodTemplateType0", None, Unset]:
308
- if data is None:
309
- return data
310
- if isinstance(data, Unset):
311
- return data
312
- try:
313
- if not isinstance(data, dict):
314
- raise TypeError()
315
- pod_template_type_0 = AgentDeploymentPodTemplateType0.from_dict(data)
316
-
317
- return pod_template_type_0
318
- except: # noqa: E722
319
- pass
320
- return cast(Union["AgentDeploymentPodTemplateType0", None, Unset], data)
321
-
322
- pod_template = _parse_pod_template(d.pop("pod_template", UNSET))
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
- def _parse_serverless_config(data: object) -> Union["DeploymentServerlessConfigType0", None, Unset]:
334
- if data is None:
335
- return data
336
- if isinstance(data, Unset):
337
- return data
338
- try:
339
- if not isinstance(data, dict):
340
- raise TypeError()
341
- componentsschemas_deployment_serverless_config_type_0 = DeploymentServerlessConfigType0.from_dict(data)
342
-
343
- return componentsschemas_deployment_serverless_config_type_0
344
- except: # noqa: E722
345
- pass
346
- return cast(Union["DeploymentServerlessConfigType0", None, Unset], data)
347
-
348
- serverless_config = _parse_serverless_config(d.pop("serverless_config", UNSET))
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, cast
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[None, Unset, str]): End time
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[None, Unset, str]): Start time
29
+ start (Union[Unset, str]): Start time
30
30
  status (Union[Unset, str]): Status, eg: running, success, failed
31
- took (Union[None, Unset, int]): Number of milliseconds it took to complete the event
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[None, Unset, str] = UNSET
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[None, Unset, str] = UNSET
44
+ start: Union[Unset, str] = UNSET
45
45
  status: Union[Unset, str] = UNSET
46
- took: Union[None, Unset, int] = UNSET
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: Union[None, Unset, str]
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: Union[None, Unset, str]
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: Union[None, Unset, int]
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
- def _parse_end(data: object) -> Union[None, Unset, str]:
142
- if data is None:
143
- return data
144
- if isinstance(data, Unset):
145
- return data
146
- return cast(Union[None, Unset, str], data)
147
-
148
- end = _parse_end(d.pop("end", UNSET))
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
- def _parse_start(data: object) -> Union[None, Unset, str]:
162
- if data is None:
163
- return data
164
- if isinstance(data, Unset):
165
- return data
166
- return cast(Union[None, Unset, str], data)
167
-
168
- start = _parse_start(d.pop("start", UNSET))
144
+ start = d.pop("start", UNSET)
169
145
 
170
146
  status = d.pop("status", UNSET)
171
147
 
172
- def _parse_took(data: object) -> Union[None, Unset, int]:
173
- if data is None:
174
- return data
175
- if isinstance(data, Unset):
176
- return data
177
- return cast(Union[None, Unset, int], data)
178
-
179
- took = _parse_took(d.pop("took", UNSET))
148
+ took = d.pop("took", UNSET)
180
149
 
181
150
  workspace = d.pop("workspace", UNSET)
182
151