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.
Files changed (170) hide show
  1. beamlit/agents/chat.py +37 -11
  2. beamlit/agents/decorator.py +97 -65
  3. beamlit/api/agents/create_agent.py +9 -14
  4. beamlit/api/agents/delete_agent.py +22 -1
  5. beamlit/api/agents/delete_agent_history.py +2 -6
  6. beamlit/api/agents/get_agent.py +22 -1
  7. beamlit/api/agents/get_agent_environment_logs.py +11 -11
  8. beamlit/api/agents/get_agent_history.py +2 -6
  9. beamlit/api/agents/get_agent_metrics.py +22 -1
  10. beamlit/api/agents/list_agent_history.py +11 -11
  11. beamlit/api/agents/list_agents.py +36 -4
  12. beamlit/api/agents/put_agent_history.py +2 -6
  13. beamlit/api/agents/update_agent.py +9 -14
  14. beamlit/api/functions/create_function.py +9 -14
  15. beamlit/api/functions/delete_function.py +22 -1
  16. beamlit/api/functions/get_function.py +22 -1
  17. beamlit/api/functions/get_function_environment_logs.py +11 -11
  18. beamlit/api/functions/get_function_metrics.py +22 -1
  19. beamlit/api/functions/list_functions.py +36 -4
  20. beamlit/api/functions/update_function.py +9 -14
  21. beamlit/api/history/get_agents_history.py +12 -12
  22. beamlit/api/history/list_agents_history.py +12 -12
  23. beamlit/api/integrations/get_integration_connection.py +16 -12
  24. beamlit/api/integrations/get_integration_connection_model.py +8 -1
  25. beamlit/api/integrations/get_integration_model.py +8 -1
  26. beamlit/api/locations/list_locations.py +12 -12
  27. beamlit/api/models/create_model.py +13 -14
  28. beamlit/api/models/delete_model.py +22 -1
  29. beamlit/api/models/get_model.py +22 -1
  30. beamlit/api/models/get_model_environment_logs.py +11 -11
  31. beamlit/api/models/get_model_metrics.py +38 -13
  32. beamlit/api/models/list_models.py +36 -4
  33. beamlit/api/models/update_model.py +13 -14
  34. beamlit/api/privateclusters/__init__.py +0 -0
  35. beamlit/api/{agents/get_agent_deployment_metrics.py → privateclusters/create_private_cluster.py} +28 -55
  36. beamlit/api/{functions/list_function_deployments.py → privateclusters/delete_private_cluster.py} +38 -37
  37. beamlit/api/{agents/get_agent_deployment.py → privateclusters/get_private_cluster.py} +40 -44
  38. beamlit/api/privateclusters/get_private_cluster_health.py +97 -0
  39. beamlit/api/{agents/list_agent_deployments.py → privateclusters/list_private_clusters.py} +30 -45
  40. beamlit/api/{models/list_model_deployments.py → privateclusters/update_private_cluster.py} +38 -45
  41. beamlit/api/privateclusters/update_private_cluster_health.py +97 -0
  42. beamlit/authentication/device_mode.py +3 -9
  43. beamlit/common/generate.py +47 -34
  44. beamlit/common/settings.py +29 -27
  45. beamlit/deploy/deploy.py +101 -342
  46. beamlit/deploy/format.py +70 -0
  47. beamlit/deploy/parser.py +175 -0
  48. beamlit/functions/decorator.py +8 -11
  49. beamlit/models/__init__.py +64 -78
  50. beamlit/models/acl.py +4 -22
  51. beamlit/models/agent.py +34 -95
  52. beamlit/models/agent_history.py +7 -5
  53. beamlit/models/agent_history_event.py +11 -9
  54. beamlit/models/agent_metadata.py +5 -3
  55. beamlit/models/agent_spec.py +54 -45
  56. beamlit/models/api_key.py +14 -14
  57. beamlit/models/configuration.py +11 -0
  58. beamlit/models/core_spec.py +45 -32
  59. beamlit/models/{model_deployment_metrics_query_per_second_per_region_per_code.py → core_spec_configurations.py} +22 -22
  60. beamlit/models/environment.py +33 -105
  61. beamlit/models/environment_metadata.py +146 -0
  62. beamlit/models/environment_spec.py +8 -6
  63. beamlit/models/function.py +34 -95
  64. beamlit/models/function_metadata.py +5 -3
  65. beamlit/models/function_spec.py +53 -40
  66. beamlit/models/integration_connection.py +31 -137
  67. beamlit/models/integration_connection_spec.py +6 -4
  68. beamlit/models/metadata.py +5 -3
  69. beamlit/models/metadata_labels.py +4 -2
  70. beamlit/models/model.py +33 -94
  71. beamlit/models/model_metadata.py +5 -3
  72. beamlit/models/{function_provider_ref.py → model_private_cluster.py} +23 -14
  73. beamlit/models/model_provider.py +27 -43
  74. beamlit/models/model_spec.py +45 -32
  75. beamlit/models/owner_fields.py +4 -2
  76. beamlit/models/pending_invitation.py +14 -14
  77. beamlit/models/pod_template_spec.py +4 -2
  78. beamlit/models/policy.py +33 -159
  79. beamlit/models/policy_spec.py +24 -28
  80. beamlit/models/private_cluster.py +183 -0
  81. beamlit/models/{model_provider_ref.py → private_location.py} +7 -16
  82. beamlit/models/resource_deployment_metrics.py +0 -108
  83. beamlit/models/resource_environment_metrics.py +143 -71
  84. beamlit/models/{resource_deployment_metrics_inference_per_region.py → resource_environment_metrics_inference_per_region.py} +5 -5
  85. beamlit/models/resource_environment_metrics_inference_per_second_per_region.py +9 -11
  86. beamlit/models/{resource_deployment_metrics_query_per_region_per_code.py → resource_environment_metrics_query_per_region_per_code.py} +5 -5
  87. beamlit/models/resource_environment_metrics_query_per_second_per_region_per_code.py +5 -3
  88. beamlit/models/resource_log.py +4 -2
  89. beamlit/models/runtime.py +20 -2
  90. beamlit/models/serverless_config.py +28 -21
  91. beamlit/models/spec_configuration.py +7 -5
  92. beamlit/models/store_agent.py +14 -14
  93. beamlit/models/store_function.py +14 -14
  94. beamlit/models/time_fields.py +4 -2
  95. beamlit/models/websocket_channel.py +4 -2
  96. beamlit/models/workspace.py +23 -14
  97. beamlit/run.py +0 -1
  98. beamlit/serve/app.py +1 -0
  99. beamlit/serve/middlewares/accesslog.py +3 -1
  100. {beamlit-0.0.24rc20.dist-info → beamlit-0.0.25.dist-info}/METADATA +1 -1
  101. beamlit-0.0.25.dist-info/RECORD +243 -0
  102. beamlit/api/agents/delete_agent_deployment.py +0 -163
  103. beamlit/api/agents/delete_agent_deployment_history.py +0 -172
  104. beamlit/api/agents/get_agent_deployment_history.py +0 -172
  105. beamlit/api/agents/get_agent_deployment_logs.py +0 -164
  106. beamlit/api/agents/list_agent_deployment_history.py +0 -164
  107. beamlit/api/agents/put_agent_deployment.py +0 -185
  108. beamlit/api/agents/put_agent_deployment_history.py +0 -198
  109. beamlit/api/functions/delete_function_deployment.py +0 -163
  110. beamlit/api/functions/get_function_deployment.py +0 -163
  111. beamlit/api/functions/get_function_deployment_logs.py +0 -164
  112. beamlit/api/functions/get_function_deployment_metrics.py +0 -159
  113. beamlit/api/functions/put_function_deployment.py +0 -185
  114. beamlit/api/models/delete_model_deployment.py +0 -171
  115. beamlit/api/models/get_model_deployment.py +0 -171
  116. beamlit/api/models/get_model_deployment_logs.py +0 -168
  117. beamlit/api/models/get_model_deployment_metrics.py +0 -163
  118. beamlit/api/models/put_model_deployment.py +0 -193
  119. beamlit/models/agent_configuration.py +0 -70
  120. beamlit/models/agent_deployment.py +0 -340
  121. beamlit/models/agent_deployment_configuration.py +0 -45
  122. beamlit/models/agent_deployment_configuration_type_0.py +0 -43
  123. beamlit/models/agent_deployment_history.py +0 -185
  124. beamlit/models/agent_deployment_history_event.py +0 -133
  125. beamlit/models/agent_deployment_pod_template.py +0 -45
  126. beamlit/models/agent_deployment_pod_template_type_0.py +0 -43
  127. beamlit/models/agent_with_deployments.py +0 -176
  128. beamlit/models/authentication_provider_model.py +0 -144
  129. beamlit/models/authentication_provider_organization.py +0 -88
  130. beamlit/models/deployment_configuration.py +0 -70
  131. beamlit/models/deployment_configurations.py +0 -58
  132. beamlit/models/deployment_serverless_config.py +0 -131
  133. beamlit/models/deployment_serverless_config_type_0.py +0 -220
  134. beamlit/models/function_configuration.py +0 -70
  135. beamlit/models/function_deployment.py +0 -340
  136. beamlit/models/function_deployment_configuration.py +0 -45
  137. beamlit/models/function_deployment_configuration_type_0.py +0 -43
  138. beamlit/models/function_deployment_pod_template.py +0 -45
  139. beamlit/models/function_deployment_pod_template_type_0.py +0 -43
  140. beamlit/models/function_with_deployments.py +0 -176
  141. beamlit/models/integration.py +0 -198
  142. beamlit/models/integration_config.py +0 -45
  143. beamlit/models/integration_secret.py +0 -61
  144. beamlit/models/labels_type_0.py +0 -45
  145. beamlit/models/location.py +0 -122
  146. beamlit/models/model_deployment.py +0 -296
  147. beamlit/models/model_deployment_log.py +0 -70
  148. beamlit/models/model_deployment_metrics.py +0 -172
  149. beamlit/models/model_deployment_metrics_inference_per_second_per_region.py +0 -77
  150. beamlit/models/model_deployment_pod_template.py +0 -45
  151. beamlit/models/model_deployment_pod_template_type_0.py +0 -43
  152. beamlit/models/model_metrics.py +0 -96
  153. beamlit/models/model_with_deployments.py +0 -176
  154. beamlit/models/resource_deployment_log.py +0 -70
  155. beamlit/models/resource_deployment_metrics_inference_per_region_type_0.py +0 -79
  156. beamlit/models/resource_deployment_metrics_inference_per_second_per_region_type_0.py +0 -79
  157. beamlit/models/resource_deployment_metrics_query_per_region_per_code_type_0.py +0 -73
  158. beamlit/models/resource_deployment_metrics_query_per_second_per_region_per_code_type_0.py +0 -73
  159. beamlit/models/runtime_readiness_probe_type_0.py +0 -43
  160. beamlit/models/runtime_type_0.py +0 -111
  161. beamlit/models/runtime_type_0_readiness_probe.py +0 -43
  162. beamlit/models/runtime_type_0_readiness_probe_type_0.py +0 -43
  163. beamlit/models/runtime_type_0_resources.py +0 -59
  164. beamlit/models/standard_fields_dynamo_db.py +0 -88
  165. beamlit/models/store_agent_configuration.py +0 -97
  166. beamlit/models/store_agent_labels_type_0.py +0 -43
  167. beamlit/models/store_function_configuration.py +0 -97
  168. beamlit/models/store_function_labels_type_0.py +0 -43
  169. beamlit-0.0.24rc20.dist-info/RECORD +0 -303
  170. {beamlit-0.0.24rc20.dist-info → beamlit-0.0.25.dist-info}/WHEEL +0 -0
