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
@@ -1,167 +0,0 @@
1
- from http import HTTPStatus
2
- from typing import Any, Optional, Union
3
-
4
- import httpx
5
-
6
- from ... import errors
7
- from ...client import AuthenticatedClient, Client
8
- from ...models.environment import Environment
9
- from ...types import Response
10
-
11
-
12
- def _get_kwargs(
13
- *,
14
- body: Environment,
15
- ) -> dict[str, Any]:
16
- headers: dict[str, Any] = {}
17
-
18
- _kwargs: dict[str, Any] = {
19
- "method": "post",
20
- "url": "/environments",
21
- }
22
-
23
- _body = body.to_dict()
24
-
25
- _kwargs["json"] = _body
26
- headers["Content-Type"] = "application/json"
27
-
28
- _kwargs["headers"] = headers
29
- return _kwargs
30
-
31
-
32
- def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Environment]:
33
- if response.status_code == 200:
34
- response_200 = Environment.from_dict(response.json())
35
-
36
- return response_200
37
- if client.raise_on_unexpected_status:
38
- raise errors.UnexpectedStatus(response.status_code, response.content)
39
- else:
40
- return None
41
-
42
-
43
- def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Environment]:
44
- return Response(
45
- status_code=HTTPStatus(response.status_code),
46
- content=response.content,
47
- headers=response.headers,
48
- parsed=_parse_response(client=client, response=response),
49
- )
50
-
51
-
52
- def sync_detailed(
53
- *,
54
- client: AuthenticatedClient,
55
- body: Environment,
56
- ) -> Response[Environment]:
57
- """Create environment
58
-
59
- Creates an environment.
60
-
61
- Args:
62
- body (Environment): Environment on which deployments will be made (e.g. development,
63
- production), enforcing multiple policies at once.
64
-
65
- Raises:
66
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
67
- httpx.TimeoutException: If the request takes longer than Client.timeout.
68
-
69
- Returns:
70
- Response[Environment]
71
- """
72
-
73
- kwargs = _get_kwargs(
74
- body=body,
75
- )
76
-
77
- response = client.get_httpx_client().request(
78
- **kwargs,
79
- )
80
-
81
- return _build_response(client=client, response=response)
82
-
83
-
84
- def sync(
85
- *,
86
- client: AuthenticatedClient,
87
- body: Environment,
88
- ) -> Optional[Environment]:
89
- """Create environment
90
-
91
- Creates an environment.
92
-
93
- Args:
94
- body (Environment): Environment on which deployments will be made (e.g. development,
95
- production), enforcing multiple policies at once.
96
-
97
- Raises:
98
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
99
- httpx.TimeoutException: If the request takes longer than Client.timeout.
100
-
101
- Returns:
102
- Environment
103
- """
104
-
105
- return sync_detailed(
106
- client=client,
107
- body=body,
108
- ).parsed
109
-
110
-
111
- async def asyncio_detailed(
112
- *,
113
- client: AuthenticatedClient,
114
- body: Environment,
115
- ) -> Response[Environment]:
116
- """Create environment
117
-
118
- Creates an environment.
119
-
120
- Args:
121
- body (Environment): Environment on which deployments will be made (e.g. development,
122
- production), enforcing multiple policies at once.
123
-
124
- Raises:
125
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
126
- httpx.TimeoutException: If the request takes longer than Client.timeout.
127
-
128
- Returns:
129
- Response[Environment]
130
- """
131
-
132
- kwargs = _get_kwargs(
133
- body=body,
134
- )
135
-
136
- response = await client.get_async_httpx_client().request(**kwargs)
137
-
138
- return _build_response(client=client, response=response)
139
-
140
-
141
- async def asyncio(
142
- *,
143
- client: AuthenticatedClient,
144
- body: Environment,
145
- ) -> Optional[Environment]:
146
- """Create environment
147
-
148
- Creates an environment.
149
-
150
- Args:
151
- body (Environment): Environment on which deployments will be made (e.g. development,
152
- production), enforcing multiple policies at once.
153
-
154
- Raises:
155
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
156
- httpx.TimeoutException: If the request takes longer than Client.timeout.
157
-
158
- Returns:
159
- Environment
160
- """
161
-
162
- return (
163
- await asyncio_detailed(
164
- client=client,
165
- body=body,
166
- )
167
- ).parsed
@@ -1,154 +0,0 @@
1
- from http import HTTPStatus
2
- from typing import Any, Optional, Union
3
-
4
- import httpx
5
-
6
- from ... import errors
7
- from ...client import AuthenticatedClient, Client
8
- from ...models.environment import Environment
9
- from ...types import Response
10
-
11
-
12
- def _get_kwargs(
13
- environment_name: str,
14
- ) -> dict[str, Any]:
15
- _kwargs: dict[str, Any] = {
16
- "method": "delete",
17
- "url": f"/environments/{environment_name}",
18
- }
19
-
20
- return _kwargs
21
-
22
-
23
- def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Environment]:
24
- if response.status_code == 200:
25
- response_200 = Environment.from_dict(response.json())
26
-
27
- return response_200
28
- if client.raise_on_unexpected_status:
29
- raise errors.UnexpectedStatus(response.status_code, response.content)
30
- else:
31
- return None
32
-
33
-
34
- def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Environment]:
35
- return Response(
36
- status_code=HTTPStatus(response.status_code),
37
- content=response.content,
38
- headers=response.headers,
39
- parsed=_parse_response(client=client, response=response),
40
- )
41
-
42
-
43
- def sync_detailed(
44
- environment_name: str,
45
- *,
46
- client: AuthenticatedClient,
47
- ) -> Response[Environment]:
48
- """Delete environment
49
-
50
- Deletes an environment by name.
51
-
52
- Args:
53
- environment_name (str):
54
-
55
- Raises:
56
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
57
- httpx.TimeoutException: If the request takes longer than Client.timeout.
58
-
59
- Returns:
60
- Response[Environment]
61
- """
62
-
63
- kwargs = _get_kwargs(
64
- environment_name=environment_name,
65
- )
66
-
67
- response = client.get_httpx_client().request(
68
- **kwargs,
69
- )
70
-
71
- return _build_response(client=client, response=response)
72
-
73
-
74
- def sync(
75
- environment_name: str,
76
- *,
77
- client: AuthenticatedClient,
78
- ) -> Optional[Environment]:
79
- """Delete environment
80
-
81
- Deletes an environment by name.
82
-
83
- Args:
84
- environment_name (str):
85
-
86
- Raises:
87
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
88
- httpx.TimeoutException: If the request takes longer than Client.timeout.
89
-
90
- Returns:
91
- Environment
92
- """
93
-
94
- return sync_detailed(
95
- environment_name=environment_name,
96
- client=client,
97
- ).parsed
98
-
99
-
100
- async def asyncio_detailed(
101
- environment_name: str,
102
- *,
103
- client: AuthenticatedClient,
104
- ) -> Response[Environment]:
105
- """Delete environment
106
-
107
- Deletes an environment by name.
108
-
109
- Args:
110
- environment_name (str):
111
-
112
- Raises:
113
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
114
- httpx.TimeoutException: If the request takes longer than Client.timeout.
115
-
116
- Returns:
117
- Response[Environment]
118
- """
119
-
120
- kwargs = _get_kwargs(
121
- environment_name=environment_name,
122
- )
123
-
124
- response = await client.get_async_httpx_client().request(**kwargs)
125
-
126
- return _build_response(client=client, response=response)
127
-
128
-
129
- async def asyncio(
130
- environment_name: str,
131
- *,
132
- client: AuthenticatedClient,
133
- ) -> Optional[Environment]:
134
- """Delete environment
135
-
136
- Deletes an environment by name.
137
-
138
- Args:
139
- environment_name (str):
140
-
141
- Raises:
142
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
143
- httpx.TimeoutException: If the request takes longer than Client.timeout.
144
-
145
- Returns:
146
- Environment
147
- """
148
-
149
- return (
150
- await asyncio_detailed(
151
- environment_name=environment_name,
152
- client=client,
153
- )
154
- ).parsed
@@ -1,154 +0,0 @@
1
- from http import HTTPStatus
2
- from typing import Any, Optional, Union
3
-
4
- import httpx
5
-
6
- from ... import errors
7
- from ...client import AuthenticatedClient, Client
8
- from ...models.environment import Environment
9
- from ...types import Response
10
-
11
-
12
- def _get_kwargs(
13
- environment_name: str,
14
- ) -> dict[str, Any]:
15
- _kwargs: dict[str, Any] = {
16
- "method": "get",
17
- "url": f"/environments/{environment_name}",
18
- }
19
-
20
- return _kwargs
21
-
22
-
23
- def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Environment]:
24
- if response.status_code == 200:
25
- response_200 = Environment.from_dict(response.json())
26
-
27
- return response_200
28
- if client.raise_on_unexpected_status:
29
- raise errors.UnexpectedStatus(response.status_code, response.content)
30
- else:
31
- return None
32
-
33
-
34
- def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Environment]:
35
- return Response(
36
- status_code=HTTPStatus(response.status_code),
37
- content=response.content,
38
- headers=response.headers,
39
- parsed=_parse_response(client=client, response=response),
40
- )
41
-
42
-
43
- def sync_detailed(
44
- environment_name: str,
45
- *,
46
- client: AuthenticatedClient,
47
- ) -> Response[Environment]:
48
- """Get environment
49
-
50
- Returns an environment by name.
51
-
52
- Args:
53
- environment_name (str):
54
-
55
- Raises:
56
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
57
- httpx.TimeoutException: If the request takes longer than Client.timeout.
58
-
59
- Returns:
60
- Response[Environment]
61
- """
62
-
63
- kwargs = _get_kwargs(
64
- environment_name=environment_name,
65
- )
66
-
67
- response = client.get_httpx_client().request(
68
- **kwargs,
69
- )
70
-
71
- return _build_response(client=client, response=response)
72
-
73
-
74
- def sync(
75
- environment_name: str,
76
- *,
77
- client: AuthenticatedClient,
78
- ) -> Optional[Environment]:
79
- """Get environment
80
-
81
- Returns an environment by name.
82
-
83
- Args:
84
- environment_name (str):
85
-
86
- Raises:
87
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
88
- httpx.TimeoutException: If the request takes longer than Client.timeout.
89
-
90
- Returns:
91
- Environment
92
- """
93
-
94
- return sync_detailed(
95
- environment_name=environment_name,
96
- client=client,
97
- ).parsed
98
-
99
-
100
- async def asyncio_detailed(
101
- environment_name: str,
102
- *,
103
- client: AuthenticatedClient,
104
- ) -> Response[Environment]:
105
- """Get environment
106
-
107
- Returns an environment by name.
108
-
109
- Args:
110
- environment_name (str):
111
-
112
- Raises:
113
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
114
- httpx.TimeoutException: If the request takes longer than Client.timeout.
115
-
116
- Returns:
117
- Response[Environment]
118
- """
119
-
120
- kwargs = _get_kwargs(
121
- environment_name=environment_name,
122
- )
123
-
124
- response = await client.get_async_httpx_client().request(**kwargs)
125
-
126
- return _build_response(client=client, response=response)
127
-
128
-
129
- async def asyncio(
130
- environment_name: str,
131
- *,
132
- client: AuthenticatedClient,
133
- ) -> Optional[Environment]:
134
- """Get environment
135
-
136
- Returns an environment by name.
137
-
138
- Args:
139
- environment_name (str):
140
-
141
- Raises:
142
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
143
- httpx.TimeoutException: If the request takes longer than Client.timeout.
144
-
145
- Returns:
146
- Environment
147
- """
148
-
149
- return (
150
- await asyncio_detailed(
151
- environment_name=environment_name,
152
- client=client,
153
- )
154
- ).parsed
@@ -1,139 +0,0 @@
1
- from http import HTTPStatus
2
- from typing import Any, Optional, Union
3
-
4
- import httpx
5
-
6
- from ... import errors
7
- from ...client import AuthenticatedClient, Client
8
- from ...models.environment import Environment
9
- from ...types import Response
10
-
11
-
12
- def _get_kwargs() -> dict[str, Any]:
13
- _kwargs: dict[str, Any] = {
14
- "method": "get",
15
- "url": "/environments",
16
- }
17
-
18
- return _kwargs
19
-
20
-
21
- def _parse_response(
22
- *, client: Union[AuthenticatedClient, Client], response: httpx.Response
23
- ) -> Optional[list["Environment"]]:
24
- if response.status_code == 200:
25
- response_200 = []
26
- _response_200 = response.json()
27
- for response_200_item_data in _response_200:
28
- response_200_item = Environment.from_dict(response_200_item_data)
29
-
30
- response_200.append(response_200_item)
31
-
32
- return response_200
33
- if client.raise_on_unexpected_status:
34
- raise errors.UnexpectedStatus(response.status_code, response.content)
35
- else:
36
- return None
37
-
38
-
39
- def _build_response(
40
- *, client: Union[AuthenticatedClient, Client], response: httpx.Response
41
- ) -> Response[list["Environment"]]:
42
- return Response(
43
- status_code=HTTPStatus(response.status_code),
44
- content=response.content,
45
- headers=response.headers,
46
- parsed=_parse_response(client=client, response=response),
47
- )
48
-
49
-
50
- def sync_detailed(
51
- *,
52
- client: AuthenticatedClient,
53
- ) -> Response[list["Environment"]]:
54
- """List environments
55
-
56
- Returns a list of all environments in the workspace.
57
-
58
- Raises:
59
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
60
- httpx.TimeoutException: If the request takes longer than Client.timeout.
61
-
62
- Returns:
63
- Response[list['Environment']]
64
- """
65
-
66
- kwargs = _get_kwargs()
67
-
68
- response = client.get_httpx_client().request(
69
- **kwargs,
70
- )
71
-
72
- return _build_response(client=client, response=response)
73
-
74
-
75
- def sync(
76
- *,
77
- client: AuthenticatedClient,
78
- ) -> Optional[list["Environment"]]:
79
- """List environments
80
-
81
- Returns a list of all environments in the workspace.
82
-
83
- Raises:
84
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
85
- httpx.TimeoutException: If the request takes longer than Client.timeout.
86
-
87
- Returns:
88
- list['Environment']
89
- """
90
-
91
- return sync_detailed(
92
- client=client,
93
- ).parsed
94
-
95
-
96
- async def asyncio_detailed(
97
- *,
98
- client: AuthenticatedClient,
99
- ) -> Response[list["Environment"]]:
100
- """List environments
101
-
102
- Returns a list of all environments in the workspace.
103
-
104
- Raises:
105
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
106
- httpx.TimeoutException: If the request takes longer than Client.timeout.
107
-
108
- Returns:
109
- Response[list['Environment']]
110
- """
111
-
112
- kwargs = _get_kwargs()
113
-
114
- response = await client.get_async_httpx_client().request(**kwargs)
115
-
116
- return _build_response(client=client, response=response)
117
-
118
-
119
- async def asyncio(
120
- *,
121
- client: AuthenticatedClient,
122
- ) -> Optional[list["Environment"]]:
123
- """List environments
124
-
125
- Returns a list of all environments in the workspace.
126
-
127
- Raises:
128
- errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
129
- httpx.TimeoutException: If the request takes longer than Client.timeout.
130
-
131
- Returns:
132
- list['Environment']
133
- """
134
-
135
- return (
136
- await asyncio_detailed(
137
- client=client,
138
- )
139
- ).parsed