beamlit 0.0.57rc108__py3-none-any.whl → 0.0.57rc110__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. beamlit/agents/chain.py +0 -2
  2. beamlit/agents/chat.py +1 -8
  3. beamlit/agents/decorator.py +5 -15
  4. beamlit/api/agents/delete_agent.py +1 -22
  5. beamlit/api/agents/get_agent.py +1 -22
  6. beamlit/api/agents/get_agent_metrics.py +13 -34
  7. beamlit/api/agents/get_agent_trace_ids.py +44 -14
  8. beamlit/api/agents/{list_agent_history.py → list_agent_revisions.py} +21 -17
  9. beamlit/api/agents/list_agents.py +4 -36
  10. beamlit/api/default/get_trace_ids.py +0 -15
  11. beamlit/api/default/list_mcp_hub_definitions.py +12 -12
  12. beamlit/api/functions/delete_function.py +1 -22
  13. beamlit/api/functions/get_function.py +1 -22
  14. beamlit/api/functions/get_function_metrics.py +13 -34
  15. beamlit/api/functions/get_function_trace_ids.py +44 -14
  16. beamlit/api/functions/{create_function_release.py → list_function_revisions.py} +26 -18
  17. beamlit/api/functions/list_functions.py +4 -36
  18. beamlit/api/knowledgebases/create_knowledgebase.py +4 -4
  19. beamlit/api/knowledgebases/delete_knowledgebase.py +5 -26
  20. beamlit/api/knowledgebases/get_knowledgebase.py +1 -22
  21. beamlit/api/{environments/get_environment_metrics.py → knowledgebases/list_knowledgebase_revisions.py} +34 -34
  22. beamlit/api/knowledgebases/list_knowledgebases.py +4 -36
  23. beamlit/api/models/create_model.py +4 -8
  24. beamlit/api/models/delete_model.py +1 -22
  25. beamlit/api/models/get_model.py +1 -22
  26. beamlit/api/models/get_model_metrics.py +13 -34
  27. beamlit/api/models/get_model_trace_ids.py +44 -14
  28. beamlit/api/models/{release_model.py → list_model_revisions.py} +26 -22
  29. beamlit/api/models/list_models.py +4 -36
  30. beamlit/api/models/update_model.py +4 -8
  31. beamlit/authentication/credentials.py +2 -7
  32. beamlit/common/settings.py +1 -4
  33. beamlit/deploy/deploy.py +5 -8
  34. beamlit/functions/mcp/mcp.py +3 -4
  35. beamlit/functions/remote/remote.py +1 -5
  36. beamlit/models/__init__.py +8 -38
  37. beamlit/models/agent.py +6 -6
  38. beamlit/models/function.py +6 -6
  39. beamlit/models/knowledgebase.py +6 -6
  40. beamlit/models/last_n_requests_metric.py +0 -9
  41. beamlit/models/model.py +7 -7
  42. beamlit/models/{resource_environment_metrics.py → resource_metrics.py} +20 -26
  43. beamlit/models/{resource_environment_metrics_request_total_per_code.py → resource_metrics_request_total_per_code.py} +5 -5
  44. beamlit/models/{resource_environment_metrics_rps_per_code.py → resource_metrics_rps_per_code.py} +5 -5
  45. beamlit/models/{model_release.py → revision_metadata.py} +20 -20
  46. beamlit/models/runtime.py +2 -2
  47. beamlit/models/workspace.py +0 -9
  48. beamlit/run.py +1 -4
  49. beamlit/serve/app.py +4 -8
  50. {beamlit-0.0.57rc108.dist-info → beamlit-0.0.57rc110.dist-info}/METADATA +1 -1
  51. {beamlit-0.0.57rc108.dist-info → beamlit-0.0.57rc110.dist-info}/RECORD +57 -86
  52. beamlit/api/agents/create_agent_release.py +0 -146
  53. beamlit/api/agents/delete_agent_history.py +0 -155
  54. beamlit/api/agents/get_agent_history.py +0 -155
  55. beamlit/api/agents/put_agent_history.py +0 -181
  56. beamlit/api/environments/__init__.py +0 -0
  57. beamlit/api/environments/create_environment.py +0 -167
  58. beamlit/api/environments/delete_environment.py +0 -154
  59. beamlit/api/environments/get_environment.py +0 -154
  60. beamlit/api/environments/list_environments.py +0 -139
  61. beamlit/api/environments/update_environment.py +0 -180
  62. beamlit/api/generation/__init__.py +0 -0
  63. beamlit/api/generation/run_information_generation_agent.py +0 -168
  64. beamlit/api/history/__init__.py +0 -0
  65. beamlit/api/history/get_agents_history.py +0 -155
  66. beamlit/api/history/list_agents_history.py +0 -131
  67. beamlit/models/agent_history.py +0 -167
  68. beamlit/models/agent_history_event.py +0 -133
  69. beamlit/models/agent_information_request.py +0 -63
  70. beamlit/models/agent_information_response.py +0 -79
  71. beamlit/models/agent_release.py +0 -70
  72. beamlit/models/environment.py +0 -96
  73. beamlit/models/environment_metadata.py +0 -148
  74. beamlit/models/environment_metrics.py +0 -77
  75. beamlit/models/environment_spec.py +0 -63
  76. beamlit/models/function_release.py +0 -70
  77. beamlit/models/knowledgebase_release.py +0 -70
  78. beamlit/models/mcp_hub_artifact.py +0 -188
  79. beamlit/models/mcp_hub_artifact_entrypoint.py +0 -45
  80. beamlit/models/mcp_hub_artifact_form.py +0 -45
  81. /beamlit/api/agents/{get_agent_environment_logs.py → get_agent_logs.py} +0 -0
  82. /beamlit/api/functions/{get_function_environment_logs.py → get_function_logs.py} +0 -0
  83. /beamlit/api/models/{get_model_environment_logs.py → get_model_logs.py} +0 -0
  84. {beamlit-0.0.57rc108.dist-info → beamlit-0.0.57rc110.dist-info}/WHEEL +0 -0
  85. {beamlit-0.0.57rc108.dist-info → beamlit-0.0.57rc110.dist-info}/entry_points.txt +0 -0
  86. {beamlit-0.0.57rc108.dist-info → beamlit-0.0.57rc110.dist-info}/licenses/LICENSE +0 -0
