beamlit 0.0.47rc93__py3-none-any.whl → 0.0.48__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. beamlit/agents/decorator.py +3 -3
  2. beamlit/api/{model_providers/delete_model_provider.py → accounts/delete_account.py} +42 -35
  3. beamlit/api/{model_providers/get_model_provider.py → accounts/get_account.py} +34 -34
  4. beamlit/api/{model_providers/list_model_providers.py → accounts/list_accounts.py} +21 -21
  5. beamlit/api/{model_providers/update_model_provider.py → accounts/update_account.py} +43 -43
  6. beamlit/api/agents/get_agent_metrics.py +12 -12
  7. beamlit/api/{model_providers/create_model_provider.py → default/create_account.py} +30 -30
  8. beamlit/api/functions/get_function_metrics.py +12 -12
  9. beamlit/api/models/get_model_metrics.py +12 -12
  10. beamlit/functions/common.py +0 -1
  11. beamlit/functions/mcp/mcp.py +3 -2
  12. beamlit/models/__init__.py +16 -30
  13. beamlit/models/{model_metadata.py → account.py} +93 -15
  14. beamlit/models/{agent_metadata.py → account_metadata.py} +16 -41
  15. beamlit/models/account_spec.py +123 -0
  16. beamlit/models/{agent_render.py → account_spec_address.py} +6 -6
  17. beamlit/models/agent.py +6 -2
  18. beamlit/models/agent_spec.py +30 -6
  19. beamlit/models/billing_address.py +133 -0
  20. beamlit/models/core_spec.py +27 -5
  21. beamlit/models/core_spec_configurations.py +3 -1
  22. beamlit/models/environment.py +6 -2
  23. beamlit/models/environment_metadata.py +3 -1
  24. beamlit/models/function.py +6 -2
  25. beamlit/models/function_spec.py +27 -5
  26. beamlit/models/integration_connection.py +6 -2
  27. beamlit/models/integration_connection_spec.py +18 -14
  28. beamlit/models/{function_render.py → integration_connection_spec_config.py} +6 -6
  29. beamlit/models/{core_status.py → integration_connection_spec_secret.py} +6 -6
  30. beamlit/models/latency_metric.py +24 -4
  31. beamlit/models/metadata.py +3 -1
  32. beamlit/models/metrics.py +13 -3
  33. beamlit/models/model.py +6 -2
  34. beamlit/models/model_spec.py +27 -5
  35. beamlit/models/pending_invitation_accept.py +3 -1
  36. beamlit/models/pending_invitation_render.py +13 -3
  37. beamlit/models/policy.py +6 -2
  38. beamlit/models/policy_max_tokens.py +106 -0
  39. beamlit/models/policy_spec.py +30 -0
  40. beamlit/models/request_duration_over_time_metrics.py +7 -1
  41. beamlit/models/request_total_by_origin_metric.py +14 -2
  42. beamlit/models/request_total_metric.py +10 -2
  43. beamlit/models/resource_environment_metrics.py +33 -7
  44. beamlit/models/resource_log.py +9 -0
  45. beamlit/models/runtime.py +10 -2
  46. beamlit/models/store_agent.py +3 -1
  47. beamlit/models/store_function.py +3 -1
  48. beamlit/models/token_rate_metrics.py +17 -3
  49. beamlit/models/trace_ids_response.py +3 -21
  50. beamlit/models/workspace.py +12 -1
  51. {beamlit-0.0.47rc93.dist-info → beamlit-0.0.48.dist-info}/METADATA +1 -1
  52. {beamlit-0.0.47rc93.dist-info → beamlit-0.0.48.dist-info}/RECORD +55 -70
  53. beamlit/models/function_metadata.py +0 -146
  54. beamlit/models/increase_and_rate_metric.py +0 -61
  55. beamlit/models/integration_config.py +0 -45
  56. beamlit/models/integration_connection_config.py +0 -45
  57. beamlit/models/integration_connection_secret.py +0 -61
  58. beamlit/models/model_provider.py +0 -173
  59. beamlit/models/model_render.py +0 -45
  60. beamlit/models/provider_config.py +0 -94
  61. beamlit/models/qps.py +0 -61
  62. beamlit/models/repository_type_0.py +0 -70
  63. beamlit/models/resource_deployment_metrics.py +0 -176
  64. beamlit/models/resource_deployment_metrics_inference_per_second_per_region.py +0 -77
  65. beamlit/models/resource_deployment_metrics_query_per_second_per_region_per_code.py +0 -75
  66. beamlit/models/resource_environment_metrics_inference_per_region.py +0 -77
  67. beamlit/models/resource_environment_metrics_inference_per_second_per_region.py +0 -77
  68. beamlit/models/resource_environment_metrics_query_per_region_per_code.py +0 -75
  69. beamlit/models/resource_environment_metrics_query_per_second_per_region_per_code.py +0 -75
  70. beamlit/models/resource_metrics.py +0 -96
  71. /beamlit/api/{model_providers → accounts}/__init__.py +0 -0
  72. {beamlit-0.0.47rc93.dist-info → beamlit-0.0.48.dist-info}/WHEEL +0 -0
  73. {beamlit-0.0.47rc93.dist-info → beamlit-0.0.48.dist-info}/licenses/LICENSE +0 -0
