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
@@ -0,0 +1,188 @@
|
|
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.mcp_definition_entrypoint import MCPDefinitionEntrypoint
|
10
|
+
from ..models.mcp_definition_form import MCPDefinitionForm
|
11
|
+
|
12
|
+
|
13
|
+
T = TypeVar("T", bound="MCPDefinition")
|
14
|
+
|
15
|
+
|
16
|
+
@_attrs_define
|
17
|
+
class MCPDefinition:
|
18
|
+
"""Definition of an MCP from the MCP Hub
|
19
|
+
|
20
|
+
Attributes:
|
21
|
+
categories (Union[Unset, list[Any]]): Categories of the artifact
|
22
|
+
coming_soon (Union[Unset, bool]): If the artifact is coming soon
|
23
|
+
description (Union[Unset, str]): Description of the artifact
|
24
|
+
display_name (Union[Unset, str]): Display name of the artifact
|
25
|
+
enterprise (Union[Unset, bool]): If the artifact is enterprise
|
26
|
+
entrypoint (Union[Unset, MCPDefinitionEntrypoint]): Entrypoint of the artifact
|
27
|
+
form (Union[Unset, MCPDefinitionForm]): Form of the artifact
|
28
|
+
icon (Union[Unset, str]): Icon of the artifact
|
29
|
+
integration (Union[Unset, str]): Integration of the artifact
|
30
|
+
long_description (Union[Unset, str]): Long description of the artifact
|
31
|
+
name (Union[Unset, str]): Name of the artifact
|
32
|
+
url (Union[Unset, str]): URL of the artifact
|
33
|
+
"""
|
34
|
+
|
35
|
+
categories: Union[Unset, list[Any]] = UNSET
|
36
|
+
coming_soon: Union[Unset, bool] = UNSET
|
37
|
+
description: Union[Unset, str] = UNSET
|
38
|
+
display_name: Union[Unset, str] = UNSET
|
39
|
+
enterprise: Union[Unset, bool] = UNSET
|
40
|
+
entrypoint: Union[Unset, "MCPDefinitionEntrypoint"] = UNSET
|
41
|
+
form: Union[Unset, "MCPDefinitionForm"] = UNSET
|
42
|
+
icon: Union[Unset, str] = UNSET
|
43
|
+
integration: Union[Unset, str] = UNSET
|
44
|
+
long_description: Union[Unset, str] = UNSET
|
45
|
+
name: Union[Unset, str] = UNSET
|
46
|
+
url: Union[Unset, str] = UNSET
|
47
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
48
|
+
|
49
|
+
def to_dict(self) -> dict[str, Any]:
|
50
|
+
categories: Union[Unset, list[Any]] = UNSET
|
51
|
+
if not isinstance(self.categories, Unset):
|
52
|
+
categories = self.categories
|
53
|
+
|
54
|
+
coming_soon = self.coming_soon
|
55
|
+
|
56
|
+
description = self.description
|
57
|
+
|
58
|
+
display_name = self.display_name
|
59
|
+
|
60
|
+
enterprise = self.enterprise
|
61
|
+
|
62
|
+
entrypoint: Union[Unset, dict[str, Any]] = UNSET
|
63
|
+
if self.entrypoint and not isinstance(self.entrypoint, Unset) and not isinstance(self.entrypoint, dict):
|
64
|
+
entrypoint = self.entrypoint.to_dict()
|
65
|
+
elif self.entrypoint and isinstance(self.entrypoint, dict):
|
66
|
+
entrypoint = self.entrypoint
|
67
|
+
|
68
|
+
form: Union[Unset, dict[str, Any]] = UNSET
|
69
|
+
if self.form and not isinstance(self.form, Unset) and not isinstance(self.form, dict):
|
70
|
+
form = self.form.to_dict()
|
71
|
+
elif self.form and isinstance(self.form, dict):
|
72
|
+
form = self.form
|
73
|
+
|
74
|
+
icon = self.icon
|
75
|
+
|
76
|
+
integration = self.integration
|
77
|
+
|
78
|
+
long_description = self.long_description
|
79
|
+
|
80
|
+
name = self.name
|
81
|
+
|
82
|
+
url = self.url
|
83
|
+
|
84
|
+
field_dict: dict[str, Any] = {}
|
85
|
+
field_dict.update(self.additional_properties)
|
86
|
+
field_dict.update({})
|
87
|
+
if categories is not UNSET:
|
88
|
+
field_dict["categories"] = categories
|
89
|
+
if coming_soon is not UNSET:
|
90
|
+
field_dict["coming_soon"] = coming_soon
|
91
|
+
if description is not UNSET:
|
92
|
+
field_dict["description"] = description
|
93
|
+
if display_name is not UNSET:
|
94
|
+
field_dict["displayName"] = display_name
|
95
|
+
if enterprise is not UNSET:
|
96
|
+
field_dict["enterprise"] = enterprise
|
97
|
+
if entrypoint is not UNSET:
|
98
|
+
field_dict["entrypoint"] = entrypoint
|
99
|
+
if form is not UNSET:
|
100
|
+
field_dict["form"] = form
|
101
|
+
if icon is not UNSET:
|
102
|
+
field_dict["icon"] = icon
|
103
|
+
if integration is not UNSET:
|
104
|
+
field_dict["integration"] = integration
|
105
|
+
if long_description is not UNSET:
|
106
|
+
field_dict["longDescription"] = long_description
|
107
|
+
if name is not UNSET:
|
108
|
+
field_dict["name"] = name
|
109
|
+
if url is not UNSET:
|
110
|
+
field_dict["url"] = url
|
111
|
+
|
112
|
+
return field_dict
|
113
|
+
|
114
|
+
@classmethod
|
115
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
116
|
+
from ..models.mcp_definition_entrypoint import MCPDefinitionEntrypoint
|
117
|
+
from ..models.mcp_definition_form import MCPDefinitionForm
|
118
|
+
|
119
|
+
if not src_dict:
|
120
|
+
return None
|
121
|
+
d = src_dict.copy()
|
122
|
+
categories = cast(list[Any], d.pop("categories", UNSET))
|
123
|
+
|
124
|
+
coming_soon = d.pop("coming_soon", UNSET)
|
125
|
+
|
126
|
+
description = d.pop("description", UNSET)
|
127
|
+
|
128
|
+
display_name = d.pop("displayName", UNSET)
|
129
|
+
|
130
|
+
enterprise = d.pop("enterprise", UNSET)
|
131
|
+
|
132
|
+
_entrypoint = d.pop("entrypoint", UNSET)
|
133
|
+
entrypoint: Union[Unset, MCPDefinitionEntrypoint]
|
134
|
+
if isinstance(_entrypoint, Unset):
|
135
|
+
entrypoint = UNSET
|
136
|
+
else:
|
137
|
+
entrypoint = MCPDefinitionEntrypoint.from_dict(_entrypoint)
|
138
|
+
|
139
|
+
_form = d.pop("form", UNSET)
|
140
|
+
form: Union[Unset, MCPDefinitionForm]
|
141
|
+
if isinstance(_form, Unset):
|
142
|
+
form = UNSET
|
143
|
+
else:
|
144
|
+
form = MCPDefinitionForm.from_dict(_form)
|
145
|
+
|
146
|
+
icon = d.pop("icon", UNSET)
|
147
|
+
|
148
|
+
integration = d.pop("integration", UNSET)
|
149
|
+
|
150
|
+
long_description = d.pop("longDescription", UNSET)
|
151
|
+
|
152
|
+
name = d.pop("name", UNSET)
|
153
|
+
|
154
|
+
url = d.pop("url", UNSET)
|
155
|
+
|
156
|
+
mcp_definition = cls(
|
157
|
+
categories=categories,
|
158
|
+
coming_soon=coming_soon,
|
159
|
+
description=description,
|
160
|
+
display_name=display_name,
|
161
|
+
enterprise=enterprise,
|
162
|
+
entrypoint=entrypoint,
|
163
|
+
form=form,
|
164
|
+
icon=icon,
|
165
|
+
integration=integration,
|
166
|
+
long_description=long_description,
|
167
|
+
name=name,
|
168
|
+
url=url,
|
169
|
+
)
|
170
|
+
|
171
|
+
mcp_definition.additional_properties = d
|
172
|
+
return mcp_definition
|
173
|
+
|
174
|
+
@property
|
175
|
+
def additional_keys(self) -> list[str]:
|
176
|
+
return list(self.additional_properties.keys())
|
177
|
+
|
178
|
+
def __getitem__(self, key: str) -> Any:
|
179
|
+
return self.additional_properties[key]
|
180
|
+
|
181
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
182
|
+
self.additional_properties[key] = value
|
183
|
+
|
184
|
+
def __delitem__(self, key: str) -> None:
|
185
|
+
del self.additional_properties[key]
|
186
|
+
|
187
|
+
def __contains__(self, key: str) -> bool:
|
188
|
+
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="MCPDefinitionEntrypoint")
|
7
|
+
|
8
|
+
|
9
|
+
@_attrs_define
|
10
|
+
class MCPDefinitionEntrypoint:
|
11
|
+
"""Entrypoint 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
|
+
mcp_definition_entrypoint = cls()
|
27
|
+
|
28
|
+
mcp_definition_entrypoint.additional_properties = d
|
29
|
+
return mcp_definition_entrypoint
|
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="MCPDefinitionForm")
|
7
|
+
|
8
|
+
|
9
|
+
@_attrs_define
|
10
|
+
class MCPDefinitionForm:
|
11
|
+
"""Form 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
|
+
mcp_definition_form = cls()
|
27
|
+
|
28
|
+
mcp_definition_form.additional_properties = d
|
29
|
+
return mcp_definition_form
|
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,139 @@
|
|
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.metadata_labels import MetadataLabels
|
10
|
+
|
11
|
+
|
12
|
+
T = TypeVar("T", bound="Metadata")
|
13
|
+
|
14
|
+
|
15
|
+
@_attrs_define
|
16
|
+
class Metadata:
|
17
|
+
"""Metadata
|
18
|
+
|
19
|
+
Attributes:
|
20
|
+
created_at (Union[Unset, str]): The date and time when the resource was created
|
21
|
+
updated_at (Union[Unset, str]): The date and time when the resource was updated
|
22
|
+
created_by (Union[Unset, str]): The user or service account who created the resource
|
23
|
+
updated_by (Union[Unset, str]): The user or service account who updated the resource
|
24
|
+
display_name (Union[Unset, str]): Model display name
|
25
|
+
labels (Union[Unset, MetadataLabels]): Labels
|
26
|
+
name (Union[Unset, str]): Model name
|
27
|
+
workspace (Union[Unset, str]): Workspace name
|
28
|
+
"""
|
29
|
+
|
30
|
+
created_at: Union[Unset, str] = UNSET
|
31
|
+
updated_at: Union[Unset, str] = UNSET
|
32
|
+
created_by: Union[Unset, str] = UNSET
|
33
|
+
updated_by: Union[Unset, str] = UNSET
|
34
|
+
display_name: Union[Unset, str] = UNSET
|
35
|
+
labels: Union[Unset, "MetadataLabels"] = UNSET
|
36
|
+
name: Union[Unset, str] = UNSET
|
37
|
+
workspace: Union[Unset, str] = 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
|
+
updated_at = self.updated_at
|
44
|
+
|
45
|
+
created_by = self.created_by
|
46
|
+
|
47
|
+
updated_by = self.updated_by
|
48
|
+
|
49
|
+
display_name = self.display_name
|
50
|
+
|
51
|
+
labels: Union[Unset, dict[str, Any]] = UNSET
|
52
|
+
if self.labels and not isinstance(self.labels, Unset) and not isinstance(self.labels, dict):
|
53
|
+
labels = self.labels.to_dict()
|
54
|
+
elif self.labels and isinstance(self.labels, dict):
|
55
|
+
labels = self.labels
|
56
|
+
|
57
|
+
name = self.name
|
58
|
+
|
59
|
+
workspace = self.workspace
|
60
|
+
|
61
|
+
field_dict: dict[str, Any] = {}
|
62
|
+
field_dict.update(self.additional_properties)
|
63
|
+
field_dict.update({})
|
64
|
+
if created_at is not UNSET:
|
65
|
+
field_dict["createdAt"] = created_at
|
66
|
+
if updated_at is not UNSET:
|
67
|
+
field_dict["updatedAt"] = updated_at
|
68
|
+
if created_by is not UNSET:
|
69
|
+
field_dict["createdBy"] = created_by
|
70
|
+
if updated_by is not UNSET:
|
71
|
+
field_dict["updatedBy"] = updated_by
|
72
|
+
if display_name is not UNSET:
|
73
|
+
field_dict["displayName"] = display_name
|
74
|
+
if labels is not UNSET:
|
75
|
+
field_dict["labels"] = labels
|
76
|
+
if name is not UNSET:
|
77
|
+
field_dict["name"] = name
|
78
|
+
if workspace is not UNSET:
|
79
|
+
field_dict["workspace"] = workspace
|
80
|
+
|
81
|
+
return field_dict
|
82
|
+
|
83
|
+
@classmethod
|
84
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
85
|
+
from ..models.metadata_labels import MetadataLabels
|
86
|
+
|
87
|
+
if not src_dict:
|
88
|
+
return None
|
89
|
+
d = src_dict.copy()
|
90
|
+
created_at = d.pop("createdAt", UNSET)
|
91
|
+
|
92
|
+
updated_at = d.pop("updatedAt", UNSET)
|
93
|
+
|
94
|
+
created_by = d.pop("createdBy", UNSET)
|
95
|
+
|
96
|
+
updated_by = d.pop("updatedBy", UNSET)
|
97
|
+
|
98
|
+
display_name = d.pop("displayName", UNSET)
|
99
|
+
|
100
|
+
_labels = d.pop("labels", UNSET)
|
101
|
+
labels: Union[Unset, MetadataLabels]
|
102
|
+
if isinstance(_labels, Unset):
|
103
|
+
labels = UNSET
|
104
|
+
else:
|
105
|
+
labels = MetadataLabels.from_dict(_labels)
|
106
|
+
|
107
|
+
name = d.pop("name", UNSET)
|
108
|
+
|
109
|
+
workspace = d.pop("workspace", UNSET)
|
110
|
+
|
111
|
+
metadata = cls(
|
112
|
+
created_at=created_at,
|
113
|
+
updated_at=updated_at,
|
114
|
+
created_by=created_by,
|
115
|
+
updated_by=updated_by,
|
116
|
+
display_name=display_name,
|
117
|
+
labels=labels,
|
118
|
+
name=name,
|
119
|
+
workspace=workspace,
|
120
|
+
)
|
121
|
+
|
122
|
+
metadata.additional_properties = d
|
123
|
+
return metadata
|
124
|
+
|
125
|
+
@property
|
126
|
+
def additional_keys(self) -> list[str]:
|
127
|
+
return list(self.additional_properties.keys())
|
128
|
+
|
129
|
+
def __getitem__(self, key: str) -> Any:
|
130
|
+
return self.additional_properties[key]
|
131
|
+
|
132
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
133
|
+
self.additional_properties[key] = value
|
134
|
+
|
135
|
+
def __delitem__(self, key: str) -> None:
|
136
|
+
del self.additional_properties[key]
|
137
|
+
|
138
|
+
def __contains__(self, key: str) -> bool:
|
139
|
+
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="MetadataLabels")
|
7
|
+
|
8
|
+
|
9
|
+
@_attrs_define
|
10
|
+
class MetadataLabels:
|
11
|
+
"""Labels"""
|
12
|
+
|
13
|
+
additional_properties: dict[str, str] = _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
|
+
metadata_labels = cls()
|
27
|
+
|
28
|
+
metadata_labels.additional_properties = d
|
29
|
+
return metadata_labels
|
30
|
+
|
31
|
+
@property
|
32
|
+
def additional_keys(self) -> list[str]:
|
33
|
+
return list(self.additional_properties.keys())
|
34
|
+
|
35
|
+
def __getitem__(self, key: str) -> str:
|
36
|
+
return self.additional_properties[key]
|
37
|
+
|
38
|
+
def __setitem__(self, key: str, value: str) -> 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
|
blaxel/models/metric.py
ADDED
@@ -0,0 +1,79 @@
|
|
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="Metric")
|
9
|
+
|
10
|
+
|
11
|
+
@_attrs_define
|
12
|
+
class Metric:
|
13
|
+
"""Metric
|
14
|
+
|
15
|
+
Attributes:
|
16
|
+
rate (Union[Unset, int]): Metric value
|
17
|
+
request_total (Union[Unset, int]): Metric value
|
18
|
+
timestamp (Union[Unset, str]): Metric timestamp
|
19
|
+
"""
|
20
|
+
|
21
|
+
rate: Union[Unset, int] = UNSET
|
22
|
+
request_total: Union[Unset, int] = UNSET
|
23
|
+
timestamp: Union[Unset, str] = UNSET
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
25
|
+
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
27
|
+
rate = self.rate
|
28
|
+
|
29
|
+
request_total = self.request_total
|
30
|
+
|
31
|
+
timestamp = self.timestamp
|
32
|
+
|
33
|
+
field_dict: dict[str, Any] = {}
|
34
|
+
field_dict.update(self.additional_properties)
|
35
|
+
field_dict.update({})
|
36
|
+
if rate is not UNSET:
|
37
|
+
field_dict["rate"] = rate
|
38
|
+
if request_total is not UNSET:
|
39
|
+
field_dict["requestTotal"] = request_total
|
40
|
+
if timestamp is not UNSET:
|
41
|
+
field_dict["timestamp"] = timestamp
|
42
|
+
|
43
|
+
return field_dict
|
44
|
+
|
45
|
+
@classmethod
|
46
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
47
|
+
if not src_dict:
|
48
|
+
return None
|
49
|
+
d = src_dict.copy()
|
50
|
+
rate = d.pop("rate", UNSET)
|
51
|
+
|
52
|
+
request_total = d.pop("requestTotal", UNSET)
|
53
|
+
|
54
|
+
timestamp = d.pop("timestamp", UNSET)
|
55
|
+
|
56
|
+
metric = cls(
|
57
|
+
rate=rate,
|
58
|
+
request_total=request_total,
|
59
|
+
timestamp=timestamp,
|
60
|
+
)
|
61
|
+
|
62
|
+
metric.additional_properties = d
|
63
|
+
return metric
|
64
|
+
|
65
|
+
@property
|
66
|
+
def additional_keys(self) -> list[str]:
|
67
|
+
return list(self.additional_properties.keys())
|
68
|
+
|
69
|
+
def __getitem__(self, key: str) -> Any:
|
70
|
+
return self.additional_properties[key]
|
71
|
+
|
72
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
73
|
+
self.additional_properties[key] = value
|
74
|
+
|
75
|
+
def __delitem__(self, key: str) -> None:
|
76
|
+
del self.additional_properties[key]
|
77
|
+
|
78
|
+
def __contains__(self, key: str) -> bool:
|
79
|
+
return key in self.additional_properties
|