beamlit 0.0.56rc106__py3-none-any.whl → 0.0.57__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.
- beamlit/agents/chain.py +0 -2
- beamlit/agents/chat.py +20 -8
- beamlit/agents/decorator.py +112 -99
- beamlit/agents/thread.py +5 -9
- beamlit/api/agents/delete_agent.py +1 -22
- beamlit/api/agents/get_agent.py +1 -22
- beamlit/api/agents/get_agent_metrics.py +13 -34
- beamlit/api/agents/get_agent_trace_ids.py +44 -14
- beamlit/api/agents/{list_agent_history.py → list_agent_revisions.py} +21 -17
- beamlit/api/agents/list_agents.py +4 -36
- beamlit/api/default/get_trace_ids.py +0 -15
- beamlit/api/default/list_mcp_hub_definitions.py +12 -12
- beamlit/api/functions/delete_function.py +1 -22
- beamlit/api/functions/get_function.py +1 -22
- beamlit/api/functions/get_function_metrics.py +13 -34
- beamlit/api/functions/get_function_trace_ids.py +44 -14
- beamlit/api/functions/{create_function_release.py → list_function_revisions.py} +26 -18
- beamlit/api/functions/list_functions.py +4 -36
- beamlit/api/knowledgebases/create_knowledgebase.py +4 -4
- beamlit/api/knowledgebases/delete_knowledgebase.py +5 -26
- beamlit/api/knowledgebases/get_knowledgebase.py +1 -22
- beamlit/api/{environments/get_environment_metrics.py → knowledgebases/list_knowledgebase_revisions.py} +34 -34
- beamlit/api/knowledgebases/list_knowledgebases.py +4 -36
- beamlit/api/models/create_model.py +4 -8
- beamlit/api/models/delete_model.py +1 -22
- beamlit/api/models/get_model.py +1 -22
- beamlit/api/models/get_model_metrics.py +13 -34
- beamlit/api/models/get_model_trace_ids.py +44 -14
- beamlit/api/models/{release_model.py → list_model_revisions.py} +26 -22
- beamlit/api/models/list_models.py +4 -36
- beamlit/api/models/update_model.py +4 -8
- beamlit/authentication/authentication.py +11 -8
- beamlit/authentication/clientcredentials.py +15 -28
- beamlit/authentication/credentials.py +2 -7
- beamlit/common/settings.py +1 -4
- beamlit/deploy/deploy.py +15 -9
- beamlit/functions/common.py +16 -16
- beamlit/functions/local/local.py +4 -5
- beamlit/functions/mcp/client.py +96 -0
- beamlit/functions/mcp/mcp.py +56 -43
- beamlit/functions/remote/remote.py +9 -11
- beamlit/models/__init__.py +8 -38
- beamlit/models/agent.py +6 -6
- beamlit/models/function.py +6 -6
- beamlit/models/knowledgebase.py +6 -6
- beamlit/models/last_n_requests_metric.py +0 -9
- beamlit/models/model.py +7 -7
- beamlit/models/{resource_environment_metrics.py → resource_metrics.py} +20 -26
- beamlit/models/{resource_environment_metrics_request_total_per_code.py → resource_metrics_request_total_per_code.py} +5 -5
- beamlit/models/{resource_environment_metrics_rps_per_code.py → resource_metrics_rps_per_code.py} +5 -5
- beamlit/models/{model_release.py → revision_metadata.py} +20 -20
- beamlit/models/runtime.py +2 -2
- beamlit/models/workspace.py +0 -9
- beamlit/run.py +3 -7
- beamlit/serve/app.py +4 -8
- {beamlit-0.0.56rc106.dist-info → beamlit-0.0.57.dist-info}/METADATA +2 -1
- {beamlit-0.0.56rc106.dist-info → beamlit-0.0.57.dist-info}/RECORD +63 -91
- beamlit/api/agents/create_agent_release.py +0 -146
- beamlit/api/agents/delete_agent_history.py +0 -155
- beamlit/api/agents/get_agent_history.py +0 -155
- beamlit/api/agents/put_agent_history.py +0 -181
- beamlit/api/environments/__init__.py +0 -0
- beamlit/api/environments/create_environment.py +0 -167
- beamlit/api/environments/delete_environment.py +0 -154
- beamlit/api/environments/get_environment.py +0 -154
- beamlit/api/environments/list_environments.py +0 -139
- beamlit/api/environments/update_environment.py +0 -180
- beamlit/api/generation/__init__.py +0 -0
- beamlit/api/generation/run_information_generation_agent.py +0 -168
- beamlit/api/history/__init__.py +0 -0
- beamlit/api/history/get_agents_history.py +0 -155
- beamlit/api/history/list_agents_history.py +0 -131
- beamlit/models/agent_history.py +0 -167
- beamlit/models/agent_history_event.py +0 -133
- beamlit/models/agent_information_request.py +0 -63
- beamlit/models/agent_information_response.py +0 -79
- beamlit/models/agent_release.py +0 -70
- beamlit/models/environment.py +0 -96
- beamlit/models/environment_metadata.py +0 -148
- beamlit/models/environment_metrics.py +0 -77
- beamlit/models/environment_spec.py +0 -63
- beamlit/models/function_release.py +0 -70
- beamlit/models/knowledgebase_release.py +0 -70
- beamlit/models/mcp_hub_artifact.py +0 -188
- beamlit/models/mcp_hub_artifact_entrypoint.py +0 -45
- beamlit/models/mcp_hub_artifact_form.py +0 -45
- /beamlit/api/agents/{get_agent_environment_logs.py → get_agent_logs.py} +0 -0
- /beamlit/api/functions/{get_function_environment_logs.py → get_function_logs.py} +0 -0
- /beamlit/api/models/{get_model_environment_logs.py → get_model_logs.py} +0 -0
- {beamlit-0.0.56rc106.dist-info → beamlit-0.0.57.dist-info}/WHEEL +0 -0
- {beamlit-0.0.56rc106.dist-info → beamlit-0.0.57.dist-info}/entry_points.txt +0 -0
- {beamlit-0.0.56rc106.dist-info → beamlit-0.0.57.dist-info}/licenses/LICENSE +0 -0
@@ -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
|
@@ -1,180 +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
|
-
*,
|
15
|
-
body: Environment,
|
16
|
-
) -> dict[str, Any]:
|
17
|
-
headers: dict[str, Any] = {}
|
18
|
-
|
19
|
-
_kwargs: dict[str, Any] = {
|
20
|
-
"method": "put",
|
21
|
-
"url": f"/environments/{environment_name}",
|
22
|
-
}
|
23
|
-
|
24
|
-
_body = body.to_dict()
|
25
|
-
|
26
|
-
_kwargs["json"] = _body
|
27
|
-
headers["Content-Type"] = "application/json"
|
28
|
-
|
29
|
-
_kwargs["headers"] = headers
|
30
|
-
return _kwargs
|
31
|
-
|
32
|
-
|
33
|
-
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Environment]:
|
34
|
-
if response.status_code == 200:
|
35
|
-
response_200 = Environment.from_dict(response.json())
|
36
|
-
|
37
|
-
return response_200
|
38
|
-
if client.raise_on_unexpected_status:
|
39
|
-
raise errors.UnexpectedStatus(response.status_code, response.content)
|
40
|
-
else:
|
41
|
-
return None
|
42
|
-
|
43
|
-
|
44
|
-
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Environment]:
|
45
|
-
return Response(
|
46
|
-
status_code=HTTPStatus(response.status_code),
|
47
|
-
content=response.content,
|
48
|
-
headers=response.headers,
|
49
|
-
parsed=_parse_response(client=client, response=response),
|
50
|
-
)
|
51
|
-
|
52
|
-
|
53
|
-
def sync_detailed(
|
54
|
-
environment_name: str,
|
55
|
-
*,
|
56
|
-
client: AuthenticatedClient,
|
57
|
-
body: Environment,
|
58
|
-
) -> Response[Environment]:
|
59
|
-
"""Update environment
|
60
|
-
|
61
|
-
Updates an environment.
|
62
|
-
|
63
|
-
Args:
|
64
|
-
environment_name (str):
|
65
|
-
body (Environment): Environment on which deployments will be made (e.g. development,
|
66
|
-
production), enforcing multiple policies at once.
|
67
|
-
|
68
|
-
Raises:
|
69
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
70
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
71
|
-
|
72
|
-
Returns:
|
73
|
-
Response[Environment]
|
74
|
-
"""
|
75
|
-
|
76
|
-
kwargs = _get_kwargs(
|
77
|
-
environment_name=environment_name,
|
78
|
-
body=body,
|
79
|
-
)
|
80
|
-
|
81
|
-
response = client.get_httpx_client().request(
|
82
|
-
**kwargs,
|
83
|
-
)
|
84
|
-
|
85
|
-
return _build_response(client=client, response=response)
|
86
|
-
|
87
|
-
|
88
|
-
def sync(
|
89
|
-
environment_name: str,
|
90
|
-
*,
|
91
|
-
client: AuthenticatedClient,
|
92
|
-
body: Environment,
|
93
|
-
) -> Optional[Environment]:
|
94
|
-
"""Update environment
|
95
|
-
|
96
|
-
Updates an environment.
|
97
|
-
|
98
|
-
Args:
|
99
|
-
environment_name (str):
|
100
|
-
body (Environment): Environment on which deployments will be made (e.g. development,
|
101
|
-
production), enforcing multiple policies at once.
|
102
|
-
|
103
|
-
Raises:
|
104
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
105
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
106
|
-
|
107
|
-
Returns:
|
108
|
-
Environment
|
109
|
-
"""
|
110
|
-
|
111
|
-
return sync_detailed(
|
112
|
-
environment_name=environment_name,
|
113
|
-
client=client,
|
114
|
-
body=body,
|
115
|
-
).parsed
|
116
|
-
|
117
|
-
|
118
|
-
async def asyncio_detailed(
|
119
|
-
environment_name: str,
|
120
|
-
*,
|
121
|
-
client: AuthenticatedClient,
|
122
|
-
body: Environment,
|
123
|
-
) -> Response[Environment]:
|
124
|
-
"""Update environment
|
125
|
-
|
126
|
-
Updates an environment.
|
127
|
-
|
128
|
-
Args:
|
129
|
-
environment_name (str):
|
130
|
-
body (Environment): Environment on which deployments will be made (e.g. development,
|
131
|
-
production), enforcing multiple policies at once.
|
132
|
-
|
133
|
-
Raises:
|
134
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
135
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
136
|
-
|
137
|
-
Returns:
|
138
|
-
Response[Environment]
|
139
|
-
"""
|
140
|
-
|
141
|
-
kwargs = _get_kwargs(
|
142
|
-
environment_name=environment_name,
|
143
|
-
body=body,
|
144
|
-
)
|
145
|
-
|
146
|
-
response = await client.get_async_httpx_client().request(**kwargs)
|
147
|
-
|
148
|
-
return _build_response(client=client, response=response)
|
149
|
-
|
150
|
-
|
151
|
-
async def asyncio(
|
152
|
-
environment_name: str,
|
153
|
-
*,
|
154
|
-
client: AuthenticatedClient,
|
155
|
-
body: Environment,
|
156
|
-
) -> Optional[Environment]:
|
157
|
-
"""Update environment
|
158
|
-
|
159
|
-
Updates an environment.
|
160
|
-
|
161
|
-
Args:
|
162
|
-
environment_name (str):
|
163
|
-
body (Environment): Environment on which deployments will be made (e.g. development,
|
164
|
-
production), enforcing multiple policies at once.
|
165
|
-
|
166
|
-
Raises:
|
167
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
168
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
169
|
-
|
170
|
-
Returns:
|
171
|
-
Environment
|
172
|
-
"""
|
173
|
-
|
174
|
-
return (
|
175
|
-
await asyncio_detailed(
|
176
|
-
environment_name=environment_name,
|
177
|
-
client=client,
|
178
|
-
body=body,
|
179
|
-
)
|
180
|
-
).parsed
|
File without changes
|
@@ -1,168 +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.agent_information_request import AgentInformationRequest
|
9
|
-
from ...models.agent_information_response import AgentInformationResponse
|
10
|
-
from ...types import Response
|
11
|
-
|
12
|
-
|
13
|
-
def _get_kwargs(
|
14
|
-
*,
|
15
|
-
body: AgentInformationRequest,
|
16
|
-
) -> dict[str, Any]:
|
17
|
-
headers: dict[str, Any] = {}
|
18
|
-
|
19
|
-
_kwargs: dict[str, Any] = {
|
20
|
-
"method": "post",
|
21
|
-
"url": "/generation/agents/information",
|
22
|
-
}
|
23
|
-
|
24
|
-
_body = body.to_dict()
|
25
|
-
|
26
|
-
_kwargs["json"] = _body
|
27
|
-
headers["Content-Type"] = "application/json"
|
28
|
-
|
29
|
-
_kwargs["headers"] = headers
|
30
|
-
return _kwargs
|
31
|
-
|
32
|
-
|
33
|
-
def _parse_response(
|
34
|
-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
35
|
-
) -> Optional[AgentInformationResponse]:
|
36
|
-
if response.status_code == 200:
|
37
|
-
response_200 = AgentInformationResponse.from_dict(response.json())
|
38
|
-
|
39
|
-
return response_200
|
40
|
-
if client.raise_on_unexpected_status:
|
41
|
-
raise errors.UnexpectedStatus(response.status_code, response.content)
|
42
|
-
else:
|
43
|
-
return None
|
44
|
-
|
45
|
-
|
46
|
-
def _build_response(
|
47
|
-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
48
|
-
) -> Response[AgentInformationResponse]:
|
49
|
-
return Response(
|
50
|
-
status_code=HTTPStatus(response.status_code),
|
51
|
-
content=response.content,
|
52
|
-
headers=response.headers,
|
53
|
-
parsed=_parse_response(client=client, response=response),
|
54
|
-
)
|
55
|
-
|
56
|
-
|
57
|
-
def sync_detailed(
|
58
|
-
*,
|
59
|
-
client: AuthenticatedClient,
|
60
|
-
body: AgentInformationRequest,
|
61
|
-
) -> Response[AgentInformationResponse]:
|
62
|
-
"""Run information generation agent
|
63
|
-
|
64
|
-
Run information generation agent
|
65
|
-
|
66
|
-
Args:
|
67
|
-
body (AgentInformationRequest): generation agent information request
|
68
|
-
|
69
|
-
Raises:
|
70
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
71
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
72
|
-
|
73
|
-
Returns:
|
74
|
-
Response[AgentInformationResponse]
|
75
|
-
"""
|
76
|
-
|
77
|
-
kwargs = _get_kwargs(
|
78
|
-
body=body,
|
79
|
-
)
|
80
|
-
|
81
|
-
response = client.get_httpx_client().request(
|
82
|
-
**kwargs,
|
83
|
-
)
|
84
|
-
|
85
|
-
return _build_response(client=client, response=response)
|
86
|
-
|
87
|
-
|
88
|
-
def sync(
|
89
|
-
*,
|
90
|
-
client: AuthenticatedClient,
|
91
|
-
body: AgentInformationRequest,
|
92
|
-
) -> Optional[AgentInformationResponse]:
|
93
|
-
"""Run information generation agent
|
94
|
-
|
95
|
-
Run information generation agent
|
96
|
-
|
97
|
-
Args:
|
98
|
-
body (AgentInformationRequest): generation agent information request
|
99
|
-
|
100
|
-
Raises:
|
101
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
102
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
103
|
-
|
104
|
-
Returns:
|
105
|
-
AgentInformationResponse
|
106
|
-
"""
|
107
|
-
|
108
|
-
return sync_detailed(
|
109
|
-
client=client,
|
110
|
-
body=body,
|
111
|
-
).parsed
|
112
|
-
|
113
|
-
|
114
|
-
async def asyncio_detailed(
|
115
|
-
*,
|
116
|
-
client: AuthenticatedClient,
|
117
|
-
body: AgentInformationRequest,
|
118
|
-
) -> Response[AgentInformationResponse]:
|
119
|
-
"""Run information generation agent
|
120
|
-
|
121
|
-
Run information generation agent
|
122
|
-
|
123
|
-
Args:
|
124
|
-
body (AgentInformationRequest): generation agent information request
|
125
|
-
|
126
|
-
Raises:
|
127
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
128
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
129
|
-
|
130
|
-
Returns:
|
131
|
-
Response[AgentInformationResponse]
|
132
|
-
"""
|
133
|
-
|
134
|
-
kwargs = _get_kwargs(
|
135
|
-
body=body,
|
136
|
-
)
|
137
|
-
|
138
|
-
response = await client.get_async_httpx_client().request(**kwargs)
|
139
|
-
|
140
|
-
return _build_response(client=client, response=response)
|
141
|
-
|
142
|
-
|
143
|
-
async def asyncio(
|
144
|
-
*,
|
145
|
-
client: AuthenticatedClient,
|
146
|
-
body: AgentInformationRequest,
|
147
|
-
) -> Optional[AgentInformationResponse]:
|
148
|
-
"""Run information generation agent
|
149
|
-
|
150
|
-
Run information generation agent
|
151
|
-
|
152
|
-
Args:
|
153
|
-
body (AgentInformationRequest): generation agent information request
|
154
|
-
|
155
|
-
Raises:
|
156
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
157
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
158
|
-
|
159
|
-
Returns:
|
160
|
-
AgentInformationResponse
|
161
|
-
"""
|
162
|
-
|
163
|
-
return (
|
164
|
-
await asyncio_detailed(
|
165
|
-
client=client,
|
166
|
-
body=body,
|
167
|
-
)
|
168
|
-
).parsed
|
beamlit/api/history/__init__.py
DELETED
File without changes
|