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.
- beamlit/agents/chain.py +0 -2
- beamlit/agents/chat.py +1 -8
- beamlit/agents/decorator.py +5 -15
- 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/credentials.py +2 -7
- beamlit/common/settings.py +1 -4
- beamlit/deploy/deploy.py +5 -8
- beamlit/functions/mcp/mcp.py +3 -4
- beamlit/functions/remote/remote.py +1 -5
- 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 +1 -4
- beamlit/serve/app.py +4 -8
- {beamlit-0.0.57rc108.dist-info → beamlit-0.0.57rc110.dist-info}/METADATA +1 -1
- {beamlit-0.0.57rc108.dist-info → beamlit-0.0.57rc110.dist-info}/RECORD +57 -86
- 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.57rc108.dist-info → beamlit-0.0.57rc110.dist-info}/WHEEL +0 -0
- {beamlit-0.0.57rc108.dist-info → beamlit-0.0.57rc110.dist-info}/entry_points.txt +0 -0
- {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.
|
9
|
-
from ...types import
|
8
|
+
from ...models.resource_metrics import ResourceMetrics
|
9
|
+
from ...types import Response
|
10
10
|
|
11
11
|
|
12
12
|
def _get_kwargs(
|
13
13
|
function_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"/functions/{function_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[
|
25
|
+
) -> Optional[ResourceMetrics]:
|
35
26
|
if response.status_code == 200:
|
36
|
-
response_200 =
|
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[
|
38
|
+
) -> Response[ResourceMetrics]:
|
48
39
|
return Response(
|
49
40
|
status_code=HTTPStatus(response.status_code),
|
50
41
|
content=response.content,
|
@@ -57,25 +48,22 @@ def sync_detailed(
|
|
57
48
|
function_name: str,
|
58
49
|
*,
|
59
50
|
client: AuthenticatedClient,
|
60
|
-
|
61
|
-
) -> Response[ResourceEnvironmentMetrics]:
|
51
|
+
) -> Response[ResourceMetrics]:
|
62
52
|
"""Get function metrics
|
63
53
|
|
64
54
|
Args:
|
65
55
|
function_name (str):
|
66
|
-
environment (Union[Unset, str]):
|
67
56
|
|
68
57
|
Raises:
|
69
58
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
70
59
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
71
60
|
|
72
61
|
Returns:
|
73
|
-
Response[
|
62
|
+
Response[ResourceMetrics]
|
74
63
|
"""
|
75
64
|
|
76
65
|
kwargs = _get_kwargs(
|
77
66
|
function_name=function_name,
|
78
|
-
environment=environment,
|
79
67
|
)
|
80
68
|
|
81
69
|
response = client.get_httpx_client().request(
|
@@ -89,26 +77,23 @@ def sync(
|
|
89
77
|
function_name: str,
|
90
78
|
*,
|
91
79
|
client: AuthenticatedClient,
|
92
|
-
|
93
|
-
) -> Optional[ResourceEnvironmentMetrics]:
|
80
|
+
) -> Optional[ResourceMetrics]:
|
94
81
|
"""Get function metrics
|
95
82
|
|
96
83
|
Args:
|
97
84
|
function_name (str):
|
98
|
-
environment (Union[Unset, str]):
|
99
85
|
|
100
86
|
Raises:
|
101
87
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
102
88
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
103
89
|
|
104
90
|
Returns:
|
105
|
-
|
91
|
+
ResourceMetrics
|
106
92
|
"""
|
107
93
|
|
108
94
|
return sync_detailed(
|
109
95
|
function_name=function_name,
|
110
96
|
client=client,
|
111
|
-
environment=environment,
|
112
97
|
).parsed
|
113
98
|
|
114
99
|
|
@@ -116,25 +101,22 @@ async def asyncio_detailed(
|
|
116
101
|
function_name: str,
|
117
102
|
*,
|
118
103
|
client: AuthenticatedClient,
|
119
|
-
|
120
|
-
) -> Response[ResourceEnvironmentMetrics]:
|
104
|
+
) -> Response[ResourceMetrics]:
|
121
105
|
"""Get function metrics
|
122
106
|
|
123
107
|
Args:
|
124
108
|
function_name (str):
|
125
|
-
environment (Union[Unset, str]):
|
126
109
|
|
127
110
|
Raises:
|
128
111
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
129
112
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
130
113
|
|
131
114
|
Returns:
|
132
|
-
Response[
|
115
|
+
Response[ResourceMetrics]
|
133
116
|
"""
|
134
117
|
|
135
118
|
kwargs = _get_kwargs(
|
136
119
|
function_name=function_name,
|
137
|
-
environment=environment,
|
138
120
|
)
|
139
121
|
|
140
122
|
response = await client.get_async_httpx_client().request(**kwargs)
|
@@ -146,26 +128,23 @@ async def asyncio(
|
|
146
128
|
function_name: str,
|
147
129
|
*,
|
148
130
|
client: AuthenticatedClient,
|
149
|
-
|
150
|
-
) -> Optional[ResourceEnvironmentMetrics]:
|
131
|
+
) -> Optional[ResourceMetrics]:
|
151
132
|
"""Get function metrics
|
152
133
|
|
153
134
|
Args:
|
154
135
|
function_name (str):
|
155
|
-
environment (Union[Unset, str]):
|
156
136
|
|
157
137
|
Raises:
|
158
138
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
159
139
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
160
140
|
|
161
141
|
Returns:
|
162
|
-
|
142
|
+
ResourceMetrics
|
163
143
|
"""
|
164
144
|
|
165
145
|
return (
|
166
146
|
await asyncio_detailed(
|
167
147
|
function_name=function_name,
|
168
148
|
client=client,
|
169
|
-
environment=environment,
|
170
149
|
)
|
171
150
|
).parsed
|
@@ -12,11 +12,17 @@ from ...types import UNSET, Response, Unset
|
|
12
12
|
def _get_kwargs(
|
13
13
|
function_name: str,
|
14
14
|
*,
|
15
|
-
|
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["
|
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
|
function_name: str,
|
58
64
|
*,
|
59
65
|
client: AuthenticatedClient,
|
60
|
-
|
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 function trace IDs
|
63
71
|
|
64
72
|
Args:
|
65
73
|
function_name (str):
|
66
|
-
|
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
|
function_name=function_name,
|
78
|
-
|
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
|
function_name: str,
|
90
102
|
*,
|
91
103
|
client: AuthenticatedClient,
|
92
|
-
|
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 function trace IDs
|
95
109
|
|
96
110
|
Args:
|
97
111
|
function_name (str):
|
98
|
-
|
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
|
function_name=function_name,
|
110
126
|
client=client,
|
111
|
-
|
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
|
function_name: str,
|
117
135
|
*,
|
118
136
|
client: AuthenticatedClient,
|
119
|
-
|
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 function trace IDs
|
122
142
|
|
123
143
|
Args:
|
124
144
|
function_name (str):
|
125
|
-
|
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
|
function_name=function_name,
|
137
|
-
|
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
|
function_name: str,
|
147
171
|
*,
|
148
172
|
client: AuthenticatedClient,
|
149
|
-
|
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 function trace IDs
|
152
178
|
|
153
179
|
Args:
|
154
180
|
function_name (str):
|
155
|
-
|
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
|
function_name=function_name,
|
168
196
|
client=client,
|
169
|
-
|
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.
|
8
|
+
from ...models.revision_metadata import RevisionMetadata
|
9
9
|
from ...types import Response
|
10
10
|
|
11
11
|
|
@@ -13,8 +13,8 @@ def _get_kwargs(
|
|
13
13
|
function_name: str,
|
14
14
|
) -> dict[str, Any]:
|
15
15
|
_kwargs: dict[str, Any] = {
|
16
|
-
"method": "
|
17
|
-
"url": f"/functions/{function_name}/
|
16
|
+
"method": "get",
|
17
|
+
"url": f"/functions/{function_name}/revisions",
|
18
18
|
}
|
19
19
|
|
20
20
|
return _kwargs
|
@@ -22,9 +22,9 @@ def _get_kwargs(
|
|
22
22
|
|
23
23
|
def _parse_response(
|
24
24
|
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
25
|
-
) -> Optional[
|
25
|
+
) -> Optional[RevisionMetadata]:
|
26
26
|
if response.status_code == 200:
|
27
|
-
response_200 =
|
27
|
+
response_200 = RevisionMetadata.from_dict(response.json())
|
28
28
|
|
29
29
|
return response_200
|
30
30
|
if client.raise_on_unexpected_status:
|
@@ -35,7 +35,7 @@ def _parse_response(
|
|
35
35
|
|
36
36
|
def _build_response(
|
37
37
|
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
38
|
-
) -> Response[
|
38
|
+
) -> Response[RevisionMetadata]:
|
39
39
|
return Response(
|
40
40
|
status_code=HTTPStatus(response.status_code),
|
41
41
|
content=response.content,
|
@@ -48,8 +48,10 @@ def sync_detailed(
|
|
48
48
|
function_name: str,
|
49
49
|
*,
|
50
50
|
client: AuthenticatedClient,
|
51
|
-
) -> Response[
|
52
|
-
"""
|
51
|
+
) -> Response[RevisionMetadata]:
|
52
|
+
"""List function revisions
|
53
|
+
|
54
|
+
Returns revisions for a function by name.
|
53
55
|
|
54
56
|
Args:
|
55
57
|
function_name (str):
|
@@ -59,7 +61,7 @@ def sync_detailed(
|
|
59
61
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
60
62
|
|
61
63
|
Returns:
|
62
|
-
Response[
|
64
|
+
Response[RevisionMetadata]
|
63
65
|
"""
|
64
66
|
|
65
67
|
kwargs = _get_kwargs(
|
@@ -77,8 +79,10 @@ def sync(
|
|
77
79
|
function_name: str,
|
78
80
|
*,
|
79
81
|
client: AuthenticatedClient,
|
80
|
-
) -> Optional[
|
81
|
-
"""
|
82
|
+
) -> Optional[RevisionMetadata]:
|
83
|
+
"""List function revisions
|
84
|
+
|
85
|
+
Returns revisions for a function by name.
|
82
86
|
|
83
87
|
Args:
|
84
88
|
function_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
|
-
|
95
|
+
RevisionMetadata
|
92
96
|
"""
|
93
97
|
|
94
98
|
return sync_detailed(
|
@@ -101,8 +105,10 @@ async def asyncio_detailed(
|
|
101
105
|
function_name: str,
|
102
106
|
*,
|
103
107
|
client: AuthenticatedClient,
|
104
|
-
) -> Response[
|
105
|
-
"""
|
108
|
+
) -> Response[RevisionMetadata]:
|
109
|
+
"""List function revisions
|
110
|
+
|
111
|
+
Returns revisions for a function by name.
|
106
112
|
|
107
113
|
Args:
|
108
114
|
function_name (str):
|
@@ -112,7 +118,7 @@ async def asyncio_detailed(
|
|
112
118
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
113
119
|
|
114
120
|
Returns:
|
115
|
-
Response[
|
121
|
+
Response[RevisionMetadata]
|
116
122
|
"""
|
117
123
|
|
118
124
|
kwargs = _get_kwargs(
|
@@ -128,8 +134,10 @@ async def asyncio(
|
|
128
134
|
function_name: str,
|
129
135
|
*,
|
130
136
|
client: AuthenticatedClient,
|
131
|
-
) -> Optional[
|
132
|
-
"""
|
137
|
+
) -> Optional[RevisionMetadata]:
|
138
|
+
"""List function revisions
|
139
|
+
|
140
|
+
Returns revisions for a function by name.
|
133
141
|
|
134
142
|
Args:
|
135
143
|
function_name (str):
|
@@ -139,7 +147,7 @@ async def asyncio(
|
|
139
147
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
140
148
|
|
141
149
|
Returns:
|
142
|
-
|
150
|
+
RevisionMetadata
|
143
151
|
"""
|
144
152
|
|
145
153
|
return (
|
@@ -6,23 +6,13 @@ import httpx
|
|
6
6
|
from ... import errors
|
7
7
|
from ...client import AuthenticatedClient, Client
|
8
8
|
from ...models.function import Function
|
9
|
-
from ...types import
|
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": "/functions",
|
25
|
-
"params": params,
|
26
16
|
}
|
27
17
|
|
28
18
|
return _kwargs
|
@@ -60,13 +50,9 @@ def _build_response(
|
|
60
50
|
def sync_detailed(
|
61
51
|
*,
|
62
52
|
client: AuthenticatedClient,
|
63
|
-
environment: Union[Unset, str] = UNSET,
|
64
53
|
) -> Response[list["Function"]]:
|
65
54
|
"""List all functions
|
66
55
|
|
67
|
-
Args:
|
68
|
-
environment (Union[Unset, str]):
|
69
|
-
|
70
56
|
Raises:
|
71
57
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
72
58
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
@@ -75,9 +61,7 @@ def sync_detailed(
|
|
75
61
|
Response[list['Function']]
|
76
62
|
"""
|
77
63
|
|
78
|
-
kwargs = _get_kwargs(
|
79
|
-
environment=environment,
|
80
|
-
)
|
64
|
+
kwargs = _get_kwargs()
|
81
65
|
|
82
66
|
response = client.get_httpx_client().request(
|
83
67
|
**kwargs,
|
@@ -89,13 +73,9 @@ def sync_detailed(
|
|
89
73
|
def sync(
|
90
74
|
*,
|
91
75
|
client: AuthenticatedClient,
|
92
|
-
environment: Union[Unset, str] = UNSET,
|
93
76
|
) -> Optional[list["Function"]]:
|
94
77
|
"""List all functions
|
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,20 +86,15 @@ 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["Function"]]:
|
118
96
|
"""List all functions
|
119
97
|
|
120
|
-
Args:
|
121
|
-
environment (Union[Unset, str]):
|
122
|
-
|
123
98
|
Raises:
|
124
99
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
125
100
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
@@ -128,9 +103,7 @@ async def asyncio_detailed(
|
|
128
103
|
Response[list['Function']]
|
129
104
|
"""
|
130
105
|
|
131
|
-
kwargs = _get_kwargs(
|
132
|
-
environment=environment,
|
133
|
-
)
|
106
|
+
kwargs = _get_kwargs()
|
134
107
|
|
135
108
|
response = await client.get_async_httpx_client().request(**kwargs)
|
136
109
|
|
@@ -140,13 +113,9 @@ async def asyncio_detailed(
|
|
140
113
|
async def asyncio(
|
141
114
|
*,
|
142
115
|
client: AuthenticatedClient,
|
143
|
-
environment: Union[Unset, str] = UNSET,
|
144
116
|
) -> Optional[list["Function"]]:
|
145
117
|
"""List all functions
|
146
118
|
|
147
|
-
Args:
|
148
|
-
environment (Union[Unset, str]):
|
149
|
-
|
150
119
|
Raises:
|
151
120
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
152
121
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
@@ -158,6 +127,5 @@ async def asyncio(
|
|
158
127
|
return (
|
159
128
|
await asyncio_detailed(
|
160
129
|
client=client,
|
161
|
-
environment=environment,
|
162
130
|
)
|
163
131
|
).parsed
|
@@ -54,7 +54,7 @@ def sync_detailed(
|
|
54
54
|
client: AuthenticatedClient,
|
55
55
|
body: Knowledgebase,
|
56
56
|
) -> Response[Knowledgebase]:
|
57
|
-
"""Create
|
57
|
+
"""Create knowledgebase
|
58
58
|
|
59
59
|
Creates an knowledgebase.
|
60
60
|
|
@@ -85,7 +85,7 @@ def sync(
|
|
85
85
|
client: AuthenticatedClient,
|
86
86
|
body: Knowledgebase,
|
87
87
|
) -> Optional[Knowledgebase]:
|
88
|
-
"""Create
|
88
|
+
"""Create knowledgebase
|
89
89
|
|
90
90
|
Creates an knowledgebase.
|
91
91
|
|
@@ -111,7 +111,7 @@ async def asyncio_detailed(
|
|
111
111
|
client: AuthenticatedClient,
|
112
112
|
body: Knowledgebase,
|
113
113
|
) -> Response[Knowledgebase]:
|
114
|
-
"""Create
|
114
|
+
"""Create knowledgebase
|
115
115
|
|
116
116
|
Creates an knowledgebase.
|
117
117
|
|
@@ -140,7 +140,7 @@ async def asyncio(
|
|
140
140
|
client: AuthenticatedClient,
|
141
141
|
body: Knowledgebase,
|
142
142
|
) -> Optional[Knowledgebase]:
|
143
|
-
"""Create
|
143
|
+
"""Create knowledgebase
|
144
144
|
|
145
145
|
Creates an knowledgebase.
|
146
146
|
|
@@ -6,24 +6,15 @@ import httpx
|
|
6
6
|
from ... import errors
|
7
7
|
from ...client import AuthenticatedClient, Client
|
8
8
|
from ...models.knowledgebase import Knowledgebase
|
9
|
-
from ...types import
|
9
|
+
from ...types import Response
|
10
10
|
|
11
11
|
|
12
12
|
def _get_kwargs(
|
13
13
|
knowledgebase_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": "delete",
|
25
17
|
"url": f"/knowledgebases/{knowledgebase_name}",
|
26
|
-
"params": params,
|
27
18
|
}
|
28
19
|
|
29
20
|
return _kwargs
|
@@ -53,15 +44,13 @@ def sync_detailed(
|
|
53
44
|
knowledgebase_name: str,
|
54
45
|
*,
|
55
46
|
client: AuthenticatedClient,
|
56
|
-
environment: Union[Unset, str] = UNSET,
|
57
47
|
) -> Response[Knowledgebase]:
|
58
|
-
"""Delete
|
48
|
+
"""Delete knowledgebase
|
59
49
|
|
60
50
|
Deletes an knowledgebase by Name.
|
61
51
|
|
62
52
|
Args:
|
63
53
|
knowledgebase_name (str):
|
64
|
-
environment (Union[Unset, str]):
|
65
54
|
|
66
55
|
Raises:
|
67
56
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
@@ -73,7 +62,6 @@ def sync_detailed(
|
|
73
62
|
|
74
63
|
kwargs = _get_kwargs(
|
75
64
|
knowledgebase_name=knowledgebase_name,
|
76
|
-
environment=environment,
|
77
65
|
)
|
78
66
|
|
79
67
|
response = client.get_httpx_client().request(
|
@@ -87,15 +75,13 @@ def sync(
|
|
87
75
|
knowledgebase_name: str,
|
88
76
|
*,
|
89
77
|
client: AuthenticatedClient,
|
90
|
-
environment: Union[Unset, str] = UNSET,
|
91
78
|
) -> Optional[Knowledgebase]:
|
92
|
-
"""Delete
|
79
|
+
"""Delete knowledgebase
|
93
80
|
|
94
81
|
Deletes an knowledgebase by Name.
|
95
82
|
|
96
83
|
Args:
|
97
84
|
knowledgebase_name (str):
|
98
|
-
environment (Union[Unset, str]):
|
99
85
|
|
100
86
|
Raises:
|
101
87
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
@@ -108,7 +94,6 @@ def sync(
|
|
108
94
|
return sync_detailed(
|
109
95
|
knowledgebase_name=knowledgebase_name,
|
110
96
|
client=client,
|
111
|
-
environment=environment,
|
112
97
|
).parsed
|
113
98
|
|
114
99
|
|
@@ -116,15 +101,13 @@ async def asyncio_detailed(
|
|
116
101
|
knowledgebase_name: str,
|
117
102
|
*,
|
118
103
|
client: AuthenticatedClient,
|
119
|
-
environment: Union[Unset, str] = UNSET,
|
120
104
|
) -> Response[Knowledgebase]:
|
121
|
-
"""Delete
|
105
|
+
"""Delete knowledgebase
|
122
106
|
|
123
107
|
Deletes an knowledgebase by Name.
|
124
108
|
|
125
109
|
Args:
|
126
110
|
knowledgebase_name (str):
|
127
|
-
environment (Union[Unset, str]):
|
128
111
|
|
129
112
|
Raises:
|
130
113
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
@@ -136,7 +119,6 @@ async def asyncio_detailed(
|
|
136
119
|
|
137
120
|
kwargs = _get_kwargs(
|
138
121
|
knowledgebase_name=knowledgebase_name,
|
139
|
-
environment=environment,
|
140
122
|
)
|
141
123
|
|
142
124
|
response = await client.get_async_httpx_client().request(**kwargs)
|
@@ -148,15 +130,13 @@ async def asyncio(
|
|
148
130
|
knowledgebase_name: str,
|
149
131
|
*,
|
150
132
|
client: AuthenticatedClient,
|
151
|
-
environment: Union[Unset, str] = UNSET,
|
152
133
|
) -> Optional[Knowledgebase]:
|
153
|
-
"""Delete
|
134
|
+
"""Delete knowledgebase
|
154
135
|
|
155
136
|
Deletes an knowledgebase by Name.
|
156
137
|
|
157
138
|
Args:
|
158
139
|
knowledgebase_name (str):
|
159
|
-
environment (Union[Unset, str]):
|
160
140
|
|
161
141
|
Raises:
|
162
142
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
@@ -170,6 +150,5 @@ async def asyncio(
|
|
170
150
|
await asyncio_detailed(
|
171
151
|
knowledgebase_name=knowledgebase_name,
|
172
152
|
client=client,
|
173
|
-
environment=environment,
|
174
153
|
)
|
175
154
|
).parsed
|