@@ -1,14 +1,18 @@
1
1
  """Contains all the data models used in inputs/outputs"""
2
2
 
3
+ from .account import Account
4
+ from .account_metadata import AccountMetadata
5
+ from .account_spec import AccountSpec
6
+ from .account_spec_address import AccountSpecAddress
3
7
  from .acl import ACL
4
8
  from .agent import Agent
5
9
  from .agent_chain import AgentChain
6
10
  from .agent_history import AgentHistory
7
11
  from .agent_history_event import AgentHistoryEvent
8
- from .agent_metadata import AgentMetadata
9
12
  from .agent_release import AgentRelease
10
13
  from .agent_spec import AgentSpec
11
14
  from .api_key import ApiKey
15
+ from .billing_address import BillingAddress
12
16
  from .configuration import Configuration
13
17
  from .continent import Continent
14
18
  from .core_event import CoreEvent
@@ -26,7 +30,6 @@ from .environment_spec import EnvironmentSpec
26
30
  from .flavor import Flavor
27
31
  from .function import Function
28
32
  from .function_kit import FunctionKit
29
- from .function_metadata import FunctionMetadata
30
33
  from .function_release import FunctionRelease
31
34
  from .function_spec import FunctionSpec
32
35
  from .get_trace_ids_response_200 import GetTraceIdsResponse200
@@ -37,12 +40,10 @@ from .get_workspace_service_accounts_response_200_item import (
37
40
  )
38
41
  from .histogram_bucket import HistogramBucket
39
42
  from .histogram_stats import HistogramStats
40
- from .increase_and_rate_metric import IncreaseAndRateMetric
41
- from .integration_config import IntegrationConfig
42
43
  from .integration_connection import IntegrationConnection
43
- from .integration_connection_config import IntegrationConnectionConfig
44
- from .integration_connection_secret import IntegrationConnectionSecret
45
44
  from .integration_connection_spec import IntegrationConnectionSpec
45
+ from .integration_connection_spec_config import IntegrationConnectionSpecConfig
46
+ from .integration_connection_spec_secret import IntegrationConnectionSpecSecret
46
47
  from .integration_model import IntegrationModel
47
48
  from .integration_repository import IntegrationRepository
48
49
  from .invite_workspace_user_body import InviteWorkspaceUserBody
@@ -57,7 +58,6 @@ from .metrics_models import MetricsModels
57
58
  from .metrics_request_total_per_code import MetricsRequestTotalPerCode
58
59
  from .metrics_rps_per_code import MetricsRpsPerCode
59
60
  from .model import Model
60
- from .model_metadata import ModelMetadata
61
61
  from .model_private_cluster import ModelPrivateCluster
62
62
  from .model_release import ModelRelease
