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.
- 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 +17 -14
- 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.24rc19.dist-info → beamlit-0.0.24rc21.dist-info}/METADATA +1 -1
- beamlit-0.0.24rc21.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.24rc19.dist-info/RECORD +0 -303
- {beamlit-0.0.24rc19.dist-info → beamlit-0.0.24rc21.dist-info}/WHEEL +0 -0
beamlit/deploy/parser.py
ADDED
@@ -0,0 +1,175 @@
|
|
1
|
+
import ast
|
2
|
+
import importlib
|
3
|
+
import os
|
4
|
+
from dataclasses import dataclass
|
5
|
+
from logging import getLogger
|
6
|
+
from typing import Callable, Literal
|
7
|
+
|
8
|
+
from beamlit.models import StoreFunctionParameter
|
9
|
+
|
10
|
+
@dataclass
|
11
|
+
class Resource:
|
12
|
+
type: Literal["agent", "function"]
|
13
|
+
module: Callable
|
14
|
+
name: str
|
15
|
+
decorator: ast.Call
|
16
|
+
func: Callable
|
17
|
+
|
18
|
+
|
19
|
+
def get_resources(from_decorator, dir="src") -> list[Resource]:
|
20
|
+
"""
|
21
|
+
Scans through Python files in a directory to find functions decorated with a specific decorator.
|
22
|
+
|
23
|
+
Args:
|
24
|
+
from_decorator (str): The name of the decorator to search for
|
25
|
+
dir (str): The directory to scan, defaults to "src"
|
26
|
+
|
27
|
+
Returns:
|
28
|
+
list[Resource]: List of Resource objects containing information about decorated functions
|
29
|
+
"""
|
30
|
+
resources = []
|
31
|
+
logger = getLogger(__name__)
|
32
|
+
|
33
|
+
# Walk through all Python files in resources directory and subdirectories
|
34
|
+
for root, _, files in os.walk(dir):
|
35
|
+
for file in files:
|
36
|
+
if file.endswith(".py"):
|
37
|
+
file_path = os.path.join(root, file)
|
38
|
+
# Read and compile the file content
|
39
|
+
with open(file_path) as f:
|
40
|
+
try:
|
41
|
+
file_content = f.read()
|
42
|
+
# Parse the file content to find decorated resources
|
43
|
+
tree = ast.parse(file_content)
|
44
|
+
|
45
|
+
# Look for function definitions with decorators
|
46
|
+
for node in ast.walk(tree):
|
47
|
+
if (
|
48
|
+
not isinstance(node, ast.FunctionDef)
|
49
|
+
and not isinstance(node, ast.AsyncFunctionDef)
|
50
|
+
) or len(node.decorator_list) == 0:
|
51
|
+
continue
|
52
|
+
decorator = node.decorator_list[0]
|
53
|
+
|
54
|
+
decorator_name = ""
|
55
|
+
if isinstance(decorator, ast.Call):
|
56
|
+
decorator_name = decorator.func.id
|
57
|
+
if isinstance(decorator, ast.Name):
|
58
|
+
decorator_name = decorator.id
|
59
|
+
if decorator_name == from_decorator:
|
60
|
+
# Get the function name and decorator name
|
61
|
+
func_name = node.name
|
62
|
+
|
63
|
+
# Import the module to get the actual function
|
64
|
+
spec = importlib.util.spec_from_file_location(func_name, file_path)
|
65
|
+
module = importlib.util.module_from_spec(spec)
|
66
|
+
spec.loader.exec_module(module)
|
67
|
+
|
68
|
+
# Check if kit=True in the decorator arguments
|
69
|
+
|
70
|
+
# Get the decorated function
|
71
|
+
if hasattr(module, func_name) and isinstance(decorator, ast.Call):
|
72
|
+
resources.append(
|
73
|
+
Resource(
|
74
|
+
type=decorator_name,
|
75
|
+
module=module,
|
76
|
+
name=func_name,
|
77
|
+
func=getattr(module, func_name),
|
78
|
+
decorator=decorator,
|
79
|
+
)
|
80
|
+
)
|
81
|
+
except Exception as e:
|
82
|
+
logger.warning(f"Error processing {file_path}: {e!s} at line {e.__traceback__.tb_lineno}")
|
83
|
+
return resources
|
84
|
+
|
85
|
+
|
86
|
+
def get_parameters(resource: Resource) -> list[StoreFunctionParameter]:
|
87
|
+
"""
|
88
|
+
Extracts parameter information from a function's signature and docstring.
|
89
|
+
|
90
|
+
Args:
|
91
|
+
resource (Resource): The resource object containing the function to analyze
|
92
|
+
|
93
|
+
Returns:
|
94
|
+
list[StoreFunctionParameter]: List of parameter objects with name, type, required status, and description
|
95
|
+
"""
|
96
|
+
parameters = []
|
97
|
+
# Get function signature
|
98
|
+
import inspect
|
99
|
+
|
100
|
+
sig = inspect.signature(resource.func)
|
101
|
+
# Get docstring for parameter descriptions
|
102
|
+
docstring = inspect.getdoc(resource.func)
|
103
|
+
param_descriptions = {}
|
104
|
+
if docstring:
|
105
|
+
# Parse docstring for parameter descriptions
|
106
|
+
lines = docstring.split("\n")
|
107
|
+
for line in lines:
|
108
|
+
line = line.strip().lower()
|
109
|
+
if line.startswith(":param "):
|
110
|
+
# Extract parameter name and description
|
111
|
+
param_line = line[7:].split(":", 1)
|
112
|
+
if len(param_line) == 2:
|
113
|
+
param_name = param_line[0].strip()
|
114
|
+
param_desc = param_line[1].strip()
|
115
|
+
param_descriptions[param_name] = param_desc
|
116
|
+
for name, param in sig.parameters.items():
|
117
|
+
# Skip *args and **kwargs parameters
|
118
|
+
if param.kind in (inspect.Parameter.VAR_POSITIONAL, inspect.Parameter.VAR_KEYWORD):
|
119
|
+
continue
|
120
|
+
|
121
|
+
param_type = "string" # Default type
|
122
|
+
type_mapping = {
|
123
|
+
"str": "string",
|
124
|
+
"int": "integer",
|
125
|
+
"float": "number",
|
126
|
+
"bool": "boolean",
|
127
|
+
"list": "array",
|
128
|
+
"dict": "object",
|
129
|
+
"none": "null",
|
130
|
+
}
|
131
|
+
if param.annotation != inspect.Parameter.empty:
|
132
|
+
# Map Python types to OpenAPI types
|
133
|
+
if hasattr(param.annotation, "__name__"):
|
134
|
+
param_type = param.annotation.__name__.lower()
|
135
|
+
else:
|
136
|
+
# Handle special types like Union, Optional etc
|
137
|
+
param_type = str(param.annotation).lower()
|
138
|
+
parameter = StoreFunctionParameter(
|
139
|
+
name=name,
|
140
|
+
type_=type_mapping.get(param_type, "string"),
|
141
|
+
required=param.default == inspect.Parameter.empty,
|
142
|
+
description=param_descriptions.get(name, f"Parameter {name}"),
|
143
|
+
)
|
144
|
+
parameters.append(parameter)
|
145
|
+
|
146
|
+
return parameters
|
147
|
+
|
148
|
+
|
149
|
+
def get_description(description: str | None, resource: Resource) -> str:
|
150
|
+
"""
|
151
|
+
Gets the description of a function from either a provided description or the function's docstring.
|
152
|
+
|
153
|
+
Args:
|
154
|
+
description (str | None): Optional explicit description
|
155
|
+
resource (Resource): The resource object containing the function
|
156
|
+
|
157
|
+
Returns:
|
158
|
+
str: The function description
|
159
|
+
"""
|
160
|
+
if description:
|
161
|
+
return description
|
162
|
+
doc = resource.func.__doc__
|
163
|
+
if doc:
|
164
|
+
# Split docstring into sections and get only the description part
|
165
|
+
doc_lines = doc.split("\n")
|
166
|
+
description_lines = []
|
167
|
+
for line in doc_lines:
|
168
|
+
line = line.strip()
|
169
|
+
# Stop when we hit param/return sections
|
170
|
+
if line.startswith(":param") or line.startswith(":return"):
|
171
|
+
break
|
172
|
+
if line:
|
173
|
+
description_lines.append(line)
|
174
|
+
return " ".join(description_lines).strip()
|
175
|
+
return ""
|
beamlit/functions/decorator.py
CHANGED
@@ -1,26 +1,27 @@
|
|
1
1
|
"""Decorators for creating function tools with Beamlit and LangChain integration."""
|
2
2
|
|
3
|
+
import json
|
3
4
|
from collections.abc import Callable
|
4
5
|
from logging import getLogger
|
5
6
|
|
6
7
|
from beamlit.authentication import new_client
|
7
8
|
from beamlit.common.settings import get_settings
|
8
|
-
from beamlit.models import
|
9
|
+
from beamlit.models import Function, FunctionKit
|
9
10
|
from beamlit.run import RunClient
|
10
11
|
from langchain_core.tools import create_schema_from_function
|
11
12
|
|
12
13
|
logger = getLogger(__name__)
|
13
14
|
|
14
15
|
|
15
|
-
def get_remote_function(func: Callable,
|
16
|
+
def get_remote_function(func: Callable, function: Function):
|
16
17
|
settings = get_settings()
|
18
|
+
name = (function and function.metadata and function.metadata.name) or func.__name__
|
17
19
|
|
18
20
|
def _partial(*args, **kwargs):
|
19
21
|
# Get function signature parameters
|
20
22
|
try:
|
21
23
|
client = new_client()
|
22
24
|
run_client = RunClient(client)
|
23
|
-
name = (bl_function and bl_function.function) or func.__name__
|
24
25
|
logger.debug(
|
25
26
|
f"Calling remote function: NAME={name}"
|
26
27
|
f" PARAMS={kwargs} ENVIRONMENT={settings.environment}"
|
@@ -30,19 +31,23 @@ def get_remote_function(func: Callable, bl_function: FunctionDeployment):
|
|
30
31
|
resource_name=name,
|
31
32
|
environment=settings.environment,
|
32
33
|
method="POST",
|
33
|
-
headers={},
|
34
|
-
json
|
34
|
+
headers={"Content-Type": "application/json"},
|
35
|
+
data=json.dumps(kwargs),
|
35
36
|
)
|
37
|
+
content = response.text
|
36
38
|
if response.status_code >= 400:
|
37
39
|
content = f"{response.status_code}:{response.text}"
|
40
|
+
logger.error(f"Error calling remote function: {content}")
|
38
41
|
return f"Error calling remote function: {content}"
|
39
42
|
logger.debug(
|
40
43
|
f"Response from remote function: NAME={name}"
|
41
|
-
f" RESPONSE={
|
44
|
+
f" RESPONSE={content} ENVIRONMENT={settings.environment}"
|
42
45
|
)
|
43
|
-
|
46
|
+
if response.headers.get("content-type") == "application/json":
|
47
|
+
return response.json()
|
48
|
+
return content
|
44
49
|
except Exception as e:
|
45
|
-
logger.error(f"Error calling function {
|
50
|
+
logger.error(f"Error calling function {name}: {e}")
|
46
51
|
raise e
|
47
52
|
|
48
53
|
remote_func = _partial
|
@@ -62,17 +67,15 @@ def kit(bl_kit: FunctionKit = None, **kwargs: dict) -> Callable:
|
|
62
67
|
return wrapper
|
63
68
|
|
64
69
|
|
65
|
-
def function(
|
66
|
-
*args, bl_function: FunctionDeployment = None, kit=False, **kwargs: dict
|
67
|
-
) -> Callable:
|
70
|
+
def function(*args, function: Function = None, kit=False, **kwargs: dict) -> Callable:
|
68
71
|
"""Create function tools with Beamlit and LangChain integration."""
|
69
72
|
settings = get_settings()
|
70
73
|
|
71
74
|
def wrapper(func: Callable) -> Callable:
|
72
|
-
if
|
73
|
-
func.__doc__ =
|
75
|
+
if function and not func.__doc__ and function.spec and function.spec.description:
|
76
|
+
func.__doc__ = function.spec.description
|
74
77
|
if settings.remote:
|
75
|
-
remote_func = get_remote_function(func,
|
78
|
+
remote_func = get_remote_function(func, function)
|
76
79
|
if not kwargs.get("args_schema"):
|
77
80
|
kwargs["args_schema"] = create_schema_from_function(
|
78
81
|
func.__name__,
|
beamlit/models/__init__.py
CHANGED
@@ -3,107 +3,101 @@
|
|
3
3
|
from .acl import ACL
|
4
4
|
from .agent import Agent
|
5
5
|
from .agent_chain import AgentChain
|
6
|
-
from .
|
7
|
-
from .
|
8
|
-
from .
|
9
|
-
from .agent_deployment_history import AgentDeploymentHistory
|
10
|
-
from .agent_deployment_history_event import AgentDeploymentHistoryEvent
|
11
|
-
from .agent_deployment_pod_template import AgentDeploymentPodTemplate
|
6
|
+
from .agent_history import AgentHistory
|
7
|
+
from .agent_history_event import AgentHistoryEvent
|
8
|
+
from .agent_metadata import AgentMetadata
|
12
9
|
from .agent_release import AgentRelease
|
13
|
-
from .
|
10
|
+
from .agent_spec import AgentSpec
|
14
11
|
from .api_key import ApiKey
|
15
|
-
from .authentication_provider_model import AuthenticationProviderModel
|
16
|
-
from .authentication_provider_organization import AuthenticationProviderOrganization
|
17
12
|
from .configuration import Configuration
|
18
13
|
from .continent import Continent
|
14
|
+
from .core_spec import CoreSpec
|
15
|
+
from .core_spec_configurations import CoreSpecConfigurations
|
19
16
|
from .country import Country
|
20
17
|
from .create_api_key_for_service_account_body import CreateApiKeyForServiceAccountBody
|
21
18
|
from .create_workspace_service_account_body import CreateWorkspaceServiceAccountBody
|
22
19
|
from .create_workspace_service_account_response_200 import CreateWorkspaceServiceAccountResponse200
|
23
20
|
from .delete_workspace_service_account_response_200 import DeleteWorkspaceServiceAccountResponse200
|
24
|
-
from .deployment_configuration import DeploymentConfiguration
|
25
|
-
from .deployment_configurations import DeploymentConfigurations
|
26
|
-
from .deployment_serverless_config import DeploymentServerlessConfig
|
27
21
|
from .environment import Environment
|
22
|
+
from .environment_metadata import EnvironmentMetadata
|
28
23
|
from .environment_metrics import EnvironmentMetrics
|
24
|
+
from .environment_spec import EnvironmentSpec
|
29
25
|
from .flavor import Flavor
|
30
26
|
from .function import Function
|
31
|
-
from .function_configuration import FunctionConfiguration
|
32
|
-
from .function_deployment import FunctionDeployment
|
33
|
-
from .function_deployment_configuration import FunctionDeploymentConfiguration
|
34
|
-
from .function_deployment_pod_template import FunctionDeploymentPodTemplate
|
35
27
|
from .function_kit import FunctionKit
|
36
|
-
from .
|
28
|
+
from .function_metadata import FunctionMetadata
|
37
29
|
from .function_release import FunctionRelease
|
38
|
-
from .
|
30
|
+
from .function_spec import FunctionSpec
|
39
31
|
from .get_workspace_service_accounts_response_200_item import GetWorkspaceServiceAccountsResponse200Item
|
40
32
|
from .increase_and_rate_metric import IncreaseAndRateMetric
|
41
|
-
from .integration import Integration
|
42
|
-
from .integration_config import IntegrationConfig
|
43
33
|
from .integration_connection import IntegrationConnection
|
44
34
|
from .integration_connection_config import IntegrationConnectionConfig
|
45
35
|
from .integration_connection_secret import IntegrationConnectionSecret
|
36
|
+
from .integration_connection_spec import IntegrationConnectionSpec
|
46
37
|
from .integration_model import IntegrationModel
|
47
|
-
from .integration_secret import IntegrationSecret
|
48
38
|
from .invite_workspace_user_body import InviteWorkspaceUserBody
|
49
|
-
from .labels_type_0 import LabelsType0
|
50
|
-
from .location import Location
|
51
39
|
from .location_response import LocationResponse
|
40
|
+
from .metadata import Metadata
|
41
|
+
from .metadata_labels import MetadataLabels
|
52
42
|
from .metric import Metric
|
53
43
|
from .metrics import Metrics
|
54
44
|
from .model import Model
|
55
|
-
from .
|
56
|
-
from .
|
57
|
-
from .model_deployment_metrics import ModelDeploymentMetrics
|
58
|
-
from .model_deployment_metrics_inference_per_second_per_region import ModelDeploymentMetricsInferencePerSecondPerRegion
|
59
|
-
from .model_deployment_metrics_query_per_second_per_region_per_code import (
|
60
|
-
ModelDeploymentMetricsQueryPerSecondPerRegionPerCode,
|
61
|
-
)
|
62
|
-
from .model_deployment_pod_template import ModelDeploymentPodTemplate
|
63
|
-
from .model_metrics import ModelMetrics
|
45
|
+
from .model_metadata import ModelMetadata
|
46
|
+
from .model_private_cluster import ModelPrivateCluster
|
64
47
|
from .model_provider import ModelProvider
|
65
|
-
from .model_provider_ref import ModelProviderRef
|
66
48
|
from .model_release import ModelRelease
|
67
|
-
from .
|
49
|
+
from .model_spec import ModelSpec
|
50
|
+
from .owner_fields import OwnerFields
|
68
51
|
from .pending_invitation import PendingInvitation
|
69
52
|
from .pending_invitation_accept import PendingInvitationAccept
|
70
53
|
from .pending_invitation_render import PendingInvitationRender
|
71
54
|
from .pending_invitation_render_invited_by import PendingInvitationRenderInvitedBy
|
72
55
|
from .pending_invitation_render_workspace import PendingInvitationRenderWorkspace
|
73
56
|
from .pending_invitation_workspace_details import PendingInvitationWorkspaceDetails
|
57
|
+
from .pod_template_spec import PodTemplateSpec
|
74
58
|
from .policy import Policy
|
75
59
|
from .policy_location import PolicyLocation
|
60
|
+
from .policy_spec import PolicySpec
|
61
|
+
from .private_cluster import PrivateCluster
|
62
|
+
from .private_location import PrivateLocation
|
76
63
|
from .provider_config import ProviderConfig
|
77
64
|
from .qps import QPS
|
78
|
-
from .resource_deployment_log import ResourceDeploymentLog
|
79
65
|
from .resource_deployment_metrics import ResourceDeploymentMetrics
|
80
|
-
from .resource_deployment_metrics_inference_per_region import ResourceDeploymentMetricsInferencePerRegion
|
81
66
|
from .resource_deployment_metrics_inference_per_second_per_region import (
|
82
67
|
ResourceDeploymentMetricsInferencePerSecondPerRegion,
|
83
68
|
)
|
84
|
-
from .resource_deployment_metrics_query_per_region_per_code import ResourceDeploymentMetricsQueryPerRegionPerCode
|
85
69
|
from .resource_deployment_metrics_query_per_second_per_region_per_code import (
|
86
70
|
ResourceDeploymentMetricsQueryPerSecondPerRegionPerCode,
|
87
71
|
)
|
72
|
+
from .resource_environment_metrics import ResourceEnvironmentMetrics
|
73
|
+
from .resource_environment_metrics_inference_per_region import ResourceEnvironmentMetricsInferencePerRegion
|
74
|
+
from .resource_environment_metrics_inference_per_second_per_region import (
|
75
|
+
ResourceEnvironmentMetricsInferencePerSecondPerRegion,
|
76
|
+
)
|
77
|
+
from .resource_environment_metrics_query_per_region_per_code import ResourceEnvironmentMetricsQueryPerRegionPerCode
|
78
|
+
from .resource_environment_metrics_query_per_second_per_region_per_code import (
|
79
|
+
ResourceEnvironmentMetricsQueryPerSecondPerRegionPerCode,
|
80
|
+
)
|
81
|
+
from .resource_log import ResourceLog
|
88
82
|
from .resource_metrics import ResourceMetrics
|
89
83
|
from .runtime import Runtime
|
90
84
|
from .runtime_readiness_probe import RuntimeReadinessProbe
|
91
85
|
from .runtime_resources import RuntimeResources
|
92
86
|
from .serverless_config import ServerlessConfig
|
93
|
-
from .
|
87
|
+
from .spec_configuration import SpecConfiguration
|
94
88
|
from .store_agent import StoreAgent
|
95
|
-
from .store_agent_configuration import StoreAgentConfiguration
|
96
89
|
from .store_agent_labels import StoreAgentLabels
|
97
90
|
from .store_configuration import StoreConfiguration
|
98
91
|
from .store_configuration_option import StoreConfigurationOption
|
99
92
|
from .store_function import StoreFunction
|
100
|
-
from .store_function_configuration import StoreFunctionConfiguration
|
101
93
|
from .store_function_kit import StoreFunctionKit
|
102
94
|
from .store_function_labels import StoreFunctionLabels
|
103
95
|
from .store_function_parameter import StoreFunctionParameter
|
96
|
+
from .time_fields import TimeFields
|
104
97
|
from .update_workspace_service_account_body import UpdateWorkspaceServiceAccountBody
|
105
98
|
from .update_workspace_service_account_response_200 import UpdateWorkspaceServiceAccountResponse200
|
106
99
|
from .update_workspace_user_role_body import UpdateWorkspaceUserRoleBody
|
100
|
+
from .websocket_channel import WebsocketChannel
|
107
101
|
from .workspace import Workspace
|
108
102
|
from .workspace_labels import WorkspaceLabels
|
109
103
|
from .workspace_user import WorkspaceUser
|
@@ -112,101 +106,93 @@ __all__ = (
|
|
112
106
|
"ACL",
|
113
107
|
"Agent",
|
114
108
|
"AgentChain",
|
115
|
-
"
|
116
|
-
"
|
117
|
-
"
|
118
|
-
"AgentDeploymentHistory",
|
119
|
-
"AgentDeploymentHistoryEvent",
|
120
|
-
"AgentDeploymentPodTemplate",
|
109
|
+
"AgentHistory",
|
110
|
+
"AgentHistoryEvent",
|
111
|
+
"AgentMetadata",
|
121
112
|
"AgentRelease",
|
122
|
-
"
|
113
|
+
"AgentSpec",
|
123
114
|
"ApiKey",
|
124
|
-
"AuthenticationProviderModel",
|
125
|
-
"AuthenticationProviderOrganization",
|
126
115
|
"Configuration",
|
127
116
|
"Continent",
|
117
|
+
"CoreSpec",
|
118
|
+
"CoreSpecConfigurations",
|
128
119
|
"Country",
|
129
120
|
"CreateApiKeyForServiceAccountBody",
|
130
121
|
"CreateWorkspaceServiceAccountBody",
|
131
122
|
"CreateWorkspaceServiceAccountResponse200",
|
132
123
|
"DeleteWorkspaceServiceAccountResponse200",
|
133
|
-
"DeploymentConfiguration",
|
134
|
-
"DeploymentConfigurations",
|
135
|
-
"DeploymentServerlessConfig",
|
136
124
|
"Environment",
|
125
|
+
"EnvironmentMetadata",
|
137
126
|
"EnvironmentMetrics",
|
127
|
+
"EnvironmentSpec",
|
138
128
|
"Flavor",
|
139
129
|
"Function",
|
140
|
-
"FunctionConfiguration",
|
141
|
-
"FunctionDeployment",
|
142
|
-
"FunctionDeploymentConfiguration",
|
143
|
-
"FunctionDeploymentPodTemplate",
|
144
130
|
"FunctionKit",
|
145
|
-
"
|
131
|
+
"FunctionMetadata",
|
146
132
|
"FunctionRelease",
|
147
|
-
"
|
133
|
+
"FunctionSpec",
|
148
134
|
"GetWorkspaceServiceAccountsResponse200Item",
|
149
135
|
"IncreaseAndRateMetric",
|
150
|
-
"Integration",
|
151
|
-
"IntegrationConfig",
|
152
136
|
"IntegrationConnection",
|
153
137
|
"IntegrationConnectionConfig",
|
154
138
|
"IntegrationConnectionSecret",
|
139
|
+
"IntegrationConnectionSpec",
|
155
140
|
"IntegrationModel",
|
156
|
-
"IntegrationSecret",
|
157
141
|
"InviteWorkspaceUserBody",
|
158
|
-
"LabelsType0",
|
159
|
-
"Location",
|
160
142
|
"LocationResponse",
|
143
|
+
"Metadata",
|
144
|
+
"MetadataLabels",
|
161
145
|
"Metric",
|
162
146
|
"Metrics",
|
163
147
|
"Model",
|
164
|
-
"
|
165
|
-
"
|
166
|
-
"ModelDeploymentMetrics",
|
167
|
-
"ModelDeploymentMetricsInferencePerSecondPerRegion",
|
168
|
-
"ModelDeploymentMetricsQueryPerSecondPerRegionPerCode",
|
169
|
-
"ModelDeploymentPodTemplate",
|
170
|
-
"ModelMetrics",
|
148
|
+
"ModelMetadata",
|
149
|
+
"ModelPrivateCluster",
|
171
150
|
"ModelProvider",
|
172
|
-
"ModelProviderRef",
|
173
151
|
"ModelRelease",
|
174
|
-
"
|
152
|
+
"ModelSpec",
|
153
|
+
"OwnerFields",
|
175
154
|
"PendingInvitation",
|
176
155
|
"PendingInvitationAccept",
|
177
156
|
"PendingInvitationRender",
|
178
157
|
"PendingInvitationRenderInvitedBy",
|
179
158
|
"PendingInvitationRenderWorkspace",
|
180
159
|
"PendingInvitationWorkspaceDetails",
|
160
|
+
"PodTemplateSpec",
|
181
161
|
"Policy",
|
182
162
|
"PolicyLocation",
|
163
|
+
"PolicySpec",
|
164
|
+
"PrivateCluster",
|
165
|
+
"PrivateLocation",
|
183
166
|
"ProviderConfig",
|
184
167
|
"QPS",
|
185
|
-
"ResourceDeploymentLog",
|
186
168
|
"ResourceDeploymentMetrics",
|
187
|
-
"ResourceDeploymentMetricsInferencePerRegion",
|
188
169
|
"ResourceDeploymentMetricsInferencePerSecondPerRegion",
|
189
|
-
"ResourceDeploymentMetricsQueryPerRegionPerCode",
|
190
170
|
"ResourceDeploymentMetricsQueryPerSecondPerRegionPerCode",
|
171
|
+
"ResourceEnvironmentMetrics",
|
172
|
+
"ResourceEnvironmentMetricsInferencePerRegion",
|
173
|
+
"ResourceEnvironmentMetricsInferencePerSecondPerRegion",
|
174
|
+
"ResourceEnvironmentMetricsQueryPerRegionPerCode",
|
175
|
+
"ResourceEnvironmentMetricsQueryPerSecondPerRegionPerCode",
|
176
|
+
"ResourceLog",
|
191
177
|
"ResourceMetrics",
|
192
178
|
"Runtime",
|
193
179
|
"RuntimeReadinessProbe",
|
194
180
|
"RuntimeResources",
|
195
181
|
"ServerlessConfig",
|
196
|
-
"
|
182
|
+
"SpecConfiguration",
|
197
183
|
"StoreAgent",
|
198
|
-
"StoreAgentConfiguration",
|
199
184
|
"StoreAgentLabels",
|
200
185
|
"StoreConfiguration",
|
201
186
|
"StoreConfigurationOption",
|
202
187
|
"StoreFunction",
|
203
|
-
"StoreFunctionConfiguration",
|
204
188
|
"StoreFunctionKit",
|
205
189
|
"StoreFunctionLabels",
|
206
190
|
"StoreFunctionParameter",
|
191
|
+
"TimeFields",
|
207
192
|
"UpdateWorkspaceServiceAccountBody",
|
208
193
|
"UpdateWorkspaceServiceAccountResponse200",
|
209
194
|
"UpdateWorkspaceUserRoleBody",
|
195
|
+
"WebsocketChannel",
|
210
196
|
"Workspace",
|
211
197
|
"WorkspaceLabels",
|
212
198
|
"WorkspaceUser",
|
beamlit/models/acl.py
CHANGED
@@ -14,9 +14,7 @@ class ACL:
|
|
14
14
|
|
15
15
|
Attributes:
|
16
16
|
created_at (Union[Unset, str]): The date and time when the resource was created
|
17
|
-
created_by (Union[Unset, str]): The user or service account who created the resource
|
18
17
|
updated_at (Union[Unset, str]): The date and time when the resource was updated
|
19
|
-
updated_by (Union[Unset, str]): The user or service account who updated the resource
|
20
18
|
id (Union[Unset, str]): ACL id
|
21
19
|
resource_id (Union[Unset, str]): Resource ID
|
22
20
|
resource_type (Union[Unset, str]): Resource type
|
@@ -27,9 +25,7 @@ class ACL:
|
|
27
25
|
"""
|
28
26
|
|
29
27
|
created_at: Union[Unset, str] = UNSET
|
30
|
-
created_by: Union[Unset, str] = UNSET
|
31
28
|
updated_at: Union[Unset, str] = UNSET
|
32
|
-
updated_by: Union[Unset, str] = UNSET
|
33
29
|
id: Union[Unset, str] = UNSET
|
34
30
|
resource_id: Union[Unset, str] = UNSET
|
35
31
|
resource_type: Union[Unset, str] = UNSET
|
@@ -42,12 +38,8 @@ class ACL:
|
|
42
38
|
def to_dict(self) -> dict[str, Any]:
|
43
39
|
created_at = self.created_at
|
44
40
|
|
45
|
-
created_by = self.created_by
|
46
|
-
|
47
41
|
updated_at = self.updated_at
|
48
42
|
|
49
|
-
updated_by = self.updated_by
|
50
|
-
|
51
43
|
id = self.id
|
52
44
|
|
53
45
|
resource_id = self.resource_id
|
@@ -66,13 +58,9 @@ class ACL:
|
|
66
58
|
field_dict.update(self.additional_properties)
|
67
59
|
field_dict.update({})
|
68
60
|
if created_at is not UNSET:
|
69
|
-
field_dict["
|
70
|
-
if created_by is not UNSET:
|
71
|
-
field_dict["created_by"] = created_by
|
61
|
+
field_dict["createdAt"] = created_at
|
72
62
|
if updated_at is not UNSET:
|
73
|
-
field_dict["
|
74
|
-
if updated_by is not UNSET:
|
75
|
-
field_dict["updated_by"] = updated_by
|
63
|
+
field_dict["updatedAt"] = updated_at
|
76
64
|
if id is not UNSET:
|
77
65
|
field_dict["id"] = id
|
78
66
|
if resource_id is not UNSET:
|
@@ -95,13 +83,9 @@ class ACL:
|
|
95
83
|
if not src_dict:
|
96
84
|
return None
|
97
85
|
d = src_dict.copy()
|
98
|
-
created_at = d.pop("
|
99
|
-
|
100
|
-
created_by = d.pop("created_by", UNSET)
|
101
|
-
|
102
|
-
updated_at = d.pop("updated_at", UNSET)
|
86
|
+
created_at = d.pop("createdAt", UNSET)
|
103
87
|
|
104
|
-
|
88
|
+
updated_at = d.pop("updatedAt", UNSET)
|
105
89
|
|
106
90
|
id = d.pop("id", UNSET)
|
107
91
|
|
@@ -119,9 +103,7 @@ class ACL:
|
|
119
103
|
|
120
104
|
acl = cls(
|
121
105
|
created_at=created_at,
|
122
|
-
created_by=created_by,
|
123
106
|
updated_at=updated_at,
|
124
|
-
updated_by=updated_by,
|
125
107
|
id=id,
|
126
108
|
resource_id=resource_id,
|
127
109
|
resource_type=resource_type,
|