@@ -5,25 +5,16 @@ import httpx
5
5
 
6
6
  from ... import errors
7
7
  from ...client import AuthenticatedClient, Client
8
- from ...models.resource_environment_metrics import ResourceEnvironmentMetrics
9
- from ...types import UNSET, Response, Unset
8
+ from ...models.resource_metrics import ResourceMetrics
9
+ from ...types import Response
10
10
 
11
11
 
12
12
  def _get_kwargs(
13
13
  model_name: str,
14
- *,
15
- environment: Union[Unset, str] = UNSET,
16
14
  ) -> 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
-
23
15
  _kwargs: dict[str, Any] = {
24
16
  "method": "get",
25
17
  "url": f"/models/{model_name}/metrics",
26
- "params": params,
27
18
  }
28
19
 
29
20
  return _kwargs
@@ -31,9 +22,9 @@ def _get_kwargs(
31
22
 
32
23
  def _parse_response(
33
24
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
34
- ) -> Optional[ResourceEnvironmentMetrics]:
25
+ ) -> Optional[ResourceMetrics]:
35
26
  if response.status_code == 200:
36
- response_200 = ResourceEnvironmentMetrics.from_dict(response.json())
27
+ response_200 = ResourceMetrics.from_dict(response.json())
37
28
 
38
29
  return response_200
39
30
  if client.raise_on_unexpected_status:
@@ -44,7 +35,7 @@ def _parse_response(
44
35
 
45
36
  def _build_response(
46
37
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
47
- ) -> Response[ResourceEnvironmentMetrics]:
38
+ ) -> Response[ResourceMetrics]:
48
39
  return Response(
49
40
  status_code=HTTPStatus(response.status_code),
50
41
  content=response.content,
@@ -57,27 +48,24 @@ def sync_detailed(
57
48
  model_name: str,
58
49
  *,
59
50
  client: AuthenticatedClient,
60
- environment: Union[Unset, str] = UNSET,
61
- ) -> Response[ResourceEnvironmentMetrics]:
51
+ ) -> Response[ResourceMetrics]:
62
52
  """Get model metrics
63
53
 
64
54
  Returns metrics for a model by name.
65
55
 
66
56
  Args:
67
57
  model_name (str):
68
- environment (Union[Unset, str]):
69
58
 
70
59
  Raises:
71
60
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
72
61
  httpx.TimeoutException: If the request takes longer than Client.timeout.
73
62
 
74
63
  Returns:
75
- Response[ResourceEnvironmentMetrics]
64
+ Response[ResourceMetrics]
76
65
  """