63
63
  from .model_spec import ModelSpec
@@ -71,11 +71,10 @@ from .pending_invitation_workspace_details import PendingInvitationWorkspaceDeta
71
71
  from .pod_template_spec import PodTemplateSpec
72
72
  from .policy import Policy
73
73
  from .policy_location import PolicyLocation
74
+ from .policy_max_tokens import PolicyMaxTokens
74
75
  from .policy_spec import PolicySpec
75
76
  from .private_cluster import PrivateCluster
76
77
  from .private_location import PrivateLocation
77
- from .provider_config import ProviderConfig
78
- from .qps import QPS
79
78
  from .repository import Repository
80
79
  from .request_duration_over_time_metric import RequestDurationOverTimeMetric
81
80
  from .request_duration_over_time_metrics import RequestDurationOverTimeMetrics
@@ -89,20 +88,12 @@ from .request_total_by_origin_metric_request_total_by_origin_and_code import (
89
88
  from .request_total_metric import RequestTotalMetric
90
89
  from .request_total_metric_request_total_per_code import RequestTotalMetricRequestTotalPerCode
91
90
  from .request_total_metric_rps_per_code import RequestTotalMetricRpsPerCode
92
- from .resource_deployment_metrics import ResourceDeploymentMetrics
93
- from .resource_deployment_metrics_inference_per_second_per_region import (
94
- ResourceDeploymentMetricsInferencePerSecondPerRegion,
95
- )
96
- from .resource_deployment_metrics_query_per_second_per_region_per_code import (
97
- ResourceDeploymentMetricsQueryPerSecondPerRegionPerCode,
98
- )
99
91
  from .resource_environment_metrics import ResourceEnvironmentMetrics
100
92
  from .resource_environment_metrics_request_total_per_code import (
101
93
  ResourceEnvironmentMetricsRequestTotalPerCode,
102
94
  )
103
95
  from .resource_environment_metrics_rps_per_code import ResourceEnvironmentMetricsRpsPerCode
104
96
  from .resource_log import ResourceLog
105
- from .resource_metrics import ResourceMetrics
106
97
  from .runtime import Runtime
107
98
  from .runtime_readiness_probe import RuntimeReadinessProbe
108
99
  from .runtime_resources import RuntimeResources
@@ -130,15 +121,19 @@ from .workspace_labels import WorkspaceLabels
130
121
  from .workspace_user import WorkspaceUser
131
122
 
132
123
  __all__ = (
124
+ "Account",
125
+ "AccountMetadata",
126
+ "AccountSpec",
127
+ "AccountSpecAddress",
133
128
  "ACL",
134
129
  "Agent",
135
130
  "AgentChain",
136
131
  "AgentHistory",
137
132
  "AgentHistoryEvent",
138
- "AgentMetadata",
139
133
  "AgentRelease",
140
134
  "AgentSpec",
141
135
  "ApiKey",
136
+ "BillingAddress",
142
137
  "Configuration",
143
138
  "Continent",
144
139
  "CoreEvent",
@@ -156,7 +151,6 @@ __all__ = (
156
151
  "Flavor",
157
152
  "Function",
158
153
  "FunctionKit",
159
- "FunctionMetadata",
160
154
  "FunctionRelease",
161
155
  "FunctionSpec",
162
156
  "GetTraceIdsResponse200",
@@ -165,12 +159,10 @@ __all__ = (
165
159
  "GetWorkspaceServiceAccountsResponse200Item",
166
160
  "HistogramBucket",
167
161
  "HistogramStats",
168
- "IncreaseAndRateMetric",
169
- "IntegrationConfig",
170
162
  "IntegrationConnection",
171
- "IntegrationConnectionConfig",
172
- "IntegrationConnectionSecret",
173
163
  "IntegrationConnectionSpec",
164
+ "IntegrationConnectionSpecConfig",
165
+ "IntegrationConnectionSpecSecret",
174
166
  "IntegrationModel",
175
167
  "IntegrationRepository",
176
168
  "InviteWorkspaceUserBody",
@@ -185,7 +177,6 @@ __all__ = (
185
177
  "MetricsRequestTotalPerCode",
186
178
  "MetricsRpsPerCode",
187
179
  "Model",
188
- "ModelMetadata",
189
180
  "ModelPrivateCluster",
190
181
  "ModelRelease",
191
182
  "ModelSpec",
@@ -199,11 +190,10 @@ __all__ = (
199
190
  "PodTemplateSpec",
200
191
  "Policy",
201
192
  "PolicyLocation",
193
+ "PolicyMaxTokens",
202
194
  "PolicySpec",
203
195
  "PrivateCluster",
204
196
  "PrivateLocation",
205
- "ProviderConfig",
206
- "QPS",
207
197
  "Repository",
208
198
  "RequestDurationOverTimeMetric",
209
199
  "RequestDurationOverTimeMetrics",
@@ -213,14 +203,10 @@ __all__ = (
213
203
  "RequestTotalMetric",
214
204
  "RequestTotalMetricRequestTotalPerCode",
215
205
  "RequestTotalMetricRpsPerCode",
216
- "ResourceDeploymentMetrics",
217
- "ResourceDeploymentMetricsInferencePerSecondPerRegion",
218
- "ResourceDeploymentMetricsQueryPerSecondPerRegionPerCode",
219
206
  "ResourceEnvironmentMetrics",
220
207
  "ResourceEnvironmentMetricsRequestTotalPerCode",
221
208
  "ResourceEnvironmentMetricsRpsPerCode",
222
209
  "ResourceLog",
223
- "ResourceMetrics",
224
210
  "Runtime",
225
211
  "RuntimeReadinessProbe",
226
212
  "RuntimeResources",
@@ -1,4 +1,4 @@
1
- from typing import TYPE_CHECKING, Any, TypeVar, Union
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
@@ -6,15 +6,16 @@ from attrs import field as _attrs_field
6
6
  from ..types import UNSET, Unset
7
7
 
8
8
  if TYPE_CHECKING:
9
+ from ..models.account_spec_address import AccountSpecAddress
9
10
  from ..models.metadata_labels import MetadataLabels
10
11
 
11
12
 
12
- T = TypeVar("T", bound="ModelMetadata")
13
+ T = TypeVar("T", bound="Account")
13
14
 
14
15
 
15
16
  @_attrs_define
16
- class ModelMetadata:
17
- """Model metadata
17
+ class Account:
18
+ """Account
18
19
 
19
20
  Attributes:
20
21
  created_at (Union[Unset, str]): The date and time when the resource was created
@@ -25,7 +26,14 @@ class ModelMetadata:
25
26
  labels (Union[Unset, MetadataLabels]): Labels
26
27
  name (Union[Unset, str]): Model name
27
28
  workspace (Union[Unset, str]): Workspace name
28
- environment (Union[Unset, str]): Environment name
29
+ address (Union[Unset, AccountSpecAddress]): Billing address
30
+ admins (Union[Unset, list[Any]]): Admins
31
+ currency (Union[Unset, str]): Currency
32
+ owner (Union[Unset, str]): Owner
33
+ status (Union[Unset, str]): Status
34
+ tax_id (Union[Unset, str]): Tax ID
35
+ metadata (Union[Unset, Any]):
36
+ spec (Union[Unset, Any]):
29
37
  """
30
38
 
31
39
  created_at: Union[Unset, str] = UNSET
@@ -36,7 +44,14 @@ class ModelMetadata:
36
44
  labels: Union[Unset, "MetadataLabels"] = UNSET
37
45
  name: Union[Unset, str] = UNSET
38
46
  workspace: Union[Unset, str] = UNSET
39
- environment: Union[Unset, str] = UNSET
47
+ address: Union[Unset, "AccountSpecAddress"] = UNSET
48
+ admins: Union[Unset, list[Any]] = UNSET
49
+ currency: Union[Unset, str] = UNSET
50
+ owner: Union[Unset, str] = UNSET
51
+ status: Union[Unset, str] = UNSET
52
+ tax_id: Union[Unset, str] = UNSET
53
+ metadata: Union[Unset, Any] = UNSET
54
+ spec: Union[Unset, Any] = UNSET
40
55
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
41
56
 
42
57
  def to_dict(self) -> dict[str, Any]:
@@ -51,14 +66,36 @@ class ModelMetadata:
51
66
  display_name = self.display_name
52
67
 
53
68
  labels: Union[Unset, dict[str, Any]] = UNSET
54
- if self.labels and not isinstance(self.labels, Unset):
69
+ if self.labels and not isinstance(self.labels, Unset) and not isinstance(self.labels, dict):
55
70
  labels = self.labels.to_dict()
71
+ elif self.labels and isinstance(self.labels, dict):
72
+ labels = self.labels
56
73
 
57
74
  name = self.name
58
75
 
59
76
  workspace = self.workspace
60
77
 
61
- environment = self.environment
78
+ address: Union[Unset, dict[str, Any]] = UNSET
79
+ if self.address and not isinstance(self.address, Unset) and not isinstance(self.address, dict):
80
+ address = self.address.to_dict()
81
+ elif self.address and isinstance(self.address, dict):
82
+ address = self.address
83
+
84
+ admins: Union[Unset, list[Any]] = UNSET
85
+ if not isinstance(self.admins, Unset):
86
+ admins = self.admins
87
+
88
+ currency = self.currency
89
+
90
+ owner = self.owner
91
+
92
+ status = self.status
93
+
94
+ tax_id = self.tax_id
95
+
96
+ metadata = self.metadata
97
+
98
+ spec = self.spec
62
99
 
63
100
  field_dict: dict[str, Any] = {}
64
101
  field_dict.update(self.additional_properties)
@@ -79,13 +116,28 @@ class ModelMetadata:
79
116
  field_dict["name"] = name
80
117
  if workspace is not UNSET:
81
118
  field_dict["workspace"] = workspace
82
- if environment is not UNSET:
83
- field_dict["environment"] = environment
119
+ if address is not UNSET:
120
+ field_dict["address"] = address
121
+ if admins is not UNSET:
122
+ field_dict["admins"] = admins
123
+ if currency is not UNSET:
124
+ field_dict["currency"] = currency
125
+ if owner is not UNSET:
126
+ field_dict["owner"] = owner
127
+ if status is not UNSET:
128
+ field_dict["status"] = status
129
+ if tax_id is not UNSET:
130
+ field_dict["tax_id"] = tax_id
131
+ if metadata is not UNSET:
132
+ field_dict["metadata"] = metadata
133
+ if spec is not UNSET:
134
+ field_dict["spec"] = spec
84
135
 
85
136
  return field_dict
86
137
 
87
138
  @classmethod
88
139
  def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
140
+ from ..models.account_spec_address import AccountSpecAddress
89
141
  from ..models.metadata_labels import MetadataLabels
90
142
 
91
143
  if not src_dict:
@@ -112,9 +164,28 @@ class ModelMetadata:
112
164
 
113
165
  workspace = d.pop("workspace", UNSET)
114
166
 
115
- environment = d.pop("environment", UNSET)
167
+ _address = d.pop("address", UNSET)
168
+ address: Union[Unset, AccountSpecAddress]
169
+ if isinstance(_address, Unset):
170
+ address = UNSET
171
+ else:
172
+ address = AccountSpecAddress.from_dict(_address)
173
+
174
+ admins = cast(list[Any], d.pop("admins", UNSET))
175
+
176
+ currency = d.pop("currency", UNSET)
177
+
178
+ owner = d.pop("owner", UNSET)
179
+
180
+ status = d.pop("status", UNSET)
181
+
182
+ tax_id = d.pop("tax_id", UNSET)
183
+
184
+ metadata = d.pop("metadata", UNSET)
185
+
186
+ spec = d.pop("spec", UNSET)
116
187
 
117
- model_metadata = cls(
188
+ account = cls(
118
189
  created_at=created_at,
119
190
  updated_at=updated_at,
120
191
  created_by=created_by,
@@ -123,11 +194,18 @@ class ModelMetadata:
123
194
  labels=labels,
124
195
  name=name,
125
196
  workspace=workspace,
126
- environment=environment,
197
+ address=address,
198
+ admins=admins,
199
+ currency=currency,
200
+ owner=owner,
201
+ status=status,
202
+ tax_id=tax_id,
203
+ metadata=metadata,
204
+ spec=spec,
127
205
  )
128
206
 
129
- model_metadata.additional_properties = d
130
- return model_metadata
207
+ account.additional_properties = d
208
+ return account
131
209
 
132
210
  @property
133
211
  def additional_keys(self) -> list[str]:
@@ -9,34 +9,28 @@ if TYPE_CHECKING:
9
9
  from ..models.metadata_labels import MetadataLabels
10
10
 
11
11
 
12
- T = TypeVar("T", bound="AgentMetadata")
12
+ T = TypeVar("T", bound="AccountMetadata")
13
13
 
14
14
 
15
15
  @_attrs_define
16
- class AgentMetadata:
17
- """Agent metadata
16
+ class AccountMetadata:
17
+ """AccountMetadata
18
18
 
19
19
  Attributes:
20
20
  created_at (Union[Unset, str]): The date and time when the resource was created
21
21
  updated_at (Union[Unset, str]): The date and time when the resource was updated
22
22
  created_by (Union[Unset, str]): The user or service account who created the resource
23
23
  updated_by (Union[Unset, str]): The user or service account who updated the resource
24
- display_name (Union[Unset, str]): Model display name
24
+ id (Union[Unset, str]): Account id
25
25
  labels (Union[Unset, MetadataLabels]): Labels
26
- name (Union[Unset, str]): Model name
27
- workspace (Union[Unset, str]): Workspace name
28
- environment (Union[Unset, str]): Environment name
29
26
  """
30
27
 
31
28
  created_at: Union[Unset, str] = UNSET
32
29
  updated_at: Union[Unset, str] = UNSET
33
30
  created_by: Union[Unset, str] = UNSET
34
31
  updated_by: Union[Unset, str] = UNSET
35
- display_name: Union[Unset, str] = UNSET
32
+ id: Union[Unset, str] = UNSET
36
33
  labels: Union[Unset, "MetadataLabels"] = UNSET
37
- name: Union[Unset, str] = UNSET
38
- workspace: Union[Unset, str] = UNSET
39
- environment: Union[Unset, str] = UNSET
40
34
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
41
35
 
42
36
  def to_dict(self) -> dict[str, Any]:
@@ -48,17 +42,13 @@ class AgentMetadata:
48
42
 
49
43
  updated_by = self.updated_by
50
44
 
51
- display_name = self.display_name
45
+ id = self.id
52
46
 
53
47
  labels: Union[Unset, dict[str, Any]] = UNSET
54
- if self.labels and not isinstance(self.labels, Unset):
48
+ if self.labels and not isinstance(self.labels, Unset) and not isinstance(self.labels, dict):
55
49
  labels = self.labels.to_dict()
56
-
57
- name = self.name
58
-
59
- workspace = self.workspace
60
-
61
- environment = self.environment
50
+ elif self.labels and isinstance(self.labels, dict):
51
+ labels = self.labels
62
52
 
63
53
  field_dict: dict[str, Any] = {}
64
54
  field_dict.update(self.additional_properties)
@@ -71,16 +61,10 @@ class AgentMetadata:
71
61
  field_dict["createdBy"] = created_by
72
62
  if updated_by is not UNSET:
73
63
  field_dict["updatedBy"] = updated_by
74
- if display_name is not UNSET:
75
- field_dict["displayName"] = display_name
64
+ if id is not UNSET:
65
+ field_dict["id"] = id
76
66
  if labels is not UNSET:
77
67
  field_dict["labels"] = labels
78
- if name is not UNSET:
79
- field_dict["name"] = name
80
- if workspace is not UNSET:
81
- field_dict["workspace"] = workspace
82
- if environment is not UNSET:
83
- field_dict["environment"] = environment
84
68
 
85
69
  return field_dict
86
70
 
@@ -99,7 +83,7 @@ class AgentMetadata:
99
83
 
100
84
  updated_by = d.pop("updatedBy", UNSET)
101
85
 
102
- display_name = d.pop("displayName", UNSET)
86
+ id = d.pop("id", UNSET)
103
87
 
104
88
  _labels = d.pop("labels", UNSET)
105
89
  labels: Union[Unset, MetadataLabels]
@@ -108,26 +92,17 @@ class AgentMetadata:
108
92
  else:
109
93
  labels = MetadataLabels.from_dict(_labels)
110
94
 
111
- name = d.pop("name", UNSET)
112
-
113
- workspace = d.pop("workspace", UNSET)
114
-
115
- environment = d.pop("environment", UNSET)
116
-
117
- agent_metadata = cls(
95
+ account_metadata = cls(
118
96
  created_at=created_at,
119
97
  updated_at=updated_at,
120
98
  created_by=created_by,
121
99
  updated_by=updated_by,
122
- display_name=display_name,
100
+ id=id,
123
101
  labels=labels,
124
- name=name,
125
- workspace=workspace,
126
- environment=environment,
127
102
  )
128
103
 
129
- agent_metadata.additional_properties = d
130
- return agent_metadata
104
+ account_metadata.additional_properties = d
105
+ return account_metadata
131
106
 
132
107
  @property
133
108
  def additional_keys(self) -> list[str]:
@@ -0,0 +1,123 @@
1
+ from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
2
+
3
+ from attrs import define as _attrs_define
4
+ from attrs import field as _attrs_field
5
+
6
+ from ..types import UNSET, Unset
7
+
8
+ if TYPE_CHECKING:
9
+ from ..models.account_spec_address import AccountSpecAddress
10
+
11
+
12
+ T = TypeVar("T", bound="AccountSpec")
13
+
14
+
15
+ @_attrs_define
16
+ class AccountSpec:
17
+ """AccountSpec
18
+
19
+ Attributes:
20
+ address (Union[Unset, AccountSpecAddress]): Billing address
21
+ admins (Union[Unset, list[Any]]): Admins
22
+ currency (Union[Unset, str]): Currency
23
+ owner (Union[Unset, str]): Owner
24
+ status (Union[Unset, str]): Status
25
+ tax_id (Union[Unset, str]): Tax ID
26
+ """
27
+
28
+ address: Union[Unset, "AccountSpecAddress"] = UNSET
29
+ admins: Union[Unset, list[Any]] = UNSET
30
+ currency: Union[Unset, str] = UNSET
31
+ owner: Union[Unset, str] = UNSET
32
+ status: Union[Unset, str] = UNSET
33
+ tax_id: Union[Unset, str] = UNSET
34
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
35
+
36
+ def to_dict(self) -> dict[str, Any]:
37
+ address: Union[Unset, dict[str, Any]] = UNSET
38
+ if self.address and not isinstance(self.address, Unset) and not isinstance(self.address, dict):
39
+ address = self.address.to_dict()
40
+ elif self.address and isinstance(self.address, dict):
41
+ address = self.address
42
+
43
+ admins: Union[Unset, list[Any]] = UNSET
44
+ if not isinstance(self.admins, Unset):
45
+ admins = self.admins
46
+
47
+ currency = self.currency
48
+
49
+ owner = self.owner
50
+
51
+ status = self.status
52
+
53
+ tax_id = self.tax_id
54
+
55
+ field_dict: dict[str, Any] = {}
56
+ field_dict.update(self.additional_properties)
57
+ field_dict.update({})
58
+ if address is not UNSET:
59
+ field_dict["address"] = address
60
+ if admins is not UNSET:
61
+ field_dict["admins"] = admins
62
+ if currency is not UNSET:
63
+ field_dict["currency"] = currency
64
+ if owner is not UNSET:
65
+ field_dict["owner"] = owner
66
+ if status is not UNSET:
67
+ field_dict["status"] = status
68
+ if tax_id is not UNSET:
69
+ field_dict["tax_id"] = tax_id
70
+
71
+ return field_dict
72
+
73
+ @classmethod
74
+ def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
75
+ from ..models.account_spec_address import AccountSpecAddress
76
+
77
+ if not src_dict:
78
+ return None
79
+ d = src_dict.copy()
80
+ _address = d.pop("address", UNSET)
81
+ address: Union[Unset, AccountSpecAddress]
82
+ if isinstance(_address, Unset):
83
+ address = UNSET
84
+ else:
85
+ address = AccountSpecAddress.from_dict(_address)
86
+
87
+ admins = cast(list[Any], d.pop("admins", UNSET))
88
+
89
+ currency = d.pop("currency", UNSET)
90
+
91
+ owner = d.pop("owner", UNSET)
92
+
93
+ status = d.pop("status", UNSET)
94
+
95
+ tax_id = d.pop("tax_id", UNSET)
96
+
97
+ account_spec = cls(
98
+ address=address,
99
+ admins=admins,
100
+ currency=currency,
101
+ owner=owner,
102
+ status=status,
103
+ tax_id=tax_id,
104
+ )
105
+
106
+ account_spec.additional_properties = d
107
+ return account_spec
108
+
109
+ @property
110
+ def additional_keys(self) -> list[str]:
111
+ return list(self.additional_properties.keys())
112
+
113
+ def __getitem__(self, key: str) -> Any:
114
+ return self.additional_properties[key]
115
+
116
+ def __setitem__(self, key: str, value: Any) -> None:
117
+ self.additional_properties[key] = value
118
+
119
+ def __delitem__(self, key: str) -> None:
120
+ del self.additional_properties[key]
121
+
122
+ def __contains__(self, key: str) -> bool:
123
+ return key in self.additional_properties
@@ -3,12 +3,12 @@ from typing import Any, TypeVar
3
3
  from attrs import define as _attrs_define
4
4
  from attrs import field as _attrs_field
5
5
 
6
- T = TypeVar("T", bound="AgentRender")
6
+ T = TypeVar("T", bound="AccountSpecAddress")
7
7
 
8
8
 
9
9
  @_attrs_define
10
- class AgentRender:
11
- """AgentRender"""
10
+ class AccountSpecAddress:
11
+ """Billing address"""
12
12
 
13
13
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
14
14
 
@@ -23,10 +23,10 @@ class AgentRender:
23
23
  if not src_dict:
24
24
  return None
25
25
  d = src_dict.copy()
26
- agent_render = cls()
26
+ account_spec_address = cls()
27
27
 
28
- agent_render.additional_properties = d
29
- return agent_render
28
+ account_spec_address.additional_properties = d
29
+ return account_spec_address
30
30
 
31
31
  @property
32
32
  def additional_keys(self) -> list[str]:
beamlit/models/agent.py CHANGED
@@ -40,12 +40,16 @@ class Agent:
40
40
  events.append(componentsschemas_core_events_item)
41
41
 
42
42
  metadata: Union[Unset, dict[str, Any]] = UNSET
43
- if self.metadata and not isinstance(self.metadata, Unset):
43
+ if self.metadata and not isinstance(self.metadata, Unset) and not isinstance(self.metadata, dict):
44
44
  metadata = self.metadata.to_dict()
45
+ elif self.metadata and isinstance(self.metadata, dict):
46
+ metadata = self.metadata
45
47
 
46
48
  spec: Union[Unset, dict[str, Any]] = UNSET
47
- if self.spec and not isinstance(self.spec, Unset):
49
+ if self.spec and not isinstance(self.spec, Unset) and not isinstance(self.spec, dict):
48
50
  spec = self.spec.to_dict()
51
+ elif self.spec and isinstance(self.spec, dict):
52
+ spec = self.spec
49
53
 
50
54
  status = self.status
51
55