blaxel 0.64.0__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.
- blaxel/__init__.py +8 -0
- blaxel/agents/__init__.py +5 -0
- blaxel/agents/chain.py +153 -0
- blaxel/agents/chat.py +286 -0
- blaxel/agents/decorator.py +208 -0
- blaxel/agents/thread.py +24 -0
- blaxel/agents/voice/openai.py +255 -0
- blaxel/agents/voice/utils.py +25 -0
- blaxel/api/__init__.py +1 -0
- blaxel/api/agents/__init__.py +0 -0
- blaxel/api/agents/create_agent.py +155 -0
- blaxel/api/agents/delete_agent.py +146 -0
- blaxel/api/agents/get_agent.py +146 -0
- blaxel/api/agents/get_agent_logs.py +151 -0
- blaxel/api/agents/get_agent_metrics.py +150 -0
- blaxel/api/agents/get_agent_trace_ids.py +201 -0
- blaxel/api/agents/list_agent_revisions.py +155 -0
- blaxel/api/agents/list_agents.py +127 -0
- blaxel/api/agents/update_agent.py +168 -0
- blaxel/api/configurations/__init__.py +0 -0
- blaxel/api/configurations/get_configuration.py +122 -0
- blaxel/api/default/__init__.py +0 -0
- blaxel/api/default/get_trace.py +150 -0
- blaxel/api/default/get_trace_ids.py +218 -0
- blaxel/api/default/get_trace_logs.py +186 -0
- blaxel/api/default/list_mcp_hub_definitions.py +127 -0
- blaxel/api/functions/__init__.py +0 -0
- blaxel/api/functions/create_function.py +155 -0
- blaxel/api/functions/delete_function.py +146 -0
- blaxel/api/functions/get_function.py +146 -0
- blaxel/api/functions/get_function_logs.py +151 -0
- blaxel/api/functions/get_function_metrics.py +150 -0
- blaxel/api/functions/get_function_trace_ids.py +201 -0
- blaxel/api/functions/list_function_revisions.py +158 -0
- blaxel/api/functions/list_functions.py +131 -0
- blaxel/api/functions/update_function.py +168 -0
- blaxel/api/integrations/__init__.py +0 -0
- blaxel/api/integrations/create_integration_connection.py +167 -0
- blaxel/api/integrations/delete_integration_connection.py +158 -0
- blaxel/api/integrations/get_integration.py +97 -0
- blaxel/api/integrations/get_integration_connection.py +158 -0
- blaxel/api/integrations/get_integration_connection_model.py +104 -0
- blaxel/api/integrations/get_integration_connection_model_endpoint_configurations.py +97 -0
- blaxel/api/integrations/list_integration_connection_models.py +97 -0
- blaxel/api/integrations/list_integration_connections.py +139 -0
- blaxel/api/integrations/update_integration_connection.py +180 -0
- blaxel/api/invitations/__init__.py +0 -0
- blaxel/api/invitations/list_all_pending_invitations.py +142 -0
- blaxel/api/knowledgebases/__init__.py +0 -0
- blaxel/api/knowledgebases/create_knowledgebase.py +163 -0
- blaxel/api/knowledgebases/delete_knowledgebase.py +154 -0
- blaxel/api/knowledgebases/get_knowledgebase.py +154 -0
- blaxel/api/knowledgebases/list_knowledgebase_revisions.py +158 -0
- blaxel/api/knowledgebases/list_knowledgebases.py +139 -0
- blaxel/api/knowledgebases/update_knowledgebase.py +176 -0
- blaxel/api/locations/__init__.py +0 -0
- blaxel/api/locations/list_locations.py +139 -0
- blaxel/api/metrics/__init__.py +0 -0
- blaxel/api/metrics/get_metrics.py +130 -0
- blaxel/api/models/__init__.py +0 -0
- blaxel/api/models/create_model.py +163 -0
- blaxel/api/models/delete_model.py +154 -0
- blaxel/api/models/get_model.py +154 -0
- blaxel/api/models/get_model_logs.py +155 -0
- blaxel/api/models/get_model_metrics.py +158 -0
- blaxel/api/models/get_model_trace_ids.py +201 -0
- blaxel/api/models/list_model_revisions.py +158 -0
- blaxel/api/models/list_models.py +135 -0
- blaxel/api/models/update_model.py +176 -0
- blaxel/api/policies/__init__.py +0 -0
- blaxel/api/policies/create_policy.py +167 -0
- blaxel/api/policies/delete_policy.py +154 -0
- blaxel/api/policies/get_policy.py +154 -0
- blaxel/api/policies/list_policies.py +139 -0
- blaxel/api/policies/update_policy.py +180 -0
- blaxel/api/privateclusters/__init__.py +0 -0
- blaxel/api/privateclusters/create_private_cluster.py +132 -0
- blaxel/api/privateclusters/delete_private_cluster.py +156 -0
- blaxel/api/privateclusters/get_private_cluster.py +159 -0
- blaxel/api/privateclusters/get_private_cluster_health.py +97 -0
- blaxel/api/privateclusters/list_private_clusters.py +140 -0
- blaxel/api/privateclusters/update_private_cluster.py +156 -0
- blaxel/api/privateclusters/update_private_cluster_health.py +97 -0
- blaxel/api/service_accounts/__init__.py +0 -0
- blaxel/api/service_accounts/create_api_key_for_service_account.py +177 -0
- blaxel/api/service_accounts/create_workspace_service_account.py +170 -0
- blaxel/api/service_accounts/delete_api_key_for_service_account.py +104 -0
- blaxel/api/service_accounts/delete_workspace_service_account.py +160 -0
- blaxel/api/service_accounts/get_workspace_service_accounts.py +141 -0
- blaxel/api/service_accounts/list_api_keys_for_service_account.py +163 -0
- blaxel/api/service_accounts/update_workspace_service_account.py +183 -0
- blaxel/api/store/__init__.py +0 -0
- blaxel/api/store/get_store_agent.py +146 -0
- blaxel/api/store/get_store_function.py +146 -0
- blaxel/api/store/list_store_agents.py +131 -0
- blaxel/api/store/list_store_functions.py +131 -0
- blaxel/api/workspaces/__init__.py +0 -0
- blaxel/api/workspaces/accept_workspace_invitation.py +161 -0
- blaxel/api/workspaces/create_worspace.py +163 -0
- blaxel/api/workspaces/decline_workspace_invitation.py +158 -0
- blaxel/api/workspaces/delete_workspace.py +154 -0
- blaxel/api/workspaces/get_workspace.py +154 -0
- blaxel/api/workspaces/invite_workspace_user.py +174 -0
- blaxel/api/workspaces/leave_workspace.py +161 -0
- blaxel/api/workspaces/list_workspace_users.py +139 -0
- blaxel/api/workspaces/list_workspaces.py +139 -0
- blaxel/api/workspaces/remove_workspace_user.py +101 -0
- blaxel/api/workspaces/update_workspace.py +176 -0
- blaxel/api/workspaces/update_workspace_user_role.py +187 -0
- blaxel/authentication/__init__.py +45 -0
- blaxel/authentication/apikey.py +50 -0
- blaxel/authentication/authentication.py +176 -0
- blaxel/authentication/clientcredentials.py +103 -0
- blaxel/authentication/credentials.py +295 -0
- blaxel/authentication/device_mode.py +197 -0
- blaxel/client.py +281 -0
- blaxel/common/__init__.py +17 -0
- blaxel/common/error.py +27 -0
- blaxel/common/instrumentation.py +317 -0
- blaxel/common/logger.py +60 -0
- blaxel/common/secrets.py +39 -0
- blaxel/common/settings.py +150 -0
- blaxel/common/slugify.py +18 -0
- blaxel/common/utils.py +34 -0
- blaxel/deploy/__init__.py +8 -0
- blaxel/deploy/deploy.py +316 -0
- blaxel/deploy/format.py +46 -0
- blaxel/deploy/parser.py +192 -0
- blaxel/errors.py +16 -0
- blaxel/functions/__init__.py +7 -0
- blaxel/functions/common.py +228 -0
- blaxel/functions/decorator.py +64 -0
- blaxel/functions/local/local.py +48 -0
- blaxel/functions/mcp/client.py +96 -0
- blaxel/functions/mcp/mcp.py +168 -0
- blaxel/functions/mcp/utils.py +56 -0
- blaxel/functions/remote/remote.py +183 -0
- blaxel/models/__init__.py +233 -0
- blaxel/models/acl.py +133 -0
- blaxel/models/agent.py +126 -0
- blaxel/models/agent_chain.py +88 -0
- blaxel/models/agent_spec.py +346 -0
- blaxel/models/api_key.py +142 -0
- blaxel/models/configuration.py +85 -0
- blaxel/models/continent.py +70 -0
- blaxel/models/core_event.py +97 -0
- blaxel/models/core_spec.py +249 -0
- blaxel/models/core_spec_configurations.py +77 -0
- blaxel/models/country.py +70 -0
- blaxel/models/create_api_key_for_service_account_body.py +69 -0
- blaxel/models/create_workspace_service_account_body.py +71 -0
- blaxel/models/create_workspace_service_account_response_200.py +105 -0
- blaxel/models/delete_workspace_service_account_response_200.py +96 -0
- blaxel/models/entrypoint.py +96 -0
- blaxel/models/entrypoint_env.py +45 -0
- blaxel/models/flavor.py +70 -0
- blaxel/models/form.py +120 -0
- blaxel/models/form_config.py +45 -0
- blaxel/models/form_oauthomitempty.py +45 -0
- blaxel/models/form_secrets.py +45 -0
- blaxel/models/function.py +126 -0
- blaxel/models/function_kit.py +97 -0
- blaxel/models/function_spec.py +310 -0
- blaxel/models/get_trace_ids_response_200.py +45 -0
- blaxel/models/get_trace_logs_response_200.py +45 -0
- blaxel/models/get_trace_response_200.py +45 -0
- blaxel/models/get_workspace_service_accounts_response_200_item.py +96 -0
- blaxel/models/histogram_bucket.py +79 -0
- blaxel/models/histogram_stats.py +88 -0
- blaxel/models/integration_connection.py +96 -0
- blaxel/models/integration_connection_spec.py +114 -0
- blaxel/models/integration_connection_spec_config.py +45 -0
- blaxel/models/integration_connection_spec_secret.py +45 -0
- blaxel/models/integration_model.py +162 -0
- blaxel/models/integration_repository.py +88 -0
- blaxel/models/invite_workspace_user_body.py +60 -0
- blaxel/models/knowledgebase.py +126 -0
- blaxel/models/knowledgebase_spec.py +163 -0
- blaxel/models/knowledgebase_spec_options.py +45 -0
- blaxel/models/last_n_requests_metric.py +79 -0
- blaxel/models/latency_metric.py +144 -0
- blaxel/models/location_response.py +113 -0
- blaxel/models/mcp_definition.py +188 -0
- blaxel/models/mcp_definition_entrypoint.py +45 -0
- blaxel/models/mcp_definition_form.py +45 -0
- blaxel/models/metadata.py +139 -0
- blaxel/models/metadata_labels.py +45 -0
- blaxel/models/metric.py +79 -0
- blaxel/models/metrics.py +169 -0
- blaxel/models/metrics_models.py +45 -0
- blaxel/models/metrics_request_total_per_code.py +45 -0
- blaxel/models/metrics_rps_per_code.py +45 -0
- blaxel/models/model.py +126 -0
- blaxel/models/model_private_cluster.py +79 -0
- blaxel/models/model_spec.py +249 -0
- blaxel/models/o_auth.py +72 -0
- blaxel/models/owner_fields.py +70 -0
- blaxel/models/pending_invitation.py +124 -0
- blaxel/models/pending_invitation_accept.py +85 -0
- blaxel/models/pending_invitation_render.py +147 -0
- blaxel/models/pending_invitation_render_invited_by.py +88 -0
- blaxel/models/pending_invitation_render_workspace.py +70 -0
- blaxel/models/pending_invitation_workspace_details.py +72 -0
- blaxel/models/pod_template_spec.py +45 -0
- blaxel/models/policy.py +96 -0
- blaxel/models/policy_location.py +70 -0
- blaxel/models/policy_max_tokens.py +106 -0
- blaxel/models/policy_spec.py +151 -0
- blaxel/models/private_cluster.py +183 -0
- blaxel/models/private_location.py +61 -0
- blaxel/models/repository.py +70 -0
- blaxel/models/request_duration_over_time_metric.py +97 -0
- blaxel/models/request_duration_over_time_metrics.py +80 -0
- blaxel/models/request_total_by_origin_metric.py +115 -0
- blaxel/models/request_total_by_origin_metric_request_total_by_origin.py +45 -0
- blaxel/models/request_total_by_origin_metric_request_total_by_origin_and_code.py +45 -0
- blaxel/models/request_total_metric.py +123 -0
- blaxel/models/request_total_metric_request_total_per_code.py +45 -0
- blaxel/models/request_total_metric_rps_per_code.py +45 -0
- blaxel/models/resource_log.py +79 -0
- blaxel/models/resource_metrics.py +270 -0
- blaxel/models/resource_metrics_request_total_per_code.py +45 -0
- blaxel/models/resource_metrics_rps_per_code.py +45 -0
- blaxel/models/revision_configuration.py +97 -0
- blaxel/models/revision_metadata.py +124 -0
- blaxel/models/runtime.py +196 -0
- blaxel/models/runtime_startup_probe.py +45 -0
- blaxel/models/serverless_config.py +80 -0
- blaxel/models/spec_configuration.py +70 -0
- blaxel/models/store_agent.py +178 -0
- blaxel/models/store_agent_labels.py +45 -0
- blaxel/models/store_configuration.py +151 -0
- blaxel/models/store_configuration_option.py +79 -0
- blaxel/models/store_function.py +211 -0
- blaxel/models/store_function_kit.py +97 -0
- blaxel/models/store_function_labels.py +45 -0
- blaxel/models/store_function_parameter.py +88 -0
- blaxel/models/time_fields.py +70 -0
- blaxel/models/token_rate_metric.py +88 -0
- blaxel/models/token_rate_metrics.py +120 -0
- blaxel/models/token_total_metric.py +106 -0
- blaxel/models/trace_ids_response.py +45 -0
- blaxel/models/update_workspace_service_account_body.py +69 -0
- blaxel/models/update_workspace_service_account_response_200.py +96 -0
- blaxel/models/update_workspace_user_role_body.py +60 -0
- blaxel/models/websocket_channel.py +88 -0
- blaxel/models/workspace.py +148 -0
- blaxel/models/workspace_labels.py +45 -0
- blaxel/models/workspace_user.py +115 -0
- blaxel/py.typed +1 -0
- blaxel/run.py +108 -0
- blaxel/serve/app.py +131 -0
- blaxel/serve/middlewares/__init__.py +10 -0
- blaxel/serve/middlewares/accesslog.py +32 -0
- blaxel/serve/middlewares/processtime.py +28 -0
- blaxel/types.py +46 -0
- blaxel-0.64.0.dist-info/METADATA +96 -0
- blaxel-0.64.0.dist-info/RECORD +261 -0
- blaxel-0.64.0.dist-info/WHEEL +4 -0
- blaxel-0.64.0.dist-info/entry_points.txt +2 -0
- blaxel-0.64.0.dist-info/licenses/LICENSE +21 -0
blaxel/models/form.py
ADDED
@@ -0,0 +1,120 @@
|
|
1
|
+
from typing import TYPE_CHECKING, 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
|
+
if TYPE_CHECKING:
|
9
|
+
from ..models.form_config import FormConfig
|
10
|
+
from ..models.form_oauthomitempty import FormOauthomitempty
|
11
|
+
from ..models.form_secrets import FormSecrets
|
12
|
+
|
13
|
+
|
14
|
+
T = TypeVar("T", bound="Form")
|
15
|
+
|
16
|
+
|
17
|
+
@_attrs_define
|
18
|
+
class Form:
|
19
|
+
"""Form of the artifact
|
20
|
+
|
21
|
+
Attributes:
|
22
|
+
config (Union[Unset, FormConfig]): Config of the artifact
|
23
|
+
oauthomitempty (Union[Unset, FormOauthomitempty]): OAuth of the artifact
|
24
|
+
secrets (Union[Unset, FormSecrets]): Secrets of the artifact
|
25
|
+
"""
|
26
|
+
|
27
|
+
config: Union[Unset, "FormConfig"] = UNSET
|
28
|
+
oauthomitempty: Union[Unset, "FormOauthomitempty"] = UNSET
|
29
|
+
secrets: Union[Unset, "FormSecrets"] = UNSET
|
30
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
31
|
+
|
32
|
+
def to_dict(self) -> dict[str, Any]:
|
33
|
+
config: Union[Unset, dict[str, Any]] = UNSET
|
34
|
+
if self.config and not isinstance(self.config, Unset) and not isinstance(self.config, dict):
|
35
|
+
config = self.config.to_dict()
|
36
|
+
elif self.config and isinstance(self.config, dict):
|
37
|
+
config = self.config
|
38
|
+
|
39
|
+
oauthomitempty: Union[Unset, dict[str, Any]] = UNSET
|
40
|
+
if (
|
41
|
+
self.oauthomitempty
|
42
|
+
and not isinstance(self.oauthomitempty, Unset)
|
43
|
+
and not isinstance(self.oauthomitempty, dict)
|
44
|
+
):
|
45
|
+
oauthomitempty = self.oauthomitempty.to_dict()
|
46
|
+
elif self.oauthomitempty and isinstance(self.oauthomitempty, dict):
|
47
|
+
oauthomitempty = self.oauthomitempty
|
48
|
+
|
49
|
+
secrets: Union[Unset, dict[str, Any]] = UNSET
|
50
|
+
if self.secrets and not isinstance(self.secrets, Unset) and not isinstance(self.secrets, dict):
|
51
|
+
secrets = self.secrets.to_dict()
|
52
|
+
elif self.secrets and isinstance(self.secrets, dict):
|
53
|
+
secrets = self.secrets
|
54
|
+
|
55
|
+
field_dict: dict[str, Any] = {}
|
56
|
+
field_dict.update(self.additional_properties)
|
57
|
+
field_dict.update({})
|
58
|
+
if config is not UNSET:
|
59
|
+
field_dict["config"] = config
|
60
|
+
if oauthomitempty is not UNSET:
|
61
|
+
field_dict["oauth,omitempty"] = oauthomitempty
|
62
|
+
if secrets is not UNSET:
|
63
|
+
field_dict["secrets"] = secrets
|
64
|
+
|
65
|
+
return field_dict
|
66
|
+
|
67
|
+
@classmethod
|
68
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
69
|
+
from ..models.form_config import FormConfig
|
70
|
+
from ..models.form_oauthomitempty import FormOauthomitempty
|
71
|
+
from ..models.form_secrets import FormSecrets
|
72
|
+
|
73
|
+
if not src_dict:
|
74
|
+
return None
|
75
|
+
d = src_dict.copy()
|
76
|
+
_config = d.pop("config", UNSET)
|
77
|
+
config: Union[Unset, FormConfig]
|
78
|
+
if isinstance(_config, Unset):
|
79
|
+
config = UNSET
|
80
|
+
else:
|
81
|
+
config = FormConfig.from_dict(_config)
|
82
|
+
|
83
|
+
_oauthomitempty = d.pop("oauth,omitempty", UNSET)
|
84
|
+
oauthomitempty: Union[Unset, FormOauthomitempty]
|
85
|
+
if isinstance(_oauthomitempty, Unset):
|
86
|
+
oauthomitempty = UNSET
|
87
|
+
else:
|
88
|
+
oauthomitempty = FormOauthomitempty.from_dict(_oauthomitempty)
|
89
|
+
|
90
|
+
_secrets = d.pop("secrets", UNSET)
|
91
|
+
secrets: Union[Unset, FormSecrets]
|
92
|
+
if isinstance(_secrets, Unset):
|
93
|
+
secrets = UNSET
|
94
|
+
else:
|
95
|
+
secrets = FormSecrets.from_dict(_secrets)
|
96
|
+
|
97
|
+
form = cls(
|
98
|
+
config=config,
|
99
|
+
oauthomitempty=oauthomitempty,
|
100
|
+
secrets=secrets,
|
101
|
+
)
|
102
|
+
|
103
|
+
form.additional_properties = d
|
104
|
+
return form
|
105
|
+
|
106
|
+
@property
|
107
|
+
def additional_keys(self) -> list[str]:
|
108
|
+
return list(self.additional_properties.keys())
|
109
|
+
|
110
|
+
def __getitem__(self, key: str) -> Any:
|
111
|
+
return self.additional_properties[key]
|
112
|
+
|
113
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
114
|
+
self.additional_properties[key] = value
|
115
|
+
|
116
|
+
def __delitem__(self, key: str) -> None:
|
117
|
+
del self.additional_properties[key]
|
118
|
+
|
119
|
+
def __contains__(self, key: str) -> bool:
|
120
|
+
return key in self.additional_properties
|
@@ -0,0 +1,45 @@
|
|
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="FormConfig")
|
7
|
+
|
8
|
+
|
9
|
+
@_attrs_define
|
10
|
+
class FormConfig:
|
11
|
+
"""Config of the artifact"""
|
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
|
+
form_config = cls()
|
27
|
+
|
28
|
+
form_config.additional_properties = d
|
29
|
+
return form_config
|
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
|
@@ -0,0 +1,45 @@
|
|
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="FormOauthomitempty")
|
7
|
+
|
8
|
+
|
9
|
+
@_attrs_define
|
10
|
+
class FormOauthomitempty:
|
11
|
+
"""OAuth of the artifact"""
|
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
|
+
form_oauthomitempty = cls()
|
27
|
+
|
28
|
+
form_oauthomitempty.additional_properties = d
|
29
|
+
return form_oauthomitempty
|
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
|
@@ -0,0 +1,45 @@
|
|
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="FormSecrets")
|
7
|
+
|
8
|
+
|
9
|
+
@_attrs_define
|
10
|
+
class FormSecrets:
|
11
|
+
"""Secrets of the artifact"""
|
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
|
+
form_secrets = cls()
|
27
|
+
|
28
|
+
form_secrets.additional_properties = d
|
29
|
+
return form_secrets
|
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
|
@@ -0,0 +1,126 @@
|
|
1
|
+
from typing import TYPE_CHECKING, 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
|
+
if TYPE_CHECKING:
|
9
|
+
from ..models.core_event import CoreEvent
|
10
|
+
from ..models.function_spec import FunctionSpec
|
11
|
+
from ..models.metadata import Metadata
|
12
|
+
|
13
|
+
|
14
|
+
T = TypeVar("T", bound="Function")
|
15
|
+
|
16
|
+
|
17
|
+
@_attrs_define
|
18
|
+
class Function:
|
19
|
+
"""Function
|
20
|
+
|
21
|
+
Attributes:
|
22
|
+
events (Union[Unset, list['CoreEvent']]): Core events
|
23
|
+
metadata (Union[Unset, Metadata]): Metadata
|
24
|
+
spec (Union[Unset, FunctionSpec]): Function specification
|
25
|
+
status (Union[Unset, str]): Function status
|
26
|
+
"""
|
27
|
+
|
28
|
+
events: Union[Unset, list["CoreEvent"]] = UNSET
|
29
|
+
metadata: Union[Unset, "Metadata"] = UNSET
|
30
|
+
spec: Union[Unset, "FunctionSpec"] = UNSET
|
31
|
+
status: Union[Unset, str] = UNSET
|
32
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
33
|
+
|
34
|
+
def to_dict(self) -> dict[str, Any]:
|
35
|
+
events: Union[Unset, list[dict[str, Any]]] = UNSET
|
36
|
+
if not isinstance(self.events, Unset):
|
37
|
+
events = []
|
38
|
+
for componentsschemas_core_events_item_data in self.events:
|
39
|
+
componentsschemas_core_events_item = componentsschemas_core_events_item_data.to_dict()
|
40
|
+
events.append(componentsschemas_core_events_item)
|
41
|
+
|
42
|
+
metadata: Union[Unset, dict[str, Any]] = UNSET
|
43
|
+
if self.metadata and not isinstance(self.metadata, Unset) and not isinstance(self.metadata, dict):
|
44
|
+
metadata = self.metadata.to_dict()
|
45
|
+
elif self.metadata and isinstance(self.metadata, dict):
|
46
|
+
metadata = self.metadata
|
47
|
+
|
48
|
+
spec: Union[Unset, dict[str, Any]] = UNSET
|
49
|
+
if self.spec and not isinstance(self.spec, Unset) and not isinstance(self.spec, dict):
|
50
|
+
spec = self.spec.to_dict()
|
51
|
+
elif self.spec and isinstance(self.spec, dict):
|
52
|
+
spec = self.spec
|
53
|
+
|
54
|
+
status = self.status
|
55
|
+
|
56
|
+
field_dict: dict[str, Any] = {}
|
57
|
+
field_dict.update(self.additional_properties)
|
58
|
+
field_dict.update({})
|
59
|
+
if events is not UNSET:
|
60
|
+
field_dict["events"] = events
|
61
|
+
if metadata is not UNSET:
|
62
|
+
field_dict["metadata"] = metadata
|
63
|
+
if spec is not UNSET:
|
64
|
+
field_dict["spec"] = spec
|
65
|
+
if status is not UNSET:
|
66
|
+
field_dict["status"] = status
|
67
|
+
|
68
|
+
return field_dict
|
69
|
+
|
70
|
+
@classmethod
|
71
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
72
|
+
from ..models.core_event import CoreEvent
|
73
|
+
from ..models.function_spec import FunctionSpec
|
74
|
+
from ..models.metadata import Metadata
|
75
|
+
|
76
|
+
if not src_dict:
|
77
|
+
return None
|
78
|
+
d = src_dict.copy()
|
79
|
+
events = []
|
80
|
+
_events = d.pop("events", UNSET)
|
81
|
+
for componentsschemas_core_events_item_data in _events or []:
|
82
|
+
componentsschemas_core_events_item = CoreEvent.from_dict(componentsschemas_core_events_item_data)
|
83
|
+
|
84
|
+
events.append(componentsschemas_core_events_item)
|
85
|
+
|
86
|
+
_metadata = d.pop("metadata", UNSET)
|
87
|
+
metadata: Union[Unset, Metadata]
|
88
|
+
if isinstance(_metadata, Unset):
|
89
|
+
metadata = UNSET
|
90
|
+
else:
|
91
|
+
metadata = Metadata.from_dict(_metadata)
|
92
|
+
|
93
|
+
_spec = d.pop("spec", UNSET)
|
94
|
+
spec: Union[Unset, FunctionSpec]
|
95
|
+
if isinstance(_spec, Unset):
|
96
|
+
spec = UNSET
|
97
|
+
else:
|
98
|
+
spec = FunctionSpec.from_dict(_spec)
|
99
|
+
|
100
|
+
status = d.pop("status", UNSET)
|
101
|
+
|
102
|
+
function = cls(
|
103
|
+
events=events,
|
104
|
+
metadata=metadata,
|
105
|
+
spec=spec,
|
106
|
+
status=status,
|
107
|
+
)
|
108
|
+
|
109
|
+
function.additional_properties = d
|
110
|
+
return function
|
111
|
+
|
112
|
+
@property
|
113
|
+
def additional_keys(self) -> list[str]:
|
114
|
+
return list(self.additional_properties.keys())
|
115
|
+
|
116
|
+
def __getitem__(self, key: str) -> Any:
|
117
|
+
return self.additional_properties[key]
|
118
|
+
|
119
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
120
|
+
self.additional_properties[key] = value
|
121
|
+
|
122
|
+
def __delitem__(self, key: str) -> None:
|
123
|
+
del self.additional_properties[key]
|
124
|
+
|
125
|
+
def __contains__(self, key: str) -> bool:
|
126
|
+
return key in self.additional_properties
|
@@ -0,0 +1,97 @@
|
|
1
|
+
from typing import TYPE_CHECKING, 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
|
+
if TYPE_CHECKING:
|
9
|
+
from ..models.store_function_parameter import StoreFunctionParameter
|
10
|
+
|
11
|
+
|
12
|
+
T = TypeVar("T", bound="FunctionKit")
|
13
|
+
|
14
|
+
|
15
|
+
@_attrs_define
|
16
|
+
class FunctionKit:
|
17
|
+
"""Function kit
|
18
|
+
|
19
|
+
Attributes:
|
20
|
+
description (Union[Unset, str]): Description of the function kit, very important for the agent to work with your
|
21
|
+
kit
|
22
|
+
name (Union[Unset, str]): The kit name, very important for the agent to work with your kit
|
23
|
+
parameters (Union[Unset, list['StoreFunctionParameter']]): Kit parameters, for your kit to be callable with an
|
24
|
+
Agent
|
25
|
+
"""
|
26
|
+
|
27
|
+
description: Union[Unset, str] = UNSET
|
28
|
+
name: Union[Unset, str] = UNSET
|
29
|
+
parameters: Union[Unset, list["StoreFunctionParameter"]] = UNSET
|
30
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
31
|
+
|
32
|
+
def to_dict(self) -> dict[str, Any]:
|
33
|
+
description = self.description
|
34
|
+
|
35
|
+
name = self.name
|
36
|
+
|
37
|
+
parameters: Union[Unset, list[dict[str, Any]]] = UNSET
|
38
|
+
if not isinstance(self.parameters, Unset):
|
39
|
+
parameters = []
|
40
|
+
for parameters_item_data in self.parameters:
|
41
|
+
parameters_item = parameters_item_data.to_dict()
|
42
|
+
parameters.append(parameters_item)
|
43
|
+
|
44
|
+
field_dict: dict[str, Any] = {}
|
45
|
+
field_dict.update(self.additional_properties)
|
46
|
+
field_dict.update({})
|
47
|
+
if description is not UNSET:
|
48
|
+
field_dict["description"] = description
|
49
|
+
if name is not UNSET:
|
50
|
+
field_dict["name"] = name
|
51
|
+
if parameters is not UNSET:
|
52
|
+
field_dict["parameters"] = parameters
|
53
|
+
|
54
|
+
return field_dict
|
55
|
+
|
56
|
+
@classmethod
|
57
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
58
|
+
from ..models.store_function_parameter import StoreFunctionParameter
|
59
|
+
|
60
|
+
if not src_dict:
|
61
|
+
return None
|
62
|
+
d = src_dict.copy()
|
63
|
+
description = d.pop("description", UNSET)
|
64
|
+
|
65
|
+
name = d.pop("name", UNSET)
|
66
|
+
|
67
|
+
parameters = []
|
68
|
+
_parameters = d.pop("parameters", UNSET)
|
69
|
+
for parameters_item_data in _parameters or []:
|
70
|
+
parameters_item = StoreFunctionParameter.from_dict(parameters_item_data)
|
71
|
+
|
72
|
+
parameters.append(parameters_item)
|
73
|
+
|
74
|
+
function_kit = cls(
|
75
|
+
description=description,
|
76
|
+
name=name,
|
77
|
+
parameters=parameters,
|
78
|
+
)
|
79
|
+
|
80
|
+
function_kit.additional_properties = d
|
81
|
+
return function_kit
|
82
|
+
|
83
|
+
@property
|
84
|
+
def additional_keys(self) -> list[str]:
|
85
|
+
return list(self.additional_properties.keys())
|
86
|
+
|
87
|
+
def __getitem__(self, key: str) -> Any:
|
88
|
+
return self.additional_properties[key]
|
89
|
+
|
90
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
91
|
+
self.additional_properties[key] = value
|
92
|
+
|
93
|
+
def __delitem__(self, key: str) -> None:
|
94
|
+
del self.additional_properties[key]
|
95
|
+
|
96
|
+
def __contains__(self, key: str) -> bool:
|
97
|
+
return key in self.additional_properties
|