@@ -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 ""
@@ -6,22 +6,22 @@ from logging import getLogger
6
6
 
7
7
  from beamlit.authentication import new_client
8
8
  from beamlit.common.settings import get_settings
9
- from beamlit.models import FunctionDeployment, FunctionKit
9
+ from beamlit.models import Function, FunctionKit
10
10
  from beamlit.run import RunClient
11
11
  from langchain_core.tools import create_schema_from_function
12
12
 
13
13
  logger = getLogger(__name__)
14
14
 
15
15
 
16
- def get_remote_function(func: Callable, bl_function: FunctionDeployment):
16
+ def get_remote_function(func: Callable, function: Function):
17
17
  settings = get_settings()
18
+ name = (function and function.metadata and function.metadata.name) or func.__name__
18
19
 
19
20
  def _partial(*args, **kwargs):
20
21
  # Get function signature parameters
21
22
  try:
22
23
  client = new_client()
23
24
  run_client = RunClient(client)
24
- name = (bl_function and bl_function.function) or func.__name__
25
25
  logger.debug(
26
26
  f"Calling remote function: NAME={name}"
27
27
  f" PARAMS={kwargs} ENVIRONMENT={settings.environment}"
@@ -47,7 +47,7 @@ def get_remote_function(func: Callable, bl_function: FunctionDeployment):
47
47
  return response.json()
48
48
  return content
49
49
  except Exception as e:
50
- logger.error(f"Error calling function {bl_function.id}: {e}")
50
+ logger.error(f"Error calling function {name}: {e}")
51
51
  raise e
52
52
 
53
53
  remote_func = _partial
@@ -67,17 +67,15 @@ def kit(bl_kit: FunctionKit = None, **kwargs: dict) -> Callable:
67
67
  return wrapper
68
68
 
69
69
 
70
- def function(
71
- *args, bl_function: FunctionDeployment = None, kit=False, **kwargs: dict
72
- ) -> Callable:
70
+ def function(*args, function: Function = None, kit=False, **kwargs: dict) -> Callable:
73
71
  """Create function tools with Beamlit and LangChain integration."""
74
72
  settings = get_settings()
75
73
 
76
74
  def wrapper(func: Callable) -> Callable:
77
- if bl_function and not func.__doc__ and bl_function.description:
78
- func.__doc__ = bl_function.description
75
+ if function and not func.__doc__ and function.spec and function.spec.description:
76
+ func.__doc__ = function.spec.description
79
77
  if settings.remote:
80
- remote_func = get_remote_function(func, bl_function)
78
+ remote_func = get_remote_function(func, function)
81
79
  if not kwargs.get("args_schema"):
82
80
  kwargs["args_schema"] = create_schema_from_function(
83
81
  func.__name__,
@@ -88,4 +86,3 @@ def function(
88
86
  return func
89
87
 
90
88
  return wrapper
91
- return wrapper
@@ -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 .agent_configuration import AgentConfiguration
7
- from .agent_deployment import AgentDeployment
8
- from .agent_deployment_configuration import AgentDeploymentConfiguration
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 .agent_with_deployments import AgentWithDeployments
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 .function_provider_ref import FunctionProviderRef
28
+ from .function_metadata import FunctionMetadata
37
29
  from .function_release import FunctionRelease
38
- from .function_with_deployments import FunctionWithDeployments
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 .model_deployment import ModelDeployment
56
- from .model_deployment_log import ModelDeploymentLog
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 .model_with_deployments import ModelWithDeployments
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 .standard_fields_dynamo_db import StandardFieldsDynamoDb
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
- "AgentConfiguration",
116
- "AgentDeployment",
117
- "AgentDeploymentConfiguration",
118
- "AgentDeploymentHistory",
119
- "AgentDeploymentHistoryEvent",
120
- "AgentDeploymentPodTemplate",
109
+ "AgentHistory",
110
+ "AgentHistoryEvent",
111
+ "AgentMetadata",
121
112
  "AgentRelease",
122
- "AgentWithDeployments",
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
- "FunctionProviderRef",
131
+ "FunctionMetadata",
146
132
  "FunctionRelease",
147
- "FunctionWithDeployments",
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
- "ModelDeployment",
165
- "ModelDeploymentLog",
166
- "ModelDeploymentMetrics",
167
- "ModelDeploymentMetricsInferencePerSecondPerRegion",
168
- "ModelDeploymentMetricsQueryPerSecondPerRegionPerCode",
169
- "ModelDeploymentPodTemplate",
170
- "ModelMetrics",
148
+ "ModelMetadata",
149
+ "ModelPrivateCluster",
171
150
  "ModelProvider",
172
- "ModelProviderRef",
173
151
  "ModelRelease",
174
- "ModelWithDeployments",
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
- "StandardFieldsDynamoDb",
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["created_at"] = created_at
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["updated_at"] = updated_at
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("created_at", UNSET)
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
- updated_by = d.pop("updated_by", UNSET)
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,