beamlit 0.0.24rc20__py3-none-any.whl → 0.0.24rc21__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) hide show
  1. beamlit/agents/chat.py +37 -11
  2. beamlit/agents/decorator.py +97 -65
  3. beamlit/api/agents/create_agent.py +9 -14
  4. beamlit/api/agents/delete_agent.py +22 -1
  5. beamlit/api/agents/delete_agent_history.py +2 -6
  6. beamlit/api/agents/get_agent.py +22 -1
  7. beamlit/api/agents/get_agent_environment_logs.py +11 -11
  8. beamlit/api/agents/get_agent_history.py +2 -6
  9. beamlit/api/agents/get_agent_metrics.py +22 -1
  10. beamlit/api/agents/list_agent_history.py +11 -11
  11. beamlit/api/agents/list_agents.py +36 -4
  12. beamlit/api/agents/put_agent_history.py +2 -6
  13. beamlit/api/agents/update_agent.py +9 -14
  14. beamlit/api/functions/create_function.py +9 -14
  15. beamlit/api/functions/delete_function.py +22 -1
  16. beamlit/api/functions/get_function.py +22 -1
  17. beamlit/api/functions/get_function_environment_logs.py +11 -11
  18. beamlit/api/functions/get_function_metrics.py +22 -1
  19. beamlit/api/functions/list_functions.py +36 -4
  20. beamlit/api/functions/update_function.py +9 -14
  21. beamlit/api/history/get_agents_history.py +12 -12
  22. beamlit/api/history/list_agents_history.py +12 -12
  23. beamlit/api/integrations/get_integration_connection.py +16 -12
  24. beamlit/api/integrations/get_integration_connection_model.py +8 -1
  25. beamlit/api/integrations/get_integration_model.py +8 -1
  26. beamlit/api/locations/list_locations.py +12 -12
  27. beamlit/api/models/create_model.py +13 -14
  28. beamlit/api/models/delete_model.py +22 -1
  29. beamlit/api/models/get_model.py +22 -1
  30. beamlit/api/models/get_model_environment_logs.py +11 -11
  31. beamlit/api/models/get_model_metrics.py +38 -13
  32. beamlit/api/models/list_models.py +36 -4
  33. beamlit/api/models/update_model.py +13 -14
  34. beamlit/api/privateclusters/__init__.py +0 -0
  35. beamlit/api/{agents/get_agent_deployment_metrics.py → privateclusters/create_private_cluster.py} +28 -55
  36. beamlit/api/{functions/list_function_deployments.py → privateclusters/delete_private_cluster.py} +38 -37
  37. beamlit/api/{agents/get_agent_deployment.py → privateclusters/get_private_cluster.py} +40 -44
  38. beamlit/api/privateclusters/get_private_cluster_health.py +97 -0
  39. beamlit/api/{agents/list_agent_deployments.py → privateclusters/list_private_clusters.py} +30 -45
  40. beamlit/api/{models/list_model_deployments.py → privateclusters/update_private_cluster.py} +38 -45
  41. beamlit/api/privateclusters/update_private_cluster_health.py +97 -0
  42. beamlit/authentication/device_mode.py +3 -9
  43. beamlit/common/generate.py +47 -34
  44. beamlit/common/settings.py +29 -27
  45. beamlit/deploy/deploy.py +101 -342
  46. beamlit/deploy/format.py +70 -0
  47. beamlit/deploy/parser.py +175 -0
  48. beamlit/functions/decorator.py +8 -11
  49. beamlit/models/__init__.py +64 -78
  50. beamlit/models/acl.py +4 -22
  51. beamlit/models/agent.py +34 -95
  52. beamlit/models/agent_history.py +7 -5
  53. beamlit/models/agent_history_event.py +11 -9
  54. beamlit/models/agent_metadata.py +5 -3
  55. beamlit/models/agent_spec.py +54 -45
  56. beamlit/models/api_key.py +14 -14
  57. beamlit/models/configuration.py +11 -0
  58. beamlit/models/core_spec.py +45 -32
  59. beamlit/models/{model_deployment_metrics_query_per_second_per_region_per_code.py → core_spec_configurations.py} +22 -22
  60. beamlit/models/environment.py +33 -105
  61. beamlit/models/environment_metadata.py +146 -0
  62. beamlit/models/environment_spec.py +8 -6
  63. beamlit/models/function.py +34 -95
  64. beamlit/models/function_metadata.py +5 -3
  65. beamlit/models/function_spec.py +53 -40
  66. beamlit/models/integration_connection.py +31 -137
  67. beamlit/models/integration_connection_spec.py +6 -4
  68. beamlit/models/metadata.py +5 -3
  69. beamlit/models/metadata_labels.py +4 -2
  70. beamlit/models/model.py +33 -94
  71. beamlit/models/model_metadata.py +5 -3
  72. beamlit/models/{function_provider_ref.py → model_private_cluster.py} +23 -14
  73. beamlit/models/model_provider.py +27 -43
  74. beamlit/models/model_spec.py +45 -32
  75. beamlit/models/owner_fields.py +4 -2
  76. beamlit/models/pending_invitation.py +14 -14
  77. beamlit/models/pod_template_spec.py +4 -2
  78. beamlit/models/policy.py +33 -159
  79. beamlit/models/policy_spec.py +24 -28
  80. beamlit/models/private_cluster.py +183 -0
  81. beamlit/models/{model_provider_ref.py → private_location.py} +7 -16
  82. beamlit/models/resource_deployment_metrics.py +0 -108
  83. beamlit/models/resource_environment_metrics.py +143 -71
  84. beamlit/models/{resource_deployment_metrics_inference_per_region.py → resource_environment_metrics_inference_per_region.py} +5 -5
  85. beamlit/models/resource_environment_metrics_inference_per_second_per_region.py +9 -11
  86. beamlit/models/{resource_deployment_metrics_query_per_region_per_code.py → resource_environment_metrics_query_per_region_per_code.py} +5 -5
  87. beamlit/models/resource_environment_metrics_query_per_second_per_region_per_code.py +5 -3
  88. beamlit/models/resource_log.py +4 -2
  89. beamlit/models/runtime.py +20 -2
  90. beamlit/models/serverless_config.py +28 -21
  91. beamlit/models/spec_configuration.py +7 -5
  92. beamlit/models/store_agent.py +14 -14
  93. beamlit/models/store_function.py +14 -14
  94. beamlit/models/time_fields.py +4 -2
  95. beamlit/models/websocket_channel.py +4 -2
  96. beamlit/models/workspace.py +23 -14
  97. beamlit/run.py +0 -1
  98. beamlit/serve/app.py +1 -0
  99. beamlit/serve/middlewares/accesslog.py +3 -1
  100. {beamlit-0.0.24rc20.dist-info → beamlit-0.0.24rc21.dist-info}/METADATA +1 -1
  101. beamlit-0.0.24rc21.dist-info/RECORD +243 -0
  102. beamlit/api/agents/delete_agent_deployment.py +0 -163
  103. beamlit/api/agents/delete_agent_deployment_history.py +0 -172
  104. beamlit/api/agents/get_agent_deployment_history.py +0 -172
  105. beamlit/api/agents/get_agent_deployment_logs.py +0 -164
  106. beamlit/api/agents/list_agent_deployment_history.py +0 -164
  107. beamlit/api/agents/put_agent_deployment.py +0 -185
  108. beamlit/api/agents/put_agent_deployment_history.py +0 -198
  109. beamlit/api/functions/delete_function_deployment.py +0 -163
  110. beamlit/api/functions/get_function_deployment.py +0 -163
  111. beamlit/api/functions/get_function_deployment_logs.py +0 -164
  112. beamlit/api/functions/get_function_deployment_metrics.py +0 -159
  113. beamlit/api/functions/put_function_deployment.py +0 -185
  114. beamlit/api/models/delete_model_deployment.py +0 -171
  115. beamlit/api/models/get_model_deployment.py +0 -171
  116. beamlit/api/models/get_model_deployment_logs.py +0 -168
  117. beamlit/api/models/get_model_deployment_metrics.py +0 -163
  118. beamlit/api/models/put_model_deployment.py +0 -193
  119. beamlit/models/agent_configuration.py +0 -70
  120. beamlit/models/agent_deployment.py +0 -340
  121. beamlit/models/agent_deployment_configuration.py +0 -45
  122. beamlit/models/agent_deployment_configuration_type_0.py +0 -43
  123. beamlit/models/agent_deployment_history.py +0 -185
  124. beamlit/models/agent_deployment_history_event.py +0 -133
  125. beamlit/models/agent_deployment_pod_template.py +0 -45
  126. beamlit/models/agent_deployment_pod_template_type_0.py +0 -43
  127. beamlit/models/agent_with_deployments.py +0 -176
  128. beamlit/models/authentication_provider_model.py +0 -144
  129. beamlit/models/authentication_provider_organization.py +0 -88
  130. beamlit/models/deployment_configuration.py +0 -70
  131. beamlit/models/deployment_configurations.py +0 -58
  132. beamlit/models/deployment_serverless_config.py +0 -131
  133. beamlit/models/deployment_serverless_config_type_0.py +0 -220
  134. beamlit/models/function_configuration.py +0 -70
  135. beamlit/models/function_deployment.py +0 -340
  136. beamlit/models/function_deployment_configuration.py +0 -45
  137. beamlit/models/function_deployment_configuration_type_0.py +0 -43
  138. beamlit/models/function_deployment_pod_template.py +0 -45
  139. beamlit/models/function_deployment_pod_template_type_0.py +0 -43
  140. beamlit/models/function_with_deployments.py +0 -176
  141. beamlit/models/integration.py +0 -198
  142. beamlit/models/integration_config.py +0 -45
  143. beamlit/models/integration_secret.py +0 -61
  144. beamlit/models/labels_type_0.py +0 -45
  145. beamlit/models/location.py +0 -122
  146. beamlit/models/model_deployment.py +0 -296
  147. beamlit/models/model_deployment_log.py +0 -70
  148. beamlit/models/model_deployment_metrics.py +0 -172
  149. beamlit/models/model_deployment_metrics_inference_per_second_per_region.py +0 -77
  150. beamlit/models/model_deployment_pod_template.py +0 -45
  151. beamlit/models/model_deployment_pod_template_type_0.py +0 -43
  152. beamlit/models/model_metrics.py +0 -96
  153. beamlit/models/model_with_deployments.py +0 -176
  154. beamlit/models/resource_deployment_log.py +0 -70
  155. beamlit/models/resource_deployment_metrics_inference_per_region_type_0.py +0 -79
  156. beamlit/models/resource_deployment_metrics_inference_per_second_per_region_type_0.py +0 -79
  157. beamlit/models/resource_deployment_metrics_query_per_region_per_code_type_0.py +0 -73
  158. beamlit/models/resource_deployment_metrics_query_per_second_per_region_per_code_type_0.py +0 -73
  159. beamlit/models/runtime_readiness_probe_type_0.py +0 -43
  160. beamlit/models/runtime_type_0.py +0 -111
  161. beamlit/models/runtime_type_0_readiness_probe.py +0 -43
  162. beamlit/models/runtime_type_0_readiness_probe_type_0.py +0 -43
  163. beamlit/models/runtime_type_0_resources.py +0 -59
  164. beamlit/models/standard_fields_dynamo_db.py +0 -88
  165. beamlit/models/store_agent_configuration.py +0 -97
  166. beamlit/models/store_agent_labels_type_0.py +0 -43
  167. beamlit/models/store_function_configuration.py +0 -97
  168. beamlit/models/store_function_labels_type_0.py +0 -43
  169. beamlit-0.0.24rc20.dist-info/RECORD +0 -303
  170. {beamlit-0.0.24rc20.dist-info → beamlit-0.0.24rc21.dist-info}/WHEEL +0 -0
@@ -1,5 +1,5 @@
1
1
  from http import HTTPStatus
2
- from typing import Any, List, Optional, Union
2
+ from typing import Any, Optional, Union
3
3
 
4
4
  import httpx
5
5
 
@@ -22,7 +22,7 @@ def _get_kwargs(
22
22
 
23
23
  def _parse_response(
24
24
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
25
- ) -> Optional[List["ResourceLog"]]:
25
+ ) -> Optional[list["ResourceLog"]]:
26
26
  if response.status_code == 200:
27
27
  response_200 = []
28
28
  _response_200 = response.json()
@@ -40,7 +40,7 @@ def _parse_response(
40
40
 
41
41
  def _build_response(
42
42
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
43
- ) -> Response[List["ResourceLog"]]:
43
+ ) -> Response[list["ResourceLog"]]:
44
44
  return Response(
45
45
  status_code=HTTPStatus(response.status_code),
46
46
  content=response.content,
@@ -53,7 +53,7 @@ def sync_detailed(
53
53
  agent_name: str,
54
54
  *,
55
55
  client: AuthenticatedClient,
56
- ) -> Response[List["ResourceLog"]]:
56
+ ) -> Response[list["ResourceLog"]]:
57
57
  """
58
58
  Args:
59
59
  agent_name (str):
@@ -63,7 +63,7 @@ def sync_detailed(
63
63
  httpx.TimeoutException: If the request takes longer than Client.timeout.
64
64
 
65
65
  Returns:
66
- Response[List['ResourceLog']]
66
+ Response[list['ResourceLog']]
67
67
  """
68
68
 
69
69
  kwargs = _get_kwargs(
@@ -81,7 +81,7 @@ def sync(
81
81
  agent_name: str,
82
82
  *,
83
83
  client: AuthenticatedClient,
84
- ) -> Optional[List["ResourceLog"]]:
84
+ ) -> Optional[list["ResourceLog"]]:
85
85
  """
86
86
  Args:
87
87
  agent_name (str):
@@ -91,7 +91,7 @@ def sync(
91
91
  httpx.TimeoutException: If the request takes longer than Client.timeout.
92
92
 
93
93
  Returns:
94
- List['ResourceLog']
94
+ list['ResourceLog']
95
95
  """
96
96
 
97
97
  return sync_detailed(
@@ -104,7 +104,7 @@ async def asyncio_detailed(
104
104
  agent_name: str,
105
105
  *,
106
106
  client: AuthenticatedClient,
107
- ) -> Response[List["ResourceLog"]]:
107
+ ) -> Response[list["ResourceLog"]]:
108
108
  """
109
109
  Args:
110
110
  agent_name (str):
@@ -114,7 +114,7 @@ async def asyncio_detailed(
114
114
  httpx.TimeoutException: If the request takes longer than Client.timeout.
115
115
 
116
116
  Returns:
117
- Response[List['ResourceLog']]
117
+ Response[list['ResourceLog']]
118
118
  """
119
119
 
120
120
  kwargs = _get_kwargs(
@@ -130,7 +130,7 @@ async def asyncio(
130
130
  agent_name: str,
131
131
  *,
132
132
  client: AuthenticatedClient,
133
- ) -> Optional[List["ResourceLog"]]:
133
+ ) -> Optional[list["ResourceLog"]]:
134
134
  """
135
135
  Args:
136
136
  agent_name (str):
@@ -140,7 +140,7 @@ async def asyncio(
140
140
  httpx.TimeoutException: If the request takes longer than Client.timeout.
141
141
 
142
142
  Returns:
143
- List['ResourceLog']
143
+ list['ResourceLog']
144
144
  """
145
145
 
146
146
  return (
@@ -21,9 +21,7 @@ def _get_kwargs(
21
21
  return _kwargs
22
22
 
23
23
 
24
- def _parse_response(
25
- *, client: Union[AuthenticatedClient, Client], response: httpx.Response
26
- ) -> Optional[AgentHistory]:
24
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[AgentHistory]:
27
25
  if response.status_code == 200:
28
26
  response_200 = AgentHistory.from_dict(response.json())
29
27
 
@@ -34,9 +32,7 @@ def _parse_response(
34
32
  return None
35
33
 
36
34
 
37
- def _build_response(
38
- *, client: Union[AuthenticatedClient, Client], response: httpx.Response
39
- ) -> Response[AgentHistory]:
35
+ def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[AgentHistory]:
40
36
  return Response(
41
37
  status_code=HTTPStatus(response.status_code),
42
38
  content=response.content,
@@ -6,15 +6,24 @@ import httpx
6
6
  from ... import errors
7
7
  from ...client import AuthenticatedClient, Client
8
8
  from ...models.resource_metrics import ResourceMetrics
9
- from ...types import Response
9
+ from ...types import UNSET, Response, Unset
10
10
 
11
11
 
12
12
  def _get_kwargs(
13
13
  agent_name: str,
14
+ *,
15
+ environment: Union[Unset, str] = UNSET,
14
16
  ) -> 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
+
15
23
  _kwargs: dict[str, Any] = {
16
24
  "method": "get",
17
25
  "url": f"/agents/{agent_name}/metrics",
26
+ "params": params,
18
27
  }
19
28
 
20
29
  return _kwargs
@@ -48,11 +57,13 @@ def sync_detailed(
48
57
  agent_name: str,
49
58
  *,
50
59
  client: AuthenticatedClient,
60
+ environment: Union[Unset, str] = UNSET,
51
61
  ) -> Response[ResourceMetrics]:
52
62
  """Get agent metrics
53
63
 
54
64
  Args:
55
65
  agent_name (str):
66
+ environment (Union[Unset, str]):
56
67
 
57
68
  Raises:
58
69
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -64,6 +75,7 @@ def sync_detailed(
64
75
 
65
76
  kwargs = _get_kwargs(
66
77
  agent_name=agent_name,
78
+ environment=environment,
67
79
  )
68
80
 
69
81
  response = client.get_httpx_client().request(
@@ -77,11 +89,13 @@ def sync(
77
89
  agent_name: str,
78
90
  *,
79
91
  client: AuthenticatedClient,
92
+ environment: Union[Unset, str] = UNSET,
80
93
  ) -> Optional[ResourceMetrics]:
81
94
  """Get agent metrics
82
95
 
83
96
  Args:
84
97
  agent_name (str):
98
+ environment (Union[Unset, str]):
85
99
 
86
100
  Raises:
87
101
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -94,6 +108,7 @@ def sync(
94
108
  return sync_detailed(
95
109
  agent_name=agent_name,
96
110
  client=client,
111
+ environment=environment,
97
112
  ).parsed
98
113
 
99
114
 
@@ -101,11 +116,13 @@ async def asyncio_detailed(
101
116
  agent_name: str,
102
117
  *,
103
118
  client: AuthenticatedClient,
119
+ environment: Union[Unset, str] = UNSET,
104
120
  ) -> Response[ResourceMetrics]:
105
121
  """Get agent metrics
106
122
 
107
123
  Args:
108
124
  agent_name (str):
125
+ environment (Union[Unset, str]):
109
126
 
110
127
  Raises:
111
128
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -117,6 +134,7 @@ async def asyncio_detailed(
117
134
 
118
135
  kwargs = _get_kwargs(
119
136
  agent_name=agent_name,
137
+ environment=environment,
120
138
  )
121
139
 
122
140
  response = await client.get_async_httpx_client().request(**kwargs)
@@ -128,11 +146,13 @@ async def asyncio(
128
146
  agent_name: str,
129
147
  *,
130
148
  client: AuthenticatedClient,
149
+ environment: Union[Unset, str] = UNSET,
131
150
  ) -> Optional[ResourceMetrics]:
132
151
  """Get agent metrics
133
152
 
134
153
  Args:
135
154
  agent_name (str):
155
+ environment (Union[Unset, str]):
136
156
 
137
157
  Raises:
138
158
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -146,5 +166,6 @@ async def asyncio(
146
166
  await asyncio_detailed(
147
167
  agent_name=agent_name,
148
168
  client=client,
169
+ environment=environment,
149
170
  )
150
171
  ).parsed
@@ -1,5 +1,5 @@
1
1
  from http import HTTPStatus
2
- from typing import Any, List, Optional, Union
2
+ from typing import Any, Optional, Union
3
3
 
4
4
  import httpx
5
5
 
@@ -22,7 +22,7 @@ def _get_kwargs(
22
22
 
23
23
  def _parse_response(
24
24
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
25
- ) -> Optional[List["AgentHistory"]]:
25
+ ) -> Optional[list["AgentHistory"]]:
26
26
  if response.status_code == 200:
27
27
  response_200 = []
28
28
  _response_200 = response.json()
@@ -40,7 +40,7 @@ def _parse_response(
40
40
 
41
41
  def _build_response(
42
42
  *, client: Union[AuthenticatedClient, Client], response: httpx.Response
43
- ) -> Response[List["AgentHistory"]]:
43
+ ) -> Response[list["AgentHistory"]]:
44
44
  return Response(
45
45
  status_code=HTTPStatus(response.status_code),
46
46
  content=response.content,
@@ -53,7 +53,7 @@ def sync_detailed(
53
53
  agent_name: str,
54
54
  *,
55
55
  client: AuthenticatedClient,
56
- ) -> Response[List["AgentHistory"]]:
56
+ ) -> Response[list["AgentHistory"]]:
57
57
  """
58
58
  Args:
59
59
  agent_name (str):
@@ -63,7 +63,7 @@ def sync_detailed(
63
63
  httpx.TimeoutException: If the request takes longer than Client.timeout.
64
64
 
65
65
  Returns:
66
- Response[List['AgentHistory']]
66
+ Response[list['AgentHistory']]
67
67
  """
68
68
 
69
69
  kwargs = _get_kwargs(
@@ -81,7 +81,7 @@ def sync(
81
81
  agent_name: str,
82
82
  *,
83
83
  client: AuthenticatedClient,
84
- ) -> Optional[List["AgentHistory"]]:
84
+ ) -> Optional[list["AgentHistory"]]:
85
85
  """
86
86
  Args:
87
87
  agent_name (str):
@@ -91,7 +91,7 @@ def sync(
91
91
  httpx.TimeoutException: If the request takes longer than Client.timeout.
92
92
 
93
93
  Returns:
94
- List['AgentHistory']
94
+ list['AgentHistory']
95
95
  """
96
96
 
97
97
  return sync_detailed(
@@ -104,7 +104,7 @@ async def asyncio_detailed(
104
104
  agent_name: str,
105
105
  *,
106
106
  client: AuthenticatedClient,
107
- ) -> Response[List["AgentHistory"]]:
107
+ ) -> Response[list["AgentHistory"]]:
108
108
  """
109
109
  Args:
110
110
  agent_name (str):
@@ -114,7 +114,7 @@ async def asyncio_detailed(
114
114
  httpx.TimeoutException: If the request takes longer than Client.timeout.
115
115
 
116
116
  Returns:
117
- Response[List['AgentHistory']]
117
+ Response[list['AgentHistory']]
118
118
  """
119
119
 
120
120
  kwargs = _get_kwargs(
@@ -130,7 +130,7 @@ async def asyncio(
130
130
  agent_name: str,
131
131
  *,
132
132
  client: AuthenticatedClient,
133
- ) -> Optional[List["AgentHistory"]]:
133
+ ) -> Optional[list["AgentHistory"]]:
134
134
  """
135
135
  Args:
136
136
  agent_name (str):
@@ -140,7 +140,7 @@ async def asyncio(
140
140
  httpx.TimeoutException: If the request takes longer than Client.timeout.
141
141
 
142
142
  Returns:
143
- List['AgentHistory']
143
+ list['AgentHistory']
144
144
  """
145
145
 
146
146
  return (
@@ -6,13 +6,23 @@ import httpx
6
6
  from ... import errors
7
7
  from ...client import AuthenticatedClient, Client
8
8
  from ...models.agent import Agent
9
- from ...types import Response
9
+ from ...types import UNSET, Response, Unset
10
10
 
11
11
 
12
- def _get_kwargs() -> dict[str, Any]:
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
+
13
22
  _kwargs: dict[str, Any] = {
14
23
  "method": "get",
15
24
  "url": "/agents",
25
+ "params": params,
16
26
  }
17
27
 
18
28
  return _kwargs
@@ -46,9 +56,13 @@ def _build_response(*, client: Union[AuthenticatedClient, Client], response: htt
46
56
  def sync_detailed(
47
57
  *,
48
58
  client: AuthenticatedClient,
59
+ environment: Union[Unset, str] = UNSET,
49
60
  ) -> Response[list["Agent"]]:
50
61
  """List all agents
51
62
 
63
+ Args:
64
+ environment (Union[Unset, str]):
65
+
52
66
  Raises:
53
67
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
54
68
  httpx.TimeoutException: If the request takes longer than Client.timeout.
@@ -57,7 +71,9 @@ def sync_detailed(
57
71
  Response[list['Agent']]
58
72
  """
59
73
 
60
- kwargs = _get_kwargs()
74
+ kwargs = _get_kwargs(
75
+ environment=environment,
76
+ )
61
77
 
62
78
  response = client.get_httpx_client().request(
63
79
  **kwargs,
@@ -69,9 +85,13 @@ def sync_detailed(
69
85
  def sync(
70
86
  *,
71
87
  client: AuthenticatedClient,
88
+ environment: Union[Unset, str] = UNSET,
72
89
  ) -> Optional[list["Agent"]]:
73
90
  """List all agents
74
91
 
92
+ Args:
93
+ environment (Union[Unset, str]):
94
+
75
95
  Raises:
76
96
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
77
97
  httpx.TimeoutException: If the request takes longer than Client.timeout.
@@ -82,15 +102,20 @@ def sync(
82
102
 
83
103
  return sync_detailed(
84
104
  client=client,
105
+ environment=environment,
85
106
  ).parsed
86
107
 
87
108
 
88
109
  async def asyncio_detailed(
89
110
  *,
90
111
  client: AuthenticatedClient,
112
+ environment: Union[Unset, str] = UNSET,
91
113
  ) -> Response[list["Agent"]]:
92
114
  """List all agents
93
115
 
116
+ Args:
117
+ environment (Union[Unset, str]):
118
+
94
119
  Raises:
95
120
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
96
121
  httpx.TimeoutException: If the request takes longer than Client.timeout.
@@ -99,7 +124,9 @@ async def asyncio_detailed(
99
124
  Response[list['Agent']]
100
125
  """
101
126
 
102
- kwargs = _get_kwargs()
127
+ kwargs = _get_kwargs(
128
+ environment=environment,
129
+ )
103
130
 
104
131
  response = await client.get_async_httpx_client().request(**kwargs)
105
132
 
@@ -109,9 +136,13 @@ async def asyncio_detailed(
109
136
  async def asyncio(
110
137
  *,
111
138
  client: AuthenticatedClient,
139
+ environment: Union[Unset, str] = UNSET,
112
140
  ) -> Optional[list["Agent"]]:
113
141
  """List all agents
114
142
 
143
+ Args:
144
+ environment (Union[Unset, str]):
145
+
115
146
  Raises:
116
147
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
117
148
  httpx.TimeoutException: If the request takes longer than Client.timeout.
@@ -123,5 +154,6 @@ async def asyncio(
123
154
  return (
124
155
  await asyncio_detailed(
125
156
  client=client,
157
+ environment=environment,
126
158
  )
127
159
  ).parsed
@@ -31,9 +31,7 @@ def _get_kwargs(
31
31
  return _kwargs
32
32
 
33
33
 
34
- def _parse_response(
35
- *, client: Union[AuthenticatedClient, Client], response: httpx.Response
36
- ) -> Optional[AgentHistory]:
34
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[AgentHistory]:
37
35
  if response.status_code == 200:
38
36
  response_200 = AgentHistory.from_dict(response.json())
39
37
 
@@ -44,9 +42,7 @@ def _parse_response(
44
42
  return None
45
43
 
46
44
 
47
- def _build_response(
48
- *, client: Union[AuthenticatedClient, Client], response: httpx.Response
49
- ) -> Response[AgentHistory]:
45
+ def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[AgentHistory]:
50
46
  return Response(
51
47
  status_code=HTTPStatus(response.status_code),
52
48
  content=response.content,
@@ -6,14 +6,13 @@ import httpx
6
6
  from ... import errors
7
7
  from ...client import AuthenticatedClient, Client
8
8
  from ...models.agent import Agent
9
- from ...models.agent_with_deployments import AgentWithDeployments
10
9
  from ...types import Response
11
10
 
12
11
 
13
12
  def _get_kwargs(
14
13
  agent_name: str,
15
14
  *,
16
- body: AgentWithDeployments,
15
+ body: Agent,
17
16
  ) -> dict[str, Any]:
18
17
  headers: dict[str, Any] = {}
19
18
 
@@ -55,14 +54,13 @@ def sync_detailed(
55
54
  agent_name: str,
56
55
  *,
57
56
  client: AuthenticatedClient,
58
- body: AgentWithDeployments,
57
+ body: Agent,
59
58
  ) -> Response[Agent]:
60
59
  """Update agent by name
61
60
 
62
61
  Args:
63
62
  agent_name (str):
64
- body (AgentWithDeployments): Logical object representing an agent but with deployment
65
- definition inside
63
+ body (Agent): Agent
66
64
 
67
65
  Raises:
68
66
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -88,14 +86,13 @@ def sync(
88
86
  agent_name: str,
89
87
  *,
90
88
  client: AuthenticatedClient,
91
- body: AgentWithDeployments,
89
+ body: Agent,
92
90
  ) -> Optional[Agent]:
93
91
  """Update agent by name
94
92
 
95
93
  Args:
96
94
  agent_name (str):
97
- body (AgentWithDeployments): Logical object representing an agent but with deployment
98
- definition inside
95
+ body (Agent): Agent
99
96
 
100
97
  Raises:
101
98
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -116,14 +113,13 @@ async def asyncio_detailed(
116
113
  agent_name: str,
117
114
  *,
118
115
  client: AuthenticatedClient,
119
- body: AgentWithDeployments,
116
+ body: Agent,
120
117
  ) -> Response[Agent]:
121
118
  """Update agent by name
122
119
 
123
120
  Args:
124
121
  agent_name (str):
125
- body (AgentWithDeployments): Logical object representing an agent but with deployment
126
- definition inside
122
+ body (Agent): Agent
127
123
 
128
124
  Raises:
129
125
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -147,14 +143,13 @@ async def asyncio(
147
143
  agent_name: str,
148
144
  *,
149
145
  client: AuthenticatedClient,
150
- body: AgentWithDeployments,
146
+ body: Agent,
151
147
  ) -> Optional[Agent]:
152
148
  """Update agent by name
153
149
 
154
150
  Args:
155
151
  agent_name (str):
156
- body (AgentWithDeployments): Logical object representing an agent but with deployment
157
- definition inside
152
+ body (Agent): Agent
158
153
 
159
154
  Raises:
160
155
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -6,13 +6,12 @@ import httpx
6
6
  from ... import errors
7
7
  from ...client import AuthenticatedClient, Client
8
8
  from ...models.function import Function
9
- from ...models.function_with_deployments import FunctionWithDeployments
10
9
  from ...types import Response
11
10
 
12
11
 
13
12
  def _get_kwargs(
14
13
  *,
15
- body: FunctionWithDeployments,
14
+ body: Function,
16
15
  ) -> dict[str, Any]:
17
16
  headers: dict[str, Any] = {}
18
17
 
@@ -53,13 +52,12 @@ def _build_response(*, client: Union[AuthenticatedClient, Client], response: htt
53
52
  def sync_detailed(
54
53
  *,
55
54
  client: AuthenticatedClient,
56
- body: FunctionWithDeployments,
55
+ body: Function,
57
56
  ) -> Response[Function]:
58
57
  """Create function
59
58
 
60
59
  Args:
61
- body (FunctionWithDeployments): Logical object representing a function but with deployment
62
- definition inside
60
+ body (Function): Function
63
61
 
64
62
  Raises:
65
63
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -83,13 +81,12 @@ def sync_detailed(
83
81
  def sync(
84
82
  *,
85
83
  client: AuthenticatedClient,
86
- body: FunctionWithDeployments,
84
+ body: Function,
87
85
  ) -> Optional[Function]:
88
86
  """Create function
89
87
 
90
88
  Args:
91
- body (FunctionWithDeployments): Logical object representing a function but with deployment
92
- definition inside
89
+ body (Function): Function
93
90
 
94
91
  Raises:
95
92
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -108,13 +105,12 @@ def sync(
108
105
  async def asyncio_detailed(
109
106
  *,
110
107
  client: AuthenticatedClient,
111
- body: FunctionWithDeployments,
108
+ body: Function,
112
109
  ) -> Response[Function]:
113
110
  """Create function
114
111
 
115
112
  Args:
116
- body (FunctionWithDeployments): Logical object representing a function but with deployment
117
- definition inside
113
+ body (Function): Function
118
114
 
119
115
  Raises:
120
116
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -136,13 +132,12 @@ async def asyncio_detailed(
136
132
  async def asyncio(
137
133
  *,
138
134
  client: AuthenticatedClient,
139
- body: FunctionWithDeployments,
135
+ body: Function,
140
136
  ) -> Optional[Function]:
141
137
  """Create function
142
138
 
143
139
  Args:
144
- body (FunctionWithDeployments): Logical object representing a function but with deployment
145
- definition inside
140
+ body (Function): Function
146
141
 
147
142
  Raises:
148
143
  errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.