77
66
 
78
67
  kwargs = _get_kwargs(
79
68
  model_name=model_name,
80
- environment=environment,
81
69
  )
82
70
 
83
71
  response = client.get_httpx_client().request(
@@ -91,28 +79,25 @@ def sync(
91
79
  model_name: str,
92
80
  *,
93
81
  client: AuthenticatedClient,
94
- environment: Union[Unset, str] = UNSET,
95
- ) -> Optional[ResourceEnvironmentMetrics]:
82
+ ) -> Optional[ResourceMetrics]:
96
83
  """Get model metrics
97
84
 
98
85
  Returns metrics for a model by name.
99
86
 
100
87
  Args:
101
88
  model_name (str):
102
- environment (Union[Unset, str]):
103
89
 
104
90
  Raises:
105
91
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
106
92
  httpx.TimeoutException: If the request takes longer than Client.timeout.
107
93
 
108
94
  Returns:
109
- ResourceEnvironmentMetrics
95
+ ResourceMetrics
110
96
  """
111
97
 
112
98
  return sync_detailed(
113
99
  model_name=model_name,
114
100
  client=client,
115
- environment=environment,
116
101
  ).parsed
117
102
 
118
103
 
@@ -120,27 +105,24 @@ async def asyncio_detailed(
120
105
  model_name: str,
121
106
  *,
122
107
  client: AuthenticatedClient,
123
- environment: Union[Unset, str] = UNSET,
124
- ) -> Response[ResourceEnvironmentMetrics]:
108
+ ) -> Response[ResourceMetrics]:
125
109
  """Get model metrics
126
110
 
127
111
  Returns metrics for a model by name.
128
112
 
129
113
  Args:
130
114
  model_name (str):
131
- environment (Union[Unset, str]):
132
115
 
133
116
  Raises:
134
117
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
135
118
  httpx.TimeoutException: If the request takes longer than Client.timeout.
136
119
 
137
120
  Returns:
138
- Response[ResourceEnvironmentMetrics]
121
+ Response[ResourceMetrics]
139
122
  """
140
123
 
141
124
  kwargs = _get_kwargs(
142
125
  model_name=model_name,
143
- environment=environment,
144
126
  )
145
127
 
146
128
  response = await client.get_async_httpx_client().request(**kwargs)
@@ -152,28 +134,25 @@ async def asyncio(
152
134
  model_name: str,
153
135
  *,
154
136
  client: AuthenticatedClient,
155
- environment: Union[Unset, str] = UNSET,
156
- ) -> Optional[ResourceEnvironmentMetrics]:
137
+ ) -> Optional[ResourceMetrics]:
157
138
  """Get model metrics
158
139
 
159
140
  Returns metrics for a model by name.
160
141
 
161
142
  Args:
162
143
  model_name (str):
163
- environment (Union[Unset, str]):
164
144
 
165
145
  Raises:
166
146
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
167
147
  httpx.TimeoutException: If the request takes longer than Client.timeout.
168
148
 
169
149
  Returns:
170
- ResourceEnvironmentMetrics
150
+ ResourceMetrics
171
151
  """
172
152
 
173
153
  return (
174
154
  await asyncio_detailed(
175
155
  model_name=model_name,
176
156
  client=client,
177
- environment=environment,
178
157
  )
179
158
  ).parsed
@@ -12,11 +12,17 @@ from ...types import UNSET, Response, Unset
12
12
  def _get_kwargs(
13
13
  model_name: str,
14
14
  *,
15
- environment: Union[Unset, str] = UNSET,
15
+ limit: Union[Unset, str] = UNSET,
16
+ start_time: Union[Unset, str] = UNSET,
17
+ end_time: Union[Unset, str] = UNSET,
16
18
  ) -> dict[str, Any]:
17
19
  params: dict[str, Any] = {}
18
20
 
19
- params["environment"] = environment
21
+ params["limit"] = limit
22
+
23
+ params["startTime"] = start_time
24
+
25
+ params["endTime"] = end_time
20
26
 
21
27
  params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
22
28
 
@@ -57,13 +63,17 @@ def sync_detailed(
57
63
  model_name: str,
58
64
  *,
59
65
  client: AuthenticatedClient,
60
- environment: Union[Unset, str] = UNSET,
66
+ limit: Union[Unset, str] = UNSET,
67
+ start_time: Union[Unset, str] = UNSET,
68
+ end_time: Union[Unset, str] = UNSET,
61
69
  ) -> Response[TraceIdsResponse]:
62
70
  """Get model trace IDs
63
71
 
64
72
  Args:
65
73
  model_name (str):
66
- environment (Union[Unset, str]):
74
+ limit (Union[Unset, str]):
75
+ start_time (Union[Unset, str]):
76
+ end_time (Union[Unset, str]):
67
77
 
68
78
  Raises:
69
79
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -75,7 +85,9 @@ def sync_detailed(
75
85
 
76
86
  kwargs = _get_kwargs(
77
87
  model_name=model_name,
78
- environment=environment,
88
+ limit=limit,
89
+ start_time=start_time,
90
+ end_time=end_time,
79
91
  )
80
92
 
81
93
  response = client.get_httpx_client().request(
@@ -89,13 +101,17 @@ def sync(
89
101
  model_name: str,
90
102
  *,
91
103
  client: AuthenticatedClient,
92
- environment: Union[Unset, str] = UNSET,
104
+ limit: Union[Unset, str] = UNSET,
105
+ start_time: Union[Unset, str] = UNSET,
106
+ end_time: Union[Unset, str] = UNSET,
93
107
  ) -> Optional[TraceIdsResponse]:
94
108
  """Get model trace IDs
95
109
 
96
110
  Args:
97
111
  model_name (str):
98
- environment (Union[Unset, str]):
112
+ limit (Union[Unset, str]):
113
+ start_time (Union[Unset, str]):
114
+ end_time (Union[Unset, str]):
99
115
 
100
116
  Raises:
101
117
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -108,7 +124,9 @@ def sync(
108
124
  return sync_detailed(
109
125
  model_name=model_name,
110
126
  client=client,
111
- environment=environment,
127
+ limit=limit,
128
+ start_time=start_time,
129
+ end_time=end_time,
112
130
  ).parsed
113
131
 
114
132
 
@@ -116,13 +134,17 @@ async def asyncio_detailed(
116
134
  model_name: str,
117
135
  *,
118
136
  client: AuthenticatedClient,
119
- environment: Union[Unset, str] = UNSET,
137
+ limit: Union[Unset, str] = UNSET,
138
+ start_time: Union[Unset, str] = UNSET,
139
+ end_time: Union[Unset, str] = UNSET,
120
140
  ) -> Response[TraceIdsResponse]:
121
141
  """Get model trace IDs
122
142
 
123
143
  Args:
124
144
  model_name (str):
125
- environment (Union[Unset, str]):
145
+ limit (Union[Unset, str]):
146
+ start_time (Union[Unset, str]):
147
+ end_time (Union[Unset, str]):
126
148
 
127
149
  Raises:
128
150
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -134,7 +156,9 @@ async def asyncio_detailed(
134
156
 
135
157
  kwargs = _get_kwargs(
136
158
  model_name=model_name,
137
- environment=environment,
159
+ limit=limit,
160
+ start_time=start_time,
161
+ end_time=end_time,
138
162
  )
139
163
 
140
164
  response = await client.get_async_httpx_client().request(**kwargs)
@@ -146,13 +170,17 @@ async def asyncio(
146
170
  model_name: str,
147
171
  *,
148
172
  client: AuthenticatedClient,
149
- environment: Union[Unset, str] = UNSET,
173
+ limit: Union[Unset, str] = UNSET,
174
+ start_time: Union[Unset, str] = UNSET,
175
+ end_time: Union[Unset, str] = UNSET,
150
176
  ) -> Optional[TraceIdsResponse]:
151
177
  """Get model trace IDs
152
178
 
153
179
  Args:
154
180
  model_name (str):
155
- environment (Union[Unset, str]):
181
+ limit (Union[Unset, str]):
182
+ start_time (Union[Unset, str]):
183
+ end_time (Union[Unset, str]):
156
184
 
157
185
  Raises:
158
186
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -166,6 +194,8 @@ async def asyncio(
166
194
  await asyncio_detailed(
167
195
  model_name=model_name,
168
196
  client=client,
169
- environment=environment,
197
+ limit=limit,
198
+ start_time=start_time,
199
+ end_time=end_time,
170
200
  )
171
201
  ).parsed
@@ -5,7 +5,7 @@ import httpx
5
5
 
6
6
  from ... import errors
7
7
  from ...client import AuthenticatedClient, Client
8
- from ...models.model_release import ModelRelease
8
+ from ...models.revision_metadata import RevisionMetadata
9
9
  from ...types import Response
10
10
 
11
11
 
@@ -13,16 +13,18 @@ def _get_kwargs(
13
13
  model_name: str,
14
14
  ) -> dict[str, Any]:
15
15
  _kwargs: dict[str, Any] = {
16
- "method": "post",
17
- "url": f"/models/{model_name}/release",
16
+ "method": "get",
17
+ "url": f"/models/{model_name}/revisions",
18
18
  }
19
19
 
20
20
  return _kwargs
21
21
 
22
22
 
23
- def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[ModelRelease]:
23
+ def _parse_response(
24
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
25
+ ) -> Optional[RevisionMetadata]:
24
26
  if response.status_code == 200:
25
- response_200 = ModelRelease.from_dict(response.json())
27
+ response_200 = RevisionMetadata.from_dict(response.json())
26
28
 
27
29
  return response_200
28
30
  if client.raise_on_unexpected_status:
@@ -31,7 +33,9 @@ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: htt
31
33
  return None
32
34
 
33
35
 
34
- def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[ModelRelease]:
36
+ def _build_response(
37
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
38
+ ) -> Response[RevisionMetadata]:
35
39
  return Response(
36
40
  status_code=HTTPStatus(response.status_code),
37
41
  content=response.content,
@@ -44,10 +48,10 @@ def sync_detailed(
44
48
  model_name: str,
45
49
  *,
46
50
  client: AuthenticatedClient,
47
- ) -> Response[ModelRelease]:
48
- """Release model from an environment
51
+ ) -> Response[RevisionMetadata]:
52
+ """List model revisions
49
53
 
50
- Make a release for a model from an environment to another.
54
+ Returns revisions for a model by name.
51
55
 
52
56
  Args:
53
57
  model_name (str):
@@ -57,7 +61,7 @@ def sync_detailed(
57
61
  httpx.TimeoutException: If the request takes longer than Client.timeout.
58
62
 
59
63
  Returns:
60
- Response[ModelRelease]
64
+ Response[RevisionMetadata]
61
65
  """
62
66
 
63
67
  kwargs = _get_kwargs(
@@ -75,10 +79,10 @@ def sync(
75
79
  model_name: str,
76
80
  *,
77
81
  client: AuthenticatedClient,
78
- ) -> Optional[ModelRelease]:
79
- """Release model from an environment
82
+ ) -> Optional[RevisionMetadata]:
83
+ """List model revisions
80
84
 
81
- Make a release for a model from an environment to another.
85
+ Returns revisions for a model by name.
82
86
 
83
87
  Args:
84
88
  model_name (str):
@@ -88,7 +92,7 @@ def sync(
88
92
  httpx.TimeoutException: If the request takes longer than Client.timeout.
89
93
 
90
94
  Returns:
91
- ModelRelease
95
+ RevisionMetadata
92
96
  """
93
97
 
94
98
  return sync_detailed(
@@ -101,10 +105,10 @@ async def asyncio_detailed(
101
105
  model_name: str,
102
106
  *,
103
107
  client: AuthenticatedClient,
104
- ) -> Response[ModelRelease]:
105
- """Release model from an environment
108
+ ) -> Response[RevisionMetadata]:
109
+ """List model revisions
106
110
 
107
- Make a release for a model from an environment to another.
111
+ Returns revisions for a model by name.
108
112
 
109
113
  Args:
110
114
  model_name (str):
@@ -114,7 +118,7 @@ async def asyncio_detailed(
114
118
  httpx.TimeoutException: If the request takes longer than Client.timeout.
115
119
 
116
120
  Returns:
117
- Response[ModelRelease]
121
+ Response[RevisionMetadata]
118
122
  """
119
123
 
120
124
  kwargs = _get_kwargs(
@@ -130,10 +134,10 @@ async def asyncio(
130
134
  model_name: str,
131
135
  *,
132
136
  client: AuthenticatedClient,
133
- ) -> Optional[ModelRelease]:
134
- """Release model from an environment
137
+ ) -> Optional[RevisionMetadata]:
138
+ """List model revisions
135
139
 
136
- Make a release for a model from an environment to another.
140
+ Returns revisions for a model by name.
137
141
 
138
142
  Args:
139
143
  model_name (str):
@@ -143,7 +147,7 @@ async def asyncio(
143
147
  httpx.TimeoutException: If the request takes longer than Client.timeout.
144
148
 
145
149
  Returns:
146
- ModelRelease
150
+ RevisionMetadata
147
151
  """
148
152
 
149
153
  return (
@@ -6,23 +6,13 @@ 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 UNSET, Response, Unset
9
+ from ...types import Response
10
10
 
11
11
 
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
-
12
+ def _get_kwargs() -> dict[str, Any]:
22
13
  _kwargs: dict[str, Any] = {
23
14
  "method": "get",
24
15
  "url": "/models",
25
- "params": params,
26
16
  }
27
17
 
28
18
  return _kwargs
@@ -56,15 +46,11 @@ def _build_response(*, client: Union[AuthenticatedClient, Client], response: htt
56
46
  def sync_detailed(
57
47
  *,
58
48
  client: AuthenticatedClient,
59
- environment: Union[Unset, str] = UNSET,
60
49
  ) -> Response[list["Model"]]:
61
50
  """List models
62
51
 
63
52
  Returns a list of all models in the workspace.
64
53
 
65
- Args:
66
- environment (Union[Unset, str]):
67
-
68
54
  Raises:
69
55
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
70
56
  httpx.TimeoutException: If the request takes longer than Client.timeout.
@@ -73,9 +59,7 @@ def sync_detailed(
73
59
  Response[list['Model']]
74
60
  """
75
61
 
76
- kwargs = _get_kwargs(
77
- environment=environment,
78
- )
62
+ kwargs = _get_kwargs()
79
63
 
80
64
  response = client.get_httpx_client().request(
81
65
  **kwargs,
@@ -87,15 +71,11 @@ def sync_detailed(
87
71
  def sync(
88
72
  *,
89
73
  client: AuthenticatedClient,
90
- environment: Union[Unset, str] = UNSET,
91
74
  ) -> Optional[list["Model"]]:
92
75
  """List models
93
76
 
94
77
  Returns a list of all models in the workspace.
95
78
 
96
- Args:
97
- environment (Union[Unset, str]):
98
-
99
79
  Raises:
100
80
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
101
81
  httpx.TimeoutException: If the request takes longer than Client.timeout.
@@ -106,22 +86,17 @@ def sync(
106
86
 
107
87
  return sync_detailed(
108
88
  client=client,
109
- environment=environment,
110
89
  ).parsed
111
90
 
112
91
 
113
92
  async def asyncio_detailed(
114
93
  *,
115
94
  client: AuthenticatedClient,
116
- environment: Union[Unset, str] = UNSET,
117
95
  ) -> Response[list["Model"]]:
118
96
  """List models
119
97
 
120
98
  Returns a list of all models in the workspace.
121
99
 
122
- Args:
123
- environment (Union[Unset, str]):
124
-
125
100
  Raises:
126
101
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
127
102
  httpx.TimeoutException: If the request takes longer than Client.timeout.
@@ -130,9 +105,7 @@ async def asyncio_detailed(
130
105
  Response[list['Model']]
131
106
  """
132
107
 
133
- kwargs = _get_kwargs(
134
- environment=environment,
135
- )
108
+ kwargs = _get_kwargs()
136
109
 
137
110
  response = await client.get_async_httpx_client().request(**kwargs)
138
111
 
@@ -142,15 +115,11 @@ async def asyncio_detailed(
142
115
  async def asyncio(
143
116
  *,
144
117
  client: AuthenticatedClient,
145
- environment: Union[Unset, str] = UNSET,
146
118
  ) -> Optional[list["Model"]]:
147
119
  """List models
148
120
 
149
121
  Returns a list of all models in the workspace.
150
122
 
151
- Args:
152
- environment (Union[Unset, str]):
153
-
154
123
  Raises:
155
124
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
156
125
  httpx.TimeoutException: If the request takes longer than Client.timeout.
@@ -162,6 +131,5 @@ async def asyncio(
162
131
  return (
163
132
  await asyncio_detailed(
164
133
  client=client,
165
- environment=environment,
166
134
  )
167
135
  ).parsed
@@ -62,8 +62,7 @@ def sync_detailed(
62
62
 
63
63
  Args:
64
64
  model_name (str):
65
- body (Model): Logical object representing a model, that can be instantiated in multiple
66
- environments as model deployments
65
+ body (Model): Logical object representing a model
67
66
 
68
67
  Raises:
69
68
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -97,8 +96,7 @@ def sync(
97
96
 
98
97
  Args:
99
98
  model_name (str):
100
- body (Model): Logical object representing a model, that can be instantiated in multiple
101
- environments as model deployments
99
+ body (Model): Logical object representing a model
102
100
 
103
101
  Raises:
104
102
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -127,8 +125,7 @@ async def asyncio_detailed(
127
125
 
128
126
  Args:
129
127
  model_name (str):
130
- body (Model): Logical object representing a model, that can be instantiated in multiple
131
- environments as model deployments
128
+ body (Model): Logical object representing a model
132
129
 
133
130
  Raises:
134
131
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -160,8 +157,7 @@ async def asyncio(
160
157
 
161
158
  Args:
162
159
  model_name (str):
163
- body (Model): Logical object representing a model, that can be instantiated in multiple
164
- environments as model deployments
160
+ body (Model): Logical object representing a model
165
161
 
166
162
  Raises:
167
163
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -57,10 +57,8 @@ class ContextConfig:
57
57
 
58
58
  Attributes:
59
59
  workspace (str): The name of the current workspace.
60
- environment (str): The current environment (e.g., development, production).
61
60
  """
62
61
  workspace: str = ""
63
- environment: str = ""
64
62
 
65
63
 
66
64
  @dataclass
@@ -108,7 +106,6 @@ class Config:
108
106
  ],
109
107
  "context": {
110
108
  "workspace": self.context.workspace,
111
- "environment": self.context.environment,
112
109
  },
113
110
  }
114
111
 
@@ -186,17 +183,15 @@ def current_context() -> ContextConfig:
186
183
  return config.context
187
184
 
188
185
 
189
- def set_current_workspace(workspace_name: str, environment: str):
186
+ def set_current_workspace(workspace_name: str):
190
187
  """
191
- Sets the current workspace and environment in the configuration.
188
+ Sets the current workspace in the configuration.
192
189
 
193
190
  Parameters:
194
191
  workspace_name (str): The name of the workspace to set as current.
195
- environment (str): The environment to set for the workspace.
196
192
  """
197
193
  config = load_config()
198
194
  config.context.workspace = workspace_name
199
- config.context.environment = environment
200
195
  save_config(config)
201
196
 
202
197
 
@@ -76,7 +76,6 @@ class Settings(BaseSettings):
76
76
  )
77
77
 
78
78
  workspace: str
79
- environment: str = Field(default="production")
80
79
  remote: bool = Field(default=False)
81
80
  type: str = Field(default="agent")
82
81
  name: str = Field(default="beamlit-agent")
@@ -130,7 +129,7 @@ def init() -> Settings:
130
129
  """
131
130
  Initializes the settings by parsing the `beamlit.yaml` file and setting up logging.
132
131
 
133
- This function reads workspace and environment configurations from the current context,
132
+ This function reads workspace configuration from the current context,
134
133
  initializes the global SETTINGS variable, and configures the logger based on the log level.
135
134
 
136
135
  Returns:
@@ -144,8 +143,6 @@ def init() -> Settings:
144
143
  kwargs = {}
145
144
  if context.workspace:
146
145
  kwargs["workspace"] = context.workspace
147
- if context.environment:
148
- kwargs["environment"] = context.environment
149
146
 
150
147
  SETTINGS = Settings(**kwargs)
151
148
  init_logger(SETTINGS.log_level)