beamlit 0.0.24rc20__py3-none-any.whl → 0.0.25__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- beamlit/agents/chat.py +37 -11
- beamlit/agents/decorator.py +97 -65
- beamlit/api/agents/create_agent.py +9 -14
- beamlit/api/agents/delete_agent.py +22 -1
- beamlit/api/agents/delete_agent_history.py +2 -6
- beamlit/api/agents/get_agent.py +22 -1
- beamlit/api/agents/get_agent_environment_logs.py +11 -11
- beamlit/api/agents/get_agent_history.py +2 -6
- beamlit/api/agents/get_agent_metrics.py +22 -1
- beamlit/api/agents/list_agent_history.py +11 -11
- beamlit/api/agents/list_agents.py +36 -4
- beamlit/api/agents/put_agent_history.py +2 -6
- beamlit/api/agents/update_agent.py +9 -14
- beamlit/api/functions/create_function.py +9 -14
- beamlit/api/functions/delete_function.py +22 -1
- beamlit/api/functions/get_function.py +22 -1
- beamlit/api/functions/get_function_environment_logs.py +11 -11
- beamlit/api/functions/get_function_metrics.py +22 -1
- beamlit/api/functions/list_functions.py +36 -4
- beamlit/api/functions/update_function.py +9 -14
- beamlit/api/history/get_agents_history.py +12 -12
- beamlit/api/history/list_agents_history.py +12 -12
- beamlit/api/integrations/get_integration_connection.py +16 -12
- beamlit/api/integrations/get_integration_connection_model.py +8 -1
- beamlit/api/integrations/get_integration_model.py +8 -1
- beamlit/api/locations/list_locations.py +12 -12
- beamlit/api/models/create_model.py +13 -14
- beamlit/api/models/delete_model.py +22 -1
- beamlit/api/models/get_model.py +22 -1
- beamlit/api/models/get_model_environment_logs.py +11 -11
- beamlit/api/models/get_model_metrics.py +38 -13
- beamlit/api/models/list_models.py +36 -4
- beamlit/api/models/update_model.py +13 -14
- beamlit/api/privateclusters/__init__.py +0 -0
- beamlit/api/{agents/get_agent_deployment_metrics.py → privateclusters/create_private_cluster.py} +28 -55
- beamlit/api/{functions/list_function_deployments.py → privateclusters/delete_private_cluster.py} +38 -37
- beamlit/api/{agents/get_agent_deployment.py → privateclusters/get_private_cluster.py} +40 -44
- beamlit/api/privateclusters/get_private_cluster_health.py +97 -0
- beamlit/api/{agents/list_agent_deployments.py → privateclusters/list_private_clusters.py} +30 -45
- beamlit/api/{models/list_model_deployments.py → privateclusters/update_private_cluster.py} +38 -45
- beamlit/api/privateclusters/update_private_cluster_health.py +97 -0
- beamlit/authentication/device_mode.py +3 -9
- beamlit/common/generate.py +47 -34
- beamlit/common/settings.py +29 -27
- beamlit/deploy/deploy.py +101 -342
- beamlit/deploy/format.py +70 -0
- beamlit/deploy/parser.py +175 -0
- beamlit/functions/decorator.py +8 -11
- beamlit/models/__init__.py +64 -78
- beamlit/models/acl.py +4 -22
- beamlit/models/agent.py +34 -95
- beamlit/models/agent_history.py +7 -5
- beamlit/models/agent_history_event.py +11 -9
- beamlit/models/agent_metadata.py +5 -3
- beamlit/models/agent_spec.py +54 -45
- beamlit/models/api_key.py +14 -14
- beamlit/models/configuration.py +11 -0
- beamlit/models/core_spec.py +45 -32
- beamlit/models/{model_deployment_metrics_query_per_second_per_region_per_code.py → core_spec_configurations.py} +22 -22
- beamlit/models/environment.py +33 -105
- beamlit/models/environment_metadata.py +146 -0
- beamlit/models/environment_spec.py +8 -6
- beamlit/models/function.py +34 -95
- beamlit/models/function_metadata.py +5 -3
- beamlit/models/function_spec.py +53 -40
- beamlit/models/integration_connection.py +31 -137
- beamlit/models/integration_connection_spec.py +6 -4
- beamlit/models/metadata.py +5 -3
- beamlit/models/metadata_labels.py +4 -2
- beamlit/models/model.py +33 -94
- beamlit/models/model_metadata.py +5 -3
- beamlit/models/{function_provider_ref.py → model_private_cluster.py} +23 -14
- beamlit/models/model_provider.py +27 -43
- beamlit/models/model_spec.py +45 -32
- beamlit/models/owner_fields.py +4 -2
- beamlit/models/pending_invitation.py +14 -14
- beamlit/models/pod_template_spec.py +4 -2
- beamlit/models/policy.py +33 -159
- beamlit/models/policy_spec.py +24 -28
- beamlit/models/private_cluster.py +183 -0
- beamlit/models/{model_provider_ref.py → private_location.py} +7 -16
- beamlit/models/resource_deployment_metrics.py +0 -108
- beamlit/models/resource_environment_metrics.py +143 -71
- beamlit/models/{resource_deployment_metrics_inference_per_region.py → resource_environment_metrics_inference_per_region.py} +5 -5
- beamlit/models/resource_environment_metrics_inference_per_second_per_region.py +9 -11
- beamlit/models/{resource_deployment_metrics_query_per_region_per_code.py → resource_environment_metrics_query_per_region_per_code.py} +5 -5
- beamlit/models/resource_environment_metrics_query_per_second_per_region_per_code.py +5 -3
- beamlit/models/resource_log.py +4 -2
- beamlit/models/runtime.py +20 -2
- beamlit/models/serverless_config.py +28 -21
- beamlit/models/spec_configuration.py +7 -5
- beamlit/models/store_agent.py +14 -14
- beamlit/models/store_function.py +14 -14
- beamlit/models/time_fields.py +4 -2
- beamlit/models/websocket_channel.py +4 -2
- beamlit/models/workspace.py +23 -14
- beamlit/run.py +0 -1
- beamlit/serve/app.py +1 -0
- beamlit/serve/middlewares/accesslog.py +3 -1
- {beamlit-0.0.24rc20.dist-info → beamlit-0.0.25.dist-info}/METADATA +1 -1
- beamlit-0.0.25.dist-info/RECORD +243 -0
- beamlit/api/agents/delete_agent_deployment.py +0 -163
- beamlit/api/agents/delete_agent_deployment_history.py +0 -172
- beamlit/api/agents/get_agent_deployment_history.py +0 -172
- beamlit/api/agents/get_agent_deployment_logs.py +0 -164
- beamlit/api/agents/list_agent_deployment_history.py +0 -164
- beamlit/api/agents/put_agent_deployment.py +0 -185
- beamlit/api/agents/put_agent_deployment_history.py +0 -198
- beamlit/api/functions/delete_function_deployment.py +0 -163
- beamlit/api/functions/get_function_deployment.py +0 -163
- beamlit/api/functions/get_function_deployment_logs.py +0 -164
- beamlit/api/functions/get_function_deployment_metrics.py +0 -159
- beamlit/api/functions/put_function_deployment.py +0 -185
- beamlit/api/models/delete_model_deployment.py +0 -171
- beamlit/api/models/get_model_deployment.py +0 -171
- beamlit/api/models/get_model_deployment_logs.py +0 -168
- beamlit/api/models/get_model_deployment_metrics.py +0 -163
- beamlit/api/models/put_model_deployment.py +0 -193
- beamlit/models/agent_configuration.py +0 -70
- beamlit/models/agent_deployment.py +0 -340
- beamlit/models/agent_deployment_configuration.py +0 -45
- beamlit/models/agent_deployment_configuration_type_0.py +0 -43
- beamlit/models/agent_deployment_history.py +0 -185
- beamlit/models/agent_deployment_history_event.py +0 -133
- beamlit/models/agent_deployment_pod_template.py +0 -45
- beamlit/models/agent_deployment_pod_template_type_0.py +0 -43
- beamlit/models/agent_with_deployments.py +0 -176
- beamlit/models/authentication_provider_model.py +0 -144
- beamlit/models/authentication_provider_organization.py +0 -88
- beamlit/models/deployment_configuration.py +0 -70
- beamlit/models/deployment_configurations.py +0 -58
- beamlit/models/deployment_serverless_config.py +0 -131
- beamlit/models/deployment_serverless_config_type_0.py +0 -220
- beamlit/models/function_configuration.py +0 -70
- beamlit/models/function_deployment.py +0 -340
- beamlit/models/function_deployment_configuration.py +0 -45
- beamlit/models/function_deployment_configuration_type_0.py +0 -43
- beamlit/models/function_deployment_pod_template.py +0 -45
- beamlit/models/function_deployment_pod_template_type_0.py +0 -43
- beamlit/models/function_with_deployments.py +0 -176
- beamlit/models/integration.py +0 -198
- beamlit/models/integration_config.py +0 -45
- beamlit/models/integration_secret.py +0 -61
- beamlit/models/labels_type_0.py +0 -45
- beamlit/models/location.py +0 -122
- beamlit/models/model_deployment.py +0 -296
- beamlit/models/model_deployment_log.py +0 -70
- beamlit/models/model_deployment_metrics.py +0 -172
- beamlit/models/model_deployment_metrics_inference_per_second_per_region.py +0 -77
- beamlit/models/model_deployment_pod_template.py +0 -45
- beamlit/models/model_deployment_pod_template_type_0.py +0 -43
- beamlit/models/model_metrics.py +0 -96
- beamlit/models/model_with_deployments.py +0 -176
- beamlit/models/resource_deployment_log.py +0 -70
- beamlit/models/resource_deployment_metrics_inference_per_region_type_0.py +0 -79
- beamlit/models/resource_deployment_metrics_inference_per_second_per_region_type_0.py +0 -79
- beamlit/models/resource_deployment_metrics_query_per_region_per_code_type_0.py +0 -73
- beamlit/models/resource_deployment_metrics_query_per_second_per_region_per_code_type_0.py +0 -73
- beamlit/models/runtime_readiness_probe_type_0.py +0 -43
- beamlit/models/runtime_type_0.py +0 -111
- beamlit/models/runtime_type_0_readiness_probe.py +0 -43
- beamlit/models/runtime_type_0_readiness_probe_type_0.py +0 -43
- beamlit/models/runtime_type_0_resources.py +0 -59
- beamlit/models/standard_fields_dynamo_db.py +0 -88
- beamlit/models/store_agent_configuration.py +0 -97
- beamlit/models/store_agent_labels_type_0.py +0 -43
- beamlit/models/store_function_configuration.py +0 -97
- beamlit/models/store_function_labels_type_0.py +0 -43
- beamlit-0.0.24rc20.dist-info/RECORD +0 -303
- {beamlit-0.0.24rc20.dist-info → beamlit-0.0.25.dist-info}/WHEEL +0 -0
@@ -6,15 +6,24 @@ import httpx
|
|
6
6
|
from ... import errors
|
7
7
|
from ...client import AuthenticatedClient, Client
|
8
8
|
from ...models.model import Model
|
9
|
-
from ...types import Response
|
9
|
+
from ...types import UNSET, Response
|
10
10
|
|
11
11
|
|
12
12
|
def _get_kwargs(
|
13
13
|
model_name: str,
|
14
|
+
*,
|
15
|
+
environment: str,
|
14
16
|
) -> dict[str, Any]:
|
17
|
+
params: dict[str, Any] = {}
|
18
|
+
|
19
|
+
params["environment"] = environment
|
20
|
+
|
21
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
22
|
+
|
15
23
|
_kwargs: dict[str, Any] = {
|
16
24
|
"method": "delete",
|
17
25
|
"url": f"/models/{model_name}",
|
26
|
+
"params": params,
|
18
27
|
}
|
19
28
|
|
20
29
|
return _kwargs
|
@@ -44,6 +53,7 @@ def sync_detailed(
|
|
44
53
|
model_name: str,
|
45
54
|
*,
|
46
55
|
client: AuthenticatedClient,
|
56
|
+
environment: str,
|
47
57
|
) -> Response[Model]:
|
48
58
|
"""Delete model
|
49
59
|
|
@@ -51,6 +61,7 @@ def sync_detailed(
|
|
51
61
|
|
52
62
|
Args:
|
53
63
|
model_name (str):
|
64
|
+
environment (str):
|
54
65
|
|
55
66
|
Raises:
|
56
67
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
@@ -62,6 +73,7 @@ def sync_detailed(
|
|
62
73
|
|
63
74
|
kwargs = _get_kwargs(
|
64
75
|
model_name=model_name,
|
76
|
+
environment=environment,
|
65
77
|
)
|
66
78
|
|
67
79
|
response = client.get_httpx_client().request(
|
@@ -75,6 +87,7 @@ def sync(
|
|
75
87
|
model_name: str,
|
76
88
|
*,
|
77
89
|
client: AuthenticatedClient,
|
90
|
+
environment: str,
|
78
91
|
) -> Optional[Model]:
|
79
92
|
"""Delete model
|
80
93
|
|
@@ -82,6 +95,7 @@ def sync(
|
|
82
95
|
|
83
96
|
Args:
|
84
97
|
model_name (str):
|
98
|
+
environment (str):
|
85
99
|
|
86
100
|
Raises:
|
87
101
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
@@ -94,6 +108,7 @@ def sync(
|
|
94
108
|
return sync_detailed(
|
95
109
|
model_name=model_name,
|
96
110
|
client=client,
|
111
|
+
environment=environment,
|
97
112
|
).parsed
|
98
113
|
|
99
114
|
|
@@ -101,6 +116,7 @@ async def asyncio_detailed(
|
|
101
116
|
model_name: str,
|
102
117
|
*,
|
103
118
|
client: AuthenticatedClient,
|
119
|
+
environment: str,
|
104
120
|
) -> Response[Model]:
|
105
121
|
"""Delete model
|
106
122
|
|
@@ -108,6 +124,7 @@ async def asyncio_detailed(
|
|
108
124
|
|
109
125
|
Args:
|
110
126
|
model_name (str):
|
127
|
+
environment (str):
|
111
128
|
|
112
129
|
Raises:
|
113
130
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
@@ -119,6 +136,7 @@ async def asyncio_detailed(
|
|
119
136
|
|
120
137
|
kwargs = _get_kwargs(
|
121
138
|
model_name=model_name,
|
139
|
+
environment=environment,
|
122
140
|
)
|
123
141
|
|
124
142
|
response = await client.get_async_httpx_client().request(**kwargs)
|
@@ -130,6 +148,7 @@ async def asyncio(
|
|
130
148
|
model_name: str,
|
131
149
|
*,
|
132
150
|
client: AuthenticatedClient,
|
151
|
+
environment: str,
|
133
152
|
) -> Optional[Model]:
|
134
153
|
"""Delete model
|
135
154
|
|
@@ -137,6 +156,7 @@ async def asyncio(
|
|
137
156
|
|
138
157
|
Args:
|
139
158
|
model_name (str):
|
159
|
+
environment (str):
|
140
160
|
|
141
161
|
Raises:
|
142
162
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
@@ -150,5 +170,6 @@ async def asyncio(
|
|
150
170
|
await asyncio_detailed(
|
151
171
|
model_name=model_name,
|
152
172
|
client=client,
|
173
|
+
environment=environment,
|
153
174
|
)
|
154
175
|
).parsed
|
beamlit/api/models/get_model.py
CHANGED
@@ -6,15 +6,24 @@ import httpx
|
|
6
6
|
from ... import errors
|
7
7
|
from ...client import AuthenticatedClient, Client
|
8
8
|
from ...models.model import Model
|
9
|
-
from ...types import Response
|
9
|
+
from ...types import UNSET, Response, Unset
|
10
10
|
|
11
11
|
|
12
12
|
def _get_kwargs(
|
13
13
|
model_name: str,
|
14
|
+
*,
|
15
|
+
environment: Union[Unset, str] = UNSET,
|
14
16
|
) -> dict[str, Any]:
|
17
|
+
params: dict[str, Any] = {}
|
18
|
+
|
19
|
+
params["environment"] = environment
|
20
|
+
|
21
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
22
|
+
|
15
23
|
_kwargs: dict[str, Any] = {
|
16
24
|
"method": "get",
|
17
25
|
"url": f"/models/{model_name}",
|
26
|
+
"params": params,
|
18
27
|
}
|
19
28
|
|
20
29
|
return _kwargs
|
@@ -44,6 +53,7 @@ def sync_detailed(
|
|
44
53
|
model_name: str,
|
45
54
|
*,
|
46
55
|
client: AuthenticatedClient,
|
56
|
+
environment: Union[Unset, str] = UNSET,
|
47
57
|
) -> Response[Model]:
|
48
58
|
"""Get model
|
49
59
|
|
@@ -51,6 +61,7 @@ def sync_detailed(
|
|
51
61
|
|
52
62
|
Args:
|
53
63
|
model_name (str):
|
64
|
+
environment (Union[Unset, str]):
|
54
65
|
|
55
66
|
Raises:
|
56
67
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
@@ -62,6 +73,7 @@ def sync_detailed(
|
|
62
73
|
|
63
74
|
kwargs = _get_kwargs(
|
64
75
|
model_name=model_name,
|
76
|
+
environment=environment,
|
65
77
|
)
|
66
78
|
|
67
79
|
response = client.get_httpx_client().request(
|
@@ -75,6 +87,7 @@ def sync(
|
|
75
87
|
model_name: str,
|
76
88
|
*,
|
77
89
|
client: AuthenticatedClient,
|
90
|
+
environment: Union[Unset, str] = UNSET,
|
78
91
|
) -> Optional[Model]:
|
79
92
|
"""Get model
|
80
93
|
|
@@ -82,6 +95,7 @@ def sync(
|
|
82
95
|
|
83
96
|
Args:
|
84
97
|
model_name (str):
|
98
|
+
environment (Union[Unset, str]):
|
85
99
|
|
86
100
|
Raises:
|
87
101
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
@@ -94,6 +108,7 @@ def sync(
|
|
94
108
|
return sync_detailed(
|
95
109
|
model_name=model_name,
|
96
110
|
client=client,
|
111
|
+
environment=environment,
|
97
112
|
).parsed
|
98
113
|
|
99
114
|
|
@@ -101,6 +116,7 @@ async def asyncio_detailed(
|
|
101
116
|
model_name: str,
|
102
117
|
*,
|
103
118
|
client: AuthenticatedClient,
|
119
|
+
environment: Union[Unset, str] = UNSET,
|
104
120
|
) -> Response[Model]:
|
105
121
|
"""Get model
|
106
122
|
|
@@ -108,6 +124,7 @@ async def asyncio_detailed(
|
|
108
124
|
|
109
125
|
Args:
|
110
126
|
model_name (str):
|
127
|
+
environment (Union[Unset, str]):
|
111
128
|
|
112
129
|
Raises:
|
113
130
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
@@ -119,6 +136,7 @@ async def asyncio_detailed(
|
|
119
136
|
|
120
137
|
kwargs = _get_kwargs(
|
121
138
|
model_name=model_name,
|
139
|
+
environment=environment,
|
122
140
|
)
|
123
141
|
|
124
142
|
response = await client.get_async_httpx_client().request(**kwargs)
|
@@ -130,6 +148,7 @@ async def asyncio(
|
|
130
148
|
model_name: str,
|
131
149
|
*,
|
132
150
|
client: AuthenticatedClient,
|
151
|
+
environment: Union[Unset, str] = UNSET,
|
133
152
|
) -> Optional[Model]:
|
134
153
|
"""Get model
|
135
154
|
|
@@ -137,6 +156,7 @@ async def asyncio(
|
|
137
156
|
|
138
157
|
Args:
|
139
158
|
model_name (str):
|
159
|
+
environment (Union[Unset, str]):
|
140
160
|
|
141
161
|
Raises:
|
142
162
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
@@ -150,5 +170,6 @@ async def asyncio(
|
|
150
170
|
await asyncio_detailed(
|
151
171
|
model_name=model_name,
|
152
172
|
client=client,
|
173
|
+
environment=environment,
|
153
174
|
)
|
154
175
|
).parsed
|
@@ -1,5 +1,5 @@
|
|
1
1
|
from http import HTTPStatus
|
2
|
-
from typing import Any,
|
2
|
+
from typing import Any, Optional, Union
|
3
3
|
|
4
4
|
import httpx
|
5
5
|
|
@@ -22,7 +22,7 @@ def _get_kwargs(
|
|
22
22
|
|
23
23
|
def _parse_response(
|
24
24
|
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
25
|
-
) -> Optional[
|
25
|
+
) -> Optional[list["ResourceLog"]]:
|
26
26
|
if response.status_code == 200:
|
27
27
|
response_200 = []
|
28
28
|
_response_200 = response.json()
|
@@ -40,7 +40,7 @@ def _parse_response(
|
|
40
40
|
|
41
41
|
def _build_response(
|
42
42
|
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
43
|
-
) -> Response[
|
43
|
+
) -> Response[list["ResourceLog"]]:
|
44
44
|
return Response(
|
45
45
|
status_code=HTTPStatus(response.status_code),
|
46
46
|
content=response.content,
|
@@ -53,7 +53,7 @@ def sync_detailed(
|
|
53
53
|
model_name: str,
|
54
54
|
*,
|
55
55
|
client: AuthenticatedClient,
|
56
|
-
) -> Response[
|
56
|
+
) -> Response[list["ResourceLog"]]:
|
57
57
|
"""Returns logs for a model deployment by name.
|
58
58
|
|
59
59
|
Args:
|
@@ -64,7 +64,7 @@ def sync_detailed(
|
|
64
64
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
65
65
|
|
66
66
|
Returns:
|
67
|
-
Response[
|
67
|
+
Response[list['ResourceLog']]
|
68
68
|
"""
|
69
69
|
|
70
70
|
kwargs = _get_kwargs(
|
@@ -82,7 +82,7 @@ def sync(
|
|
82
82
|
model_name: str,
|
83
83
|
*,
|
84
84
|
client: AuthenticatedClient,
|
85
|
-
) -> Optional[
|
85
|
+
) -> Optional[list["ResourceLog"]]:
|
86
86
|
"""Returns logs for a model deployment by name.
|
87
87
|
|
88
88
|
Args:
|
@@ -93,7 +93,7 @@ def sync(
|
|
93
93
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
94
94
|
|
95
95
|
Returns:
|
96
|
-
|
96
|
+
list['ResourceLog']
|
97
97
|
"""
|
98
98
|
|
99
99
|
return sync_detailed(
|
@@ -106,7 +106,7 @@ async def asyncio_detailed(
|
|
106
106
|
model_name: str,
|
107
107
|
*,
|
108
108
|
client: AuthenticatedClient,
|
109
|
-
) -> Response[
|
109
|
+
) -> Response[list["ResourceLog"]]:
|
110
110
|
"""Returns logs for a model deployment by name.
|
111
111
|
|
112
112
|
Args:
|
@@ -117,7 +117,7 @@ async def asyncio_detailed(
|
|
117
117
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
118
118
|
|
119
119
|
Returns:
|
120
|
-
Response[
|
120
|
+
Response[list['ResourceLog']]
|
121
121
|
"""
|
122
122
|
|
123
123
|
kwargs = _get_kwargs(
|
@@ -133,7 +133,7 @@ async def asyncio(
|
|
133
133
|
model_name: str,
|
134
134
|
*,
|
135
135
|
client: AuthenticatedClient,
|
136
|
-
) -> Optional[
|
136
|
+
) -> Optional[list["ResourceLog"]]:
|
137
137
|
"""Returns logs for a model deployment by name.
|
138
138
|
|
139
139
|
Args:
|
@@ -144,7 +144,7 @@ async def asyncio(
|
|
144
144
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
145
145
|
|
146
146
|
Returns:
|
147
|
-
|
147
|
+
list['ResourceLog']
|
148
148
|
"""
|
149
149
|
|
150
150
|
return (
|
@@ -5,24 +5,35 @@ import httpx
|
|
5
5
|
|
6
6
|
from ... import errors
|
7
7
|
from ...client import AuthenticatedClient, Client
|
8
|
-
from ...models.
|
9
|
-
from ...types import Response
|
8
|
+
from ...models.resource_metrics import ResourceMetrics
|
9
|
+
from ...types import UNSET, Response, Unset
|
10
10
|
|
11
11
|
|
12
12
|
def _get_kwargs(
|
13
13
|
model_name: str,
|
14
|
+
*,
|
15
|
+
environment: Union[Unset, str] = UNSET,
|
14
16
|
) -> dict[str, Any]:
|
17
|
+
params: dict[str, Any] = {}
|
18
|
+
|
19
|
+
params["environment"] = environment
|
20
|
+
|
21
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
22
|
+
|
15
23
|
_kwargs: dict[str, Any] = {
|
16
24
|
"method": "get",
|
17
25
|
"url": f"/models/{model_name}/metrics",
|
26
|
+
"params": params,
|
18
27
|
}
|
19
28
|
|
20
29
|
return _kwargs
|
21
30
|
|
22
31
|
|
23
|
-
def _parse_response(
|
32
|
+
def _parse_response(
|
33
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
34
|
+
) -> Optional[ResourceMetrics]:
|
24
35
|
if response.status_code == 200:
|
25
|
-
response_200 =
|
36
|
+
response_200 = ResourceMetrics.from_dict(response.json())
|
26
37
|
|
27
38
|
return response_200
|
28
39
|
if client.raise_on_unexpected_status:
|
@@ -31,7 +42,9 @@ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: htt
|
|
31
42
|
return None
|
32
43
|
|
33
44
|
|
34
|
-
def _build_response(
|
45
|
+
def _build_response(
|
46
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
47
|
+
) -> Response[ResourceMetrics]:
|
35
48
|
return Response(
|
36
49
|
status_code=HTTPStatus(response.status_code),
|
37
50
|
content=response.content,
|
@@ -44,24 +57,27 @@ def sync_detailed(
|
|
44
57
|
model_name: str,
|
45
58
|
*,
|
46
59
|
client: AuthenticatedClient,
|
47
|
-
|
60
|
+
environment: Union[Unset, str] = UNSET,
|
61
|
+
) -> Response[ResourceMetrics]:
|
48
62
|
"""Get model metrics
|
49
63
|
|
50
64
|
Returns metrics for a model by name.
|
51
65
|
|
52
66
|
Args:
|
53
67
|
model_name (str):
|
68
|
+
environment (Union[Unset, str]):
|
54
69
|
|
55
70
|
Raises:
|
56
71
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
57
72
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
58
73
|
|
59
74
|
Returns:
|
60
|
-
Response[
|
75
|
+
Response[ResourceMetrics]
|
61
76
|
"""
|
62
77
|
|
63
78
|
kwargs = _get_kwargs(
|
64
79
|
model_name=model_name,
|
80
|
+
environment=environment,
|
65
81
|
)
|
66
82
|
|
67
83
|
response = client.get_httpx_client().request(
|
@@ -75,25 +91,28 @@ def sync(
|
|
75
91
|
model_name: str,
|
76
92
|
*,
|
77
93
|
client: AuthenticatedClient,
|
78
|
-
|
94
|
+
environment: Union[Unset, str] = UNSET,
|
95
|
+
) -> Optional[ResourceMetrics]:
|
79
96
|
"""Get model metrics
|
80
97
|
|
81
98
|
Returns metrics for a model by name.
|
82
99
|
|
83
100
|
Args:
|
84
101
|
model_name (str):
|
102
|
+
environment (Union[Unset, str]):
|
85
103
|
|
86
104
|
Raises:
|
87
105
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
88
106
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
89
107
|
|
90
108
|
Returns:
|
91
|
-
|
109
|
+
ResourceMetrics
|
92
110
|
"""
|
93
111
|
|
94
112
|
return sync_detailed(
|
95
113
|
model_name=model_name,
|
96
114
|
client=client,
|
115
|
+
environment=environment,
|
97
116
|
).parsed
|
98
117
|
|
99
118
|
|
@@ -101,24 +120,27 @@ async def asyncio_detailed(
|
|
101
120
|
model_name: str,
|
102
121
|
*,
|
103
122
|
client: AuthenticatedClient,
|
104
|
-
|
123
|
+
environment: Union[Unset, str] = UNSET,
|
124
|
+
) -> Response[ResourceMetrics]:
|
105
125
|
"""Get model metrics
|
106
126
|
|
107
127
|
Returns metrics for a model by name.
|
108
128
|
|
109
129
|
Args:
|
110
130
|
model_name (str):
|
131
|
+
environment (Union[Unset, str]):
|
111
132
|
|
112
133
|
Raises:
|
113
134
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
114
135
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
115
136
|
|
116
137
|
Returns:
|
117
|
-
Response[
|
138
|
+
Response[ResourceMetrics]
|
118
139
|
"""
|
119
140
|
|
120
141
|
kwargs = _get_kwargs(
|
121
142
|
model_name=model_name,
|
143
|
+
environment=environment,
|
122
144
|
)
|
123
145
|
|
124
146
|
response = await client.get_async_httpx_client().request(**kwargs)
|
@@ -130,25 +152,28 @@ async def asyncio(
|
|
130
152
|
model_name: str,
|
131
153
|
*,
|
132
154
|
client: AuthenticatedClient,
|
133
|
-
|
155
|
+
environment: Union[Unset, str] = UNSET,
|
156
|
+
) -> Optional[ResourceMetrics]:
|
134
157
|
"""Get model metrics
|
135
158
|
|
136
159
|
Returns metrics for a model by name.
|
137
160
|
|
138
161
|
Args:
|
139
162
|
model_name (str):
|
163
|
+
environment (Union[Unset, str]):
|
140
164
|
|
141
165
|
Raises:
|
142
166
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
143
167
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
144
168
|
|
145
169
|
Returns:
|
146
|
-
|
170
|
+
ResourceMetrics
|
147
171
|
"""
|
148
172
|
|
149
173
|
return (
|
150
174
|
await asyncio_detailed(
|
151
175
|
model_name=model_name,
|
152
176
|
client=client,
|
177
|
+
environment=environment,
|
153
178
|
)
|
154
179
|
).parsed
|
@@ -6,13 +6,23 @@ import httpx
|
|
6
6
|
from ... import errors
|
7
7
|
from ...client import AuthenticatedClient, Client
|
8
8
|
from ...models.model import Model
|
9
|
-
from ...types import Response
|
9
|
+
from ...types import UNSET, Response, Unset
|
10
10
|
|
11
11
|
|
12
|
-
def _get_kwargs(
|
12
|
+
def _get_kwargs(
|
13
|
+
*,
|
14
|
+
environment: Union[Unset, str] = UNSET,
|
15
|
+
) -> dict[str, Any]:
|
16
|
+
params: dict[str, Any] = {}
|
17
|
+
|
18
|
+
params["environment"] = environment
|
19
|
+
|
20
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
21
|
+
|
13
22
|
_kwargs: dict[str, Any] = {
|
14
23
|
"method": "get",
|
15
24
|
"url": "/models",
|
25
|
+
"params": params,
|
16
26
|
}
|
17
27
|
|
18
28
|
return _kwargs
|
@@ -46,11 +56,15 @@ def _build_response(*, client: Union[AuthenticatedClient, Client], response: htt
|
|
46
56
|
def sync_detailed(
|
47
57
|
*,
|
48
58
|
client: AuthenticatedClient,
|
59
|
+
environment: Union[Unset, str] = UNSET,
|
49
60
|
) -> Response[list["Model"]]:
|
50
61
|
"""List models
|
51
62
|
|
52
63
|
Returns a list of all models in the workspace.
|
53
64
|
|
65
|
+
Args:
|
66
|
+
environment (Union[Unset, str]):
|
67
|
+
|
54
68
|
Raises:
|
55
69
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
56
70
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
@@ -59,7 +73,9 @@ def sync_detailed(
|
|
59
73
|
Response[list['Model']]
|
60
74
|
"""
|
61
75
|
|
62
|
-
kwargs = _get_kwargs(
|
76
|
+
kwargs = _get_kwargs(
|
77
|
+
environment=environment,
|
78
|
+
)
|
63
79
|
|
64
80
|
response = client.get_httpx_client().request(
|
65
81
|
**kwargs,
|
@@ -71,11 +87,15 @@ def sync_detailed(
|
|
71
87
|
def sync(
|
72
88
|
*,
|
73
89
|
client: AuthenticatedClient,
|
90
|
+
environment: Union[Unset, str] = UNSET,
|
74
91
|
) -> Optional[list["Model"]]:
|
75
92
|
"""List models
|
76
93
|
|
77
94
|
Returns a list of all models in the workspace.
|
78
95
|
|
96
|
+
Args:
|
97
|
+
environment (Union[Unset, str]):
|
98
|
+
|
79
99
|
Raises:
|
80
100
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
81
101
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
@@ -86,17 +106,22 @@ def sync(
|
|
86
106
|
|
87
107
|
return sync_detailed(
|
88
108
|
client=client,
|
109
|
+
environment=environment,
|
89
110
|
).parsed
|
90
111
|
|
91
112
|
|
92
113
|
async def asyncio_detailed(
|
93
114
|
*,
|
94
115
|
client: AuthenticatedClient,
|
116
|
+
environment: Union[Unset, str] = UNSET,
|
95
117
|
) -> Response[list["Model"]]:
|
96
118
|
"""List models
|
97
119
|
|
98
120
|
Returns a list of all models in the workspace.
|
99
121
|
|
122
|
+
Args:
|
123
|
+
environment (Union[Unset, str]):
|
124
|
+
|
100
125
|
Raises:
|
101
126
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
102
127
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
@@ -105,7 +130,9 @@ async def asyncio_detailed(
|
|
105
130
|
Response[list['Model']]
|
106
131
|
"""
|
107
132
|
|
108
|
-
kwargs = _get_kwargs(
|
133
|
+
kwargs = _get_kwargs(
|
134
|
+
environment=environment,
|
135
|
+
)
|
109
136
|
|
110
137
|
response = await client.get_async_httpx_client().request(**kwargs)
|
111
138
|
|
@@ -115,11 +142,15 @@ async def asyncio_detailed(
|
|
115
142
|
async def asyncio(
|
116
143
|
*,
|
117
144
|
client: AuthenticatedClient,
|
145
|
+
environment: Union[Unset, str] = UNSET,
|
118
146
|
) -> Optional[list["Model"]]:
|
119
147
|
"""List models
|
120
148
|
|
121
149
|
Returns a list of all models in the workspace.
|
122
150
|
|
151
|
+
Args:
|
152
|
+
environment (Union[Unset, str]):
|
153
|
+
|
123
154
|
Raises:
|
124
155
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
125
156
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
@@ -131,5 +162,6 @@ async def asyncio(
|
|
131
162
|
return (
|
132
163
|
await asyncio_detailed(
|
133
164
|
client=client,
|
165
|
+
environment=environment,
|
134
166
|
)
|
135
167
|
).parsed
|