beamlit 0.0.24rc19__py3-none-any.whl → 0.0.24rc21__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) hide show
  1. beamlit/agents/chat.py +37 -11
  2. beamlit/agents/decorator.py +97 -65
  3. beamlit/api/agents/create_agent.py +9 -14
  4. beamlit/api/agents/delete_agent.py +22 -1
  5. beamlit/api/agents/delete_agent_history.py +2 -6
  6. beamlit/api/agents/get_agent.py +22 -1
  7. beamlit/api/agents/get_agent_environment_logs.py +11 -11
  8. beamlit/api/agents/get_agent_history.py +2 -6
  9. beamlit/api/agents/get_agent_metrics.py +22 -1
  10. beamlit/api/agents/list_agent_history.py +11 -11
  11. beamlit/api/agents/list_agents.py +36 -4
  12. beamlit/api/agents/put_agent_history.py +2 -6
  13. beamlit/api/agents/update_agent.py +9 -14
  14. beamlit/api/functions/create_function.py +9 -14
  15. beamlit/api/functions/delete_function.py +22 -1
  16. beamlit/api/functions/get_function.py +22 -1
  17. beamlit/api/functions/get_function_environment_logs.py +11 -11
  18. beamlit/api/functions/get_function_metrics.py +22 -1
  19. beamlit/api/functions/list_functions.py +36 -4
  20. beamlit/api/functions/update_function.py +9 -14
  21. beamlit/api/history/get_agents_history.py +12 -12
  22. beamlit/api/history/list_agents_history.py +12 -12
  23. beamlit/api/integrations/get_integration_connection.py +16 -12
  24. beamlit/api/integrations/get_integration_connection_model.py +8 -1
  25. beamlit/api/integrations/get_integration_model.py +8 -1
  26. beamlit/api/locations/list_locations.py +12 -12
  27. beamlit/api/models/create_model.py +13 -14
  28. beamlit/api/models/delete_model.py +22 -1
  29. beamlit/api/models/get_model.py +22 -1
  30. beamlit/api/models/get_model_environment_logs.py +11 -11
  31. beamlit/api/models/get_model_metrics.py +38 -13
  32. beamlit/api/models/list_models.py +36 -4
  33. beamlit/api/models/update_model.py +13 -14
  34. beamlit/api/privateclusters/__init__.py +0 -0
  35. beamlit/api/{agents/get_agent_deployment_metrics.py → privateclusters/create_private_cluster.py} +28 -55
  36. beamlit/api/{functions/list_function_deployments.py → privateclusters/delete_private_cluster.py} +38 -37
  37. beamlit/api/{agents/get_agent_deployment.py → privateclusters/get_private_cluster.py} +40 -44
  38. beamlit/api/privateclusters/get_private_cluster_health.py +97 -0
  39. beamlit/api/{agents/list_agent_deployments.py → privateclusters/list_private_clusters.py} +30 -45
  40. beamlit/api/{models/list_model_deployments.py → privateclusters/update_private_cluster.py} +38 -45
  41. beamlit/api/privateclusters/update_private_cluster_health.py +97 -0
  42. beamlit/authentication/device_mode.py +3 -9
  43. beamlit/common/generate.py +47 -34
  44. beamlit/common/settings.py +29 -27
  45. beamlit/deploy/deploy.py +101 -342
  46. beamlit/deploy/format.py +70 -0
  47. beamlit/deploy/parser.py +175 -0
  48. beamlit/functions/decorator.py +17 -14
  49. beamlit/models/__init__.py +64 -78
  50. beamlit/models/acl.py +4 -22
  51. beamlit/models/agent.py +34 -95
  52. beamlit/models/agent_history.py +7 -5
  53. beamlit/models/agent_history_event.py +11 -9
  54. beamlit/models/agent_metadata.py +5 -3
  55. beamlit/models/agent_spec.py +54 -45
  56. beamlit/models/api_key.py +14 -14
  57. beamlit/models/configuration.py +11 -0
  58. beamlit/models/core_spec.py +45 -32
  59. beamlit/models/{model_deployment_metrics_query_per_second_per_region_per_code.py → core_spec_configurations.py} +22 -22
  60. beamlit/models/environment.py +33 -105
  61. beamlit/models/environment_metadata.py +146 -0
  62. beamlit/models/environment_spec.py +8 -6
  63. beamlit/models/function.py +34 -95
  64. beamlit/models/function_metadata.py +5 -3
  65. beamlit/models/function_spec.py +53 -40
  66. beamlit/models/integration_connection.py +31 -137
  67. beamlit/models/integration_connection_spec.py +6 -4
  68. beamlit/models/metadata.py +5 -3
  69. beamlit/models/metadata_labels.py +4 -2
  70. beamlit/models/model.py +33 -94
  71. beamlit/models/model_metadata.py +5 -3
  72. beamlit/models/{function_provider_ref.py → model_private_cluster.py} +23 -14
  73. beamlit/models/model_provider.py +27 -43
  74. beamlit/models/model_spec.py +45 -32
  75. beamlit/models/owner_fields.py +4 -2
  76. beamlit/models/pending_invitation.py +14 -14
  77. beamlit/models/pod_template_spec.py +4 -2
  78. beamlit/models/policy.py +33 -159
  79. beamlit/models/policy_spec.py +24 -28
  80. beamlit/models/private_cluster.py +183 -0
  81. beamlit/models/{model_provider_ref.py → private_location.py} +7 -16
  82. beamlit/models/resource_deployment_metrics.py +0 -108
  83. beamlit/models/resource_environment_metrics.py +143 -71
  84. beamlit/models/{resource_deployment_metrics_inference_per_region.py → resource_environment_metrics_inference_per_region.py} +5 -5
  85. beamlit/models/resource_environment_metrics_inference_per_second_per_region.py +9 -11
  86. beamlit/models/{resource_deployment_metrics_query_per_region_per_code.py → resource_environment_metrics_query_per_region_per_code.py} +5 -5
  87. beamlit/models/resource_environment_metrics_query_per_second_per_region_per_code.py +5 -3
  88. beamlit/models/resource_log.py +4 -2
  89. beamlit/models/runtime.py +20 -2
  90. beamlit/models/serverless_config.py +28 -21
  91. beamlit/models/spec_configuration.py +7 -5
  92. beamlit/models/store_agent.py +14 -14
  93. beamlit/models/store_function.py +14 -14
  94. beamlit/models/time_fields.py +4 -2
  95. beamlit/models/websocket_channel.py +4 -2
  96. beamlit/models/workspace.py +23 -14
  97. beamlit/run.py +0 -1
  98. beamlit/serve/app.py +1 -0
  99. beamlit/serve/middlewares/accesslog.py +3 -1
  100. {beamlit-0.0.24rc19.dist-info → beamlit-0.0.24rc21.dist-info}/METADATA +1 -1
  101. beamlit-0.0.24rc21.dist-info/RECORD +243 -0
  102. beamlit/api/agents/delete_agent_deployment.py +0 -163
  103. beamlit/api/agents/delete_agent_deployment_history.py +0 -172
  104. beamlit/api/agents/get_agent_deployment_history.py +0 -172
  105. beamlit/api/agents/get_agent_deployment_logs.py +0 -164
  106. beamlit/api/agents/list_agent_deployment_history.py +0 -164
  107. beamlit/api/agents/put_agent_deployment.py +0 -185
  108. beamlit/api/agents/put_agent_deployment_history.py +0 -198
  109. beamlit/api/functions/delete_function_deployment.py +0 -163
  110. beamlit/api/functions/get_function_deployment.py +0 -163
  111. beamlit/api/functions/get_function_deployment_logs.py +0 -164
  112. beamlit/api/functions/get_function_deployment_metrics.py +0 -159
  113. beamlit/api/functions/put_function_deployment.py +0 -185
  114. beamlit/api/models/delete_model_deployment.py +0 -171
  115. beamlit/api/models/get_model_deployment.py +0 -171
  116. beamlit/api/models/get_model_deployment_logs.py +0 -168
  117. beamlit/api/models/get_model_deployment_metrics.py +0 -163
  118. beamlit/api/models/put_model_deployment.py +0 -193
  119. beamlit/models/agent_configuration.py +0 -70
  120. beamlit/models/agent_deployment.py +0 -340
  121. beamlit/models/agent_deployment_configuration.py +0 -45
  122. beamlit/models/agent_deployment_configuration_type_0.py +0 -43
  123. beamlit/models/agent_deployment_history.py +0 -185
  124. beamlit/models/agent_deployment_history_event.py +0 -133
  125. beamlit/models/agent_deployment_pod_template.py +0 -45
  126. beamlit/models/agent_deployment_pod_template_type_0.py +0 -43
  127. beamlit/models/agent_with_deployments.py +0 -176
  128. beamlit/models/authentication_provider_model.py +0 -144
  129. beamlit/models/authentication_provider_organization.py +0 -88
  130. beamlit/models/deployment_configuration.py +0 -70
  131. beamlit/models/deployment_configurations.py +0 -58
  132. beamlit/models/deployment_serverless_config.py +0 -131
  133. beamlit/models/deployment_serverless_config_type_0.py +0 -220
  134. beamlit/models/function_configuration.py +0 -70
  135. beamlit/models/function_deployment.py +0 -340
  136. beamlit/models/function_deployment_configuration.py +0 -45
  137. beamlit/models/function_deployment_configuration_type_0.py +0 -43
  138. beamlit/models/function_deployment_pod_template.py +0 -45
  139. beamlit/models/function_deployment_pod_template_type_0.py +0 -43
  140. beamlit/models/function_with_deployments.py +0 -176
  141. beamlit/models/integration.py +0 -198
  142. beamlit/models/integration_config.py +0 -45
  143. beamlit/models/integration_secret.py +0 -61
  144. beamlit/models/labels_type_0.py +0 -45
  145. beamlit/models/location.py +0 -122
  146. beamlit/models/model_deployment.py +0 -296
  147. beamlit/models/model_deployment_log.py +0 -70
  148. beamlit/models/model_deployment_metrics.py +0 -172
  149. beamlit/models/model_deployment_metrics_inference_per_second_per_region.py +0 -77
  150. beamlit/models/model_deployment_pod_template.py +0 -45
  151. beamlit/models/model_deployment_pod_template_type_0.py +0 -43
  152. beamlit/models/model_metrics.py +0 -96
  153. beamlit/models/model_with_deployments.py +0 -176
  154. beamlit/models/resource_deployment_log.py +0 -70
  155. beamlit/models/resource_deployment_metrics_inference_per_region_type_0.py +0 -79
  156. beamlit/models/resource_deployment_metrics_inference_per_second_per_region_type_0.py +0 -79
  157. beamlit/models/resource_deployment_metrics_query_per_region_per_code_type_0.py +0 -73
  158. beamlit/models/resource_deployment_metrics_query_per_second_per_region_per_code_type_0.py +0 -73
  159. beamlit/models/runtime_readiness_probe_type_0.py +0 -43
  160. beamlit/models/runtime_type_0.py +0 -111
  161. beamlit/models/runtime_type_0_readiness_probe.py +0 -43
  162. beamlit/models/runtime_type_0_readiness_probe_type_0.py +0 -43
  163. beamlit/models/runtime_type_0_resources.py +0 -59
  164. beamlit/models/standard_fields_dynamo_db.py +0 -88
  165. beamlit/models/store_agent_configuration.py +0 -97
  166. beamlit/models/store_agent_labels_type_0.py +0 -43
  167. beamlit/models/store_function_configuration.py +0 -97
  168. beamlit/models/store_function_labels_type_0.py +0 -43
  169. beamlit-0.0.24rc19.dist-info/RECORD +0 -303
  170. {beamlit-0.0.24rc19.dist-info → beamlit-0.0.24rc21.dist-info}/WHEEL +0 -0
@@ -1,133 +0,0 @@
1
- from typing import Any, TypeVar, Union
2
-
3
- from attrs import define as _attrs_define
4
- from attrs import field as _attrs_field
5
-
6
- from ..types import UNSET, Unset
7
-
8
- T = TypeVar("T", bound="AgentDeploymentHistoryEvent")
9
-
10
-
11
- @_attrs_define
12
- class AgentDeploymentHistoryEvent:
13
- """Agent deployment history event
14
-
15
- Attributes:
16
- end (Union[Unset, str]): End time
17
- error (Union[Unset, str]): Error message
18
- name (Union[Unset, str]): Name of the function or agent
19
- parameters (Union[Unset, str]): Parameters
20
- start (Union[Unset, str]): Start time
21
- status (Union[Unset, str]): Status, eg: running, success, failed
22
- sub_function (Union[Unset, str]): Function used in kit if a kit was used
23
- took (Union[Unset, int]): Number of milliseconds it took to complete the event
24
- type_ (Union[Unset, str]): Type, one of function or agent
25
- """
26
-
27
- end: Union[Unset, str] = UNSET
28
- error: Union[Unset, str] = UNSET
29
- name: Union[Unset, str] = UNSET
30
- parameters: Union[Unset, str] = UNSET
31
- start: Union[Unset, str] = UNSET
32
- status: Union[Unset, str] = UNSET
33
- sub_function: Union[Unset, str] = UNSET
34
- took: Union[Unset, int] = UNSET
35
- type_: Union[Unset, str] = UNSET
36
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
37
-
38
- def to_dict(self) -> dict[str, Any]:
39
- end = self.end
40
-
41
- error = self.error
42
-
43
- name = self.name
44
-
45
- parameters = self.parameters
46
-
47
- start = self.start
48
-
49
- status = self.status
50
-
51
- sub_function = self.sub_function
52
-
53
- took = self.took
54
-
55
- type_ = self.type_
56
-
57
- field_dict: dict[str, Any] = {}
58
- field_dict.update(self.additional_properties)
59
- field_dict.update({})
60
- if end is not UNSET:
61
- field_dict["end"] = end
62
- if error is not UNSET:
63
- field_dict["error"] = error
64
- if name is not UNSET:
65
- field_dict["name"] = name
66
- if parameters is not UNSET:
67
- field_dict["parameters"] = parameters
68
- if start is not UNSET:
69
- field_dict["start"] = start
70
- if status is not UNSET:
71
- field_dict["status"] = status
72
- if sub_function is not UNSET:
73
- field_dict["sub_function"] = sub_function
74
- if took is not UNSET:
75
- field_dict["took"] = took
76
- if type_ is not UNSET:
77
- field_dict["type"] = type_
78
-
79
- return field_dict
80
-
81
- @classmethod
82
- def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
83
- if not src_dict:
84
- return None
85
- d = src_dict.copy()
86
- end = d.pop("end", UNSET)
87
-
88
- error = d.pop("error", UNSET)
89
-
90
- name = d.pop("name", UNSET)
91
-
92
- parameters = d.pop("parameters", UNSET)
93
-
94
- start = d.pop("start", UNSET)
95
-
96
- status = d.pop("status", UNSET)
97
-
98
- sub_function = d.pop("sub_function", UNSET)
99
-
100
- took = d.pop("took", UNSET)
101
-
102
- type_ = d.pop("type", UNSET)
103
-
104
- agent_deployment_history_event = cls(
105
- end=end,
106
- error=error,
107
- name=name,
108
- parameters=parameters,
109
- start=start,
110
- status=status,
111
- sub_function=sub_function,
112
- took=took,
113
- type_=type_,
114
- )
115
-
116
- agent_deployment_history_event.additional_properties = d
117
- return agent_deployment_history_event
118
-
119
- @property
120
- def additional_keys(self) -> list[str]:
121
- return list(self.additional_properties.keys())
122
-
123
- def __getitem__(self, key: str) -> Any:
124
- return self.additional_properties[key]
125
-
126
- def __setitem__(self, key: str, value: Any) -> None:
127
- self.additional_properties[key] = value
128
-
129
- def __delitem__(self, key: str) -> None:
130
- del self.additional_properties[key]
131
-
132
- def __contains__(self, key: str) -> bool:
133
- return key in self.additional_properties
@@ -1,45 +0,0 @@
1
- from typing import Any, TypeVar
2
-
3
- from attrs import define as _attrs_define
4
- from attrs import field as _attrs_field
5
-
6
- T = TypeVar("T", bound="AgentDeploymentPodTemplate")
7
-
8
-
9
- @_attrs_define
10
- class AgentDeploymentPodTemplate:
11
- """The pod template, should be a valid Kubernetes pod template"""
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_pod_template = cls()
27
-
28
- agent_deployment_pod_template.additional_properties = d
29
- return agent_deployment_pod_template
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,43 +0,0 @@
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="AgentDeploymentPodTemplateType0")
7
-
8
-
9
- @_attrs_define
10
- class AgentDeploymentPodTemplateType0:
11
- """The pod template, should be a valid Kubernetes pod template"""
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
- d = src_dict.copy()
24
- agent_deployment_pod_template_type_0 = cls()
25
-
26
- agent_deployment_pod_template_type_0.additional_properties = d
27
- return agent_deployment_pod_template_type_0
28
-
29
- @property
30
- def additional_keys(self) -> list[str]:
31
- return list(self.additional_properties.keys())
32
-
33
- def __getitem__(self, key: str) -> Any:
34
- return self.additional_properties[key]
35
-
36
- def __setitem__(self, key: str, value: Any) -> None:
37
- self.additional_properties[key] = value
38
-
39
- def __delitem__(self, key: str) -> None:
40
- del self.additional_properties[key]
41
-
42
- def __contains__(self, key: str) -> bool:
43
- return key in self.additional_properties
@@ -1,176 +0,0 @@
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.agent_deployment import AgentDeployment
10
- from ..models.labels_type_0 import LabelsType0
11
-
12
-
13
- T = TypeVar("T", bound="AgentWithDeployments")
14
-
15
-
16
- @_attrs_define
17
- class AgentWithDeployments:
18
- """Logical object representing an agent but with deployment definition inside
19
-
20
- Attributes:
21
- created_at (Union[Unset, str]): The date and time when the resource was created
22
- created_by (Union[Unset, str]): The user or service account who created the resource
23
- updated_at (Union[Unset, str]): The date and time when the resource was updated
24
- updated_by (Union[Unset, str]): The user or service account who updated the resource
25
- display_name (Union[Unset, str]): Agent display name
26
- labels (Union['LabelsType0', None, Unset]): Labels
27
- name (Union[Unset, str]): Agent name
28
- workspace (Union[Unset, str]): Workspace name
29
- deployments (Union[Unset, list['AgentDeployment']]):
30
- """
31
-
32
- created_at: Union[Unset, str] = UNSET
33
- created_by: Union[Unset, str] = UNSET
34
- updated_at: Union[Unset, str] = UNSET
35
- updated_by: Union[Unset, str] = UNSET
36
- display_name: Union[Unset, str] = UNSET
37
- labels: Union["LabelsType0", None, Unset] = UNSET
38
- name: Union[Unset, str] = UNSET
39
- workspace: Union[Unset, str] = UNSET
40
- deployments: Union[Unset, list["AgentDeployment"]] = UNSET
41
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
42
-
43
- def to_dict(self) -> dict[str, Any]:
44
- from ..models.labels_type_0 import LabelsType0
45
-
46
- created_at = self.created_at
47
-
48
- created_by = self.created_by
49
-
50
- updated_at = self.updated_at
51
-
52
- updated_by = self.updated_by
53
-
54
- display_name = self.display_name
55
-
56
- labels: Union[None, Unset, dict[str, Any]]
57
- if isinstance(self.labels, Unset):
58
- labels = UNSET
59
- elif isinstance(self.labels, LabelsType0):
60
- labels = self.labels.to_dict()
61
- else:
62
- labels = self.labels
63
-
64
- name = self.name
65
-
66
- workspace = self.workspace
67
-
68
- deployments: Union[Unset, list[dict[str, Any]]] = UNSET
69
- if not isinstance(self.deployments, Unset):
70
- deployments = []
71
- for componentsschemas_agent_deployments_item_data in self.deployments:
72
- componentsschemas_agent_deployments_item = componentsschemas_agent_deployments_item_data.to_dict()
73
- deployments.append(componentsschemas_agent_deployments_item)
74
-
75
- field_dict: dict[str, Any] = {}
76
- field_dict.update(self.additional_properties)
77
- field_dict.update({})
78
- if created_at is not UNSET:
79
- field_dict["created_at"] = created_at
80
- if created_by is not UNSET:
81
- field_dict["created_by"] = created_by
82
- if updated_at is not UNSET:
83
- field_dict["updated_at"] = updated_at
84
- if updated_by is not UNSET:
85
- field_dict["updated_by"] = updated_by
86
- if display_name is not UNSET:
87
- field_dict["display_name"] = display_name
88
- if labels is not UNSET:
89
- field_dict["labels"] = labels
90
- if name is not UNSET:
91
- field_dict["name"] = name
92
- if workspace is not UNSET:
93
- field_dict["workspace"] = workspace
94
- if deployments is not UNSET:
95
- field_dict["deployments"] = deployments
96
-
97
- return field_dict
98
-
99
- @classmethod
100
- def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
101
- from ..models.agent_deployment import AgentDeployment
102
- from ..models.labels_type_0 import LabelsType0
103
-
104
- if not src_dict:
105
- return None
106
- d = src_dict.copy()
107
- created_at = d.pop("created_at", UNSET)
108
-
109
- created_by = d.pop("created_by", UNSET)
110
-
111
- updated_at = d.pop("updated_at", UNSET)
112
-
113
- updated_by = d.pop("updated_by", UNSET)
114
-
115
- display_name = d.pop("display_name", UNSET)
116
-
117
- def _parse_labels(data: object) -> Union["LabelsType0", None, Unset]:
118
- if data is None:
119
- return data
120
- if isinstance(data, Unset):
121
- return data
122
- try:
123
- if not isinstance(data, dict):
124
- raise TypeError()
125
- componentsschemas_labels_type_0 = LabelsType0.from_dict(data)
126
-
127
- return componentsschemas_labels_type_0
128
- except: # noqa: E722
129
- pass
130
- return cast(Union["LabelsType0", None, Unset], data)
131
-
132
- labels = _parse_labels(d.pop("labels", UNSET))
133
-
134
- name = d.pop("name", UNSET)
135
-
136
- workspace = d.pop("workspace", UNSET)
137
-
138
- deployments = []
139
- _deployments = d.pop("deployments", UNSET)
140
- for componentsschemas_agent_deployments_item_data in _deployments or []:
141
- componentsschemas_agent_deployments_item = AgentDeployment.from_dict(
142
- componentsschemas_agent_deployments_item_data
143
- )
144
-
145
- deployments.append(componentsschemas_agent_deployments_item)
146
-
147
- agent_with_deployments = cls(
148
- created_at=created_at,
149
- created_by=created_by,
150
- updated_at=updated_at,
151
- updated_by=updated_by,
152
- display_name=display_name,
153
- labels=labels,
154
- name=name,
155
- workspace=workspace,
156
- deployments=deployments,
157
- )
158
-
159
- agent_with_deployments.additional_properties = d
160
- return agent_with_deployments
161
-
162
- @property
163
- def additional_keys(self) -> list[str]:
164
- return list(self.additional_properties.keys())
165
-
166
- def __getitem__(self, key: str) -> Any:
167
- return self.additional_properties[key]
168
-
169
- def __setitem__(self, key: str, value: Any) -> None:
170
- self.additional_properties[key] = value
171
-
172
- def __delitem__(self, key: str) -> None:
173
- del self.additional_properties[key]
174
-
175
- def __contains__(self, key: str) -> bool:
176
- return key in self.additional_properties
@@ -1,144 +0,0 @@
1
- from typing import 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
- T = TypeVar("T", bound="AuthenticationProviderModel")
9
-
10
-
11
- @_attrs_define
12
- class AuthenticationProviderModel:
13
- """Model obtained from an external authentication provider, such as HuggingFace, OpenAI, etc...
14
-
15
- Attributes:
16
- created_at (Union[Unset, str]): Provider model created at
17
- downloads (Union[Unset, int]): Provider model downloads
18
- id (Union[Unset, str]): Provider model ID
19
- library_name (Union[Unset, str]): Provider model library name
20
- likes (Union[Unset, int]): Provider model likes
21
- name (Union[Unset, str]): Provider model name
22
- pipeline_tag (Union[Unset, str]): Provider model pipeline tag
23
- private (Union[Unset, bool]): Provider model private
24
- tags (Union[Unset, list[str]]): Provider model tags
25
- trending_score (Union[Unset, int]): Provider model trending score
26
- """
27
-
28
- created_at: Union[Unset, str] = UNSET
29
- downloads: Union[Unset, int] = UNSET
30
- id: Union[Unset, str] = UNSET
31
- library_name: Union[Unset, str] = UNSET
32
- likes: Union[Unset, int] = UNSET
33
- name: Union[Unset, str] = UNSET
34
- pipeline_tag: Union[Unset, str] = UNSET
35
- private: Union[Unset, bool] = UNSET
36
- tags: Union[Unset, list[str]] = UNSET
37
- trending_score: Union[Unset, int] = UNSET
38
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
39
-
40
- def to_dict(self) -> dict[str, Any]:
41
- created_at = self.created_at
42
-
43
- downloads = self.downloads
44
-
45
- id = self.id
46
-
47
- library_name = self.library_name
48
-
49
- likes = self.likes
50
-
51
- name = self.name
52
-
53
- pipeline_tag = self.pipeline_tag
54
-
55
- private = self.private
56
-
57
- tags: Union[Unset, list[str]] = UNSET
58
- if not isinstance(self.tags, Unset):
59
- tags = self.tags
60
-
61
- trending_score = self.trending_score
62
-
63
- field_dict: dict[str, Any] = {}
64
- field_dict.update(self.additional_properties)
65
- field_dict.update({})
66
- if created_at is not UNSET:
67
- field_dict["created_at"] = created_at
68
- if downloads is not UNSET:
69
- field_dict["downloads"] = downloads
70
- if id is not UNSET:
71
- field_dict["id"] = id
72
- if library_name is not UNSET:
73
- field_dict["library_name"] = library_name
74
- if likes is not UNSET:
75
- field_dict["likes"] = likes
76
- if name is not UNSET:
77
- field_dict["name"] = name
78
- if pipeline_tag is not UNSET:
79
- field_dict["pipeline_tag"] = pipeline_tag
80
- if private is not UNSET:
81
- field_dict["private"] = private
82
- if tags is not UNSET:
83
- field_dict["tags"] = tags
84
- if trending_score is not UNSET:
85
- field_dict["trending_score"] = trending_score
86
-
87
- return field_dict
88
-
89
- @classmethod
90
- def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
91
- if not src_dict:
92
- return None
93
- d = src_dict.copy()
94
- created_at = d.pop("created_at", UNSET)
95
-
96
- downloads = d.pop("downloads", UNSET)
97
-
98
- id = d.pop("id", UNSET)
99
-
100
- library_name = d.pop("library_name", UNSET)
101
-
102
- likes = d.pop("likes", UNSET)
103
-
104
- name = d.pop("name", UNSET)
105
-
106
- pipeline_tag = d.pop("pipeline_tag", UNSET)
107
-
108
- private = d.pop("private", UNSET)
109
-
110
- tags = cast(list[str], d.pop("tags", UNSET))
111
-
112
- trending_score = d.pop("trending_score", UNSET)
113
-
114
- authentication_provider_model = cls(
115
- created_at=created_at,
116
- downloads=downloads,
117
- id=id,
118
- library_name=library_name,
119
- likes=likes,
120
- name=name,
121
- pipeline_tag=pipeline_tag,
122
- private=private,
123
- tags=tags,
124
- trending_score=trending_score,
125
- )
126
-
127
- authentication_provider_model.additional_properties = d
128
- return authentication_provider_model
129
-
130
- @property
131
- def additional_keys(self) -> list[str]:
132
- return list(self.additional_properties.keys())
133
-
134
- def __getitem__(self, key: str) -> Any:
135
- return self.additional_properties[key]
136
-
137
- def __setitem__(self, key: str, value: Any) -> None:
138
- self.additional_properties[key] = value
139
-
140
- def __delitem__(self, key: str) -> None:
141
- del self.additional_properties[key]
142
-
143
- def __contains__(self, key: str) -> bool:
144
- return key in self.additional_properties
@@ -1,88 +0,0 @@
1
- from typing import Any, TypeVar, Union
2
-
3
- from attrs import define as _attrs_define
4
- from attrs import field as _attrs_field
5
-
6
- from ..types import UNSET, Unset
7
-
8
- T = TypeVar("T", bound="AuthenticationProviderOrganization")
9
-
10
-
11
- @_attrs_define
12
- class AuthenticationProviderOrganization:
13
- """Organization that hosts models from an external authentication provider (HuggingFace, OpenAI, etc...)
14
-
15
- Attributes:
16
- avatar_url (Union[Unset, str]): Provider organization avatar URL
17
- display_name (Union[Unset, str]): Provider organization display name
18
- id (Union[Unset, str]): Provider organization ID
19
- name (Union[Unset, str]): Provider organization name
20
- """
21
-
22
- avatar_url: Union[Unset, str] = UNSET
23
- display_name: Union[Unset, str] = UNSET
24
- id: Union[Unset, str] = UNSET
25
- name: Union[Unset, str] = UNSET
26
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
27
-
28
- def to_dict(self) -> dict[str, Any]:
29
- avatar_url = self.avatar_url
30
-
31
- display_name = self.display_name
32
-
33
- id = self.id
34
-
35
- name = self.name
36
-
37
- field_dict: dict[str, Any] = {}
38
- field_dict.update(self.additional_properties)
39
- field_dict.update({})
40
- if avatar_url is not UNSET:
41
- field_dict["avatar_url"] = avatar_url
42
- if display_name is not UNSET:
43
- field_dict["display_name"] = display_name
44
- if id is not UNSET:
45
- field_dict["id"] = id
46
- if name is not UNSET:
47
- field_dict["name"] = name
48
-
49
- return field_dict
50
-
51
- @classmethod
52
- def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
53
- if not src_dict:
54
- return None
55
- d = src_dict.copy()
56
- avatar_url = d.pop("avatar_url", UNSET)
57
-
58
- display_name = d.pop("display_name", UNSET)
59
-
60
- id = d.pop("id", UNSET)
61
-
62
- name = d.pop("name", UNSET)
63
-
64
- authentication_provider_organization = cls(
65
- avatar_url=avatar_url,
66
- display_name=display_name,
67
- id=id,
68
- name=name,
69
- )
70
-
71
- authentication_provider_organization.additional_properties = d
72
- return authentication_provider_organization
73
-
74
- @property
75
- def additional_keys(self) -> list[str]:
76
- return list(self.additional_properties.keys())
77
-
78
- def __getitem__(self, key: str) -> Any:
79
- return self.additional_properties[key]
80
-
81
- def __setitem__(self, key: str, value: Any) -> None:
82
- self.additional_properties[key] = value
83
-
84
- def __delitem__(self, key: str) -> None:
85
- del self.additional_properties[key]
86
-
87
- def __contains__(self, key: str) -> bool:
88
- return key in self.additional_properties
@@ -1,70 +0,0 @@
1
- from typing import Any, TypeVar, Union
2
-
3
- from attrs import define as _attrs_define
4
- from attrs import field as _attrs_field
5
-
6
- from ..types import UNSET, Unset
7
-
8
- T = TypeVar("T", bound="DeploymentConfiguration")
9
-
10
-
11
- @_attrs_define
12
- class DeploymentConfiguration:
13
- """Function configuration, this is a key value storage. In your function you can retrieve the value with config[key]
14
-
15
- Attributes:
16
- secret (Union[Unset, bool]): Function configuration secret
17
- value (Union[Unset, str]): Function configuration value
18
- """
19
-
20
- secret: Union[Unset, bool] = UNSET
21
- value: Union[Unset, str] = UNSET
22
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
23
-
24
- def to_dict(self) -> dict[str, Any]:
25
- secret = self.secret
26
-
27
- value = self.value
28
-
29
- field_dict: dict[str, Any] = {}
30
- field_dict.update(self.additional_properties)
31
- field_dict.update({})
32
- if secret is not UNSET:
33
- field_dict["secret"] = secret
34
- if value is not UNSET:
35
- field_dict["value"] = value
36
-
37
- return field_dict
38
-
39
- @classmethod
40
- def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
41
- if not src_dict:
42
- return None
43
- d = src_dict.copy()
44
- secret = d.pop("secret", UNSET)
45
-
46
- value = d.pop("value", UNSET)
47
-
48
- deployment_configuration = cls(
49
- secret=secret,
50
- value=value,
51
- )
52
-
53
- deployment_configuration.additional_properties = d
54
- return deployment_configuration
55
-
56
- @property
57
- def additional_keys(self) -> list[str]:
58
- return list(self.additional_properties.keys())
59
-
60
- def __getitem__(self, key: str) -> Any:
61
- return self.additional_properties[key]
62
-
63
- def __setitem__(self, key: str, value: Any) -> None:
64
- self.additional_properties[key] = value
65
-
66
- def __delitem__(self, key: str) -> None:
67
- del self.additional_properties[key]
68
-
69
- def __contains__(self, key: str) -> bool:
70
- return key in self.additional_properties