agenta 0.30.0__py3-none-any.whl → 0.30.0a2__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.

Potentially problematic release.


This version of agenta might be problematic. Click here for more details.

Files changed (45) hide show
  1. agenta/client/backend/__init__.py +3 -32
  2. agenta/client/backend/apps/client.py +10 -70
  3. agenta/client/backend/client.py +45 -61
  4. agenta/client/backend/configs/client.py +0 -6
  5. agenta/client/backend/containers/client.py +0 -6
  6. agenta/client/backend/core/file.py +8 -13
  7. agenta/client/backend/environments/client.py +0 -6
  8. agenta/client/backend/evaluations/client.py +1 -14
  9. agenta/client/backend/evaluators/client.py +0 -24
  10. agenta/client/backend/observability/client.py +16 -22
  11. agenta/client/backend/observability_v_1/__init__.py +2 -2
  12. agenta/client/backend/observability_v_1/client.py +0 -203
  13. agenta/client/backend/observability_v_1/types/__init__.py +1 -2
  14. agenta/client/backend/observability_v_1/types/format.py +1 -1
  15. agenta/client/backend/testsets/client.py +121 -305
  16. agenta/client/backend/types/__init__.py +2 -24
  17. agenta/client/backend/types/app.py +1 -2
  18. agenta/client/backend/types/body_import_testset.py +1 -0
  19. agenta/client/backend/types/lm_providers_enum.py +21 -0
  20. agenta/client/backend/types/permission.py +0 -1
  21. agenta/client/backend/variants/client.py +0 -66
  22. agenta/sdk/decorators/routing.py +0 -102
  23. {agenta-0.30.0.dist-info → agenta-0.30.0a2.dist-info}/METADATA +3 -4
  24. {agenta-0.30.0.dist-info → agenta-0.30.0a2.dist-info}/RECORD +26 -44
  25. {agenta-0.30.0.dist-info → agenta-0.30.0a2.dist-info}/WHEEL +1 -1
  26. agenta/client/backend/access_control/__init__.py +0 -1
  27. agenta/client/backend/access_control/client.py +0 -167
  28. agenta/client/backend/observability_v_1/types/query_analytics_response.py +0 -7
  29. agenta/client/backend/scopes/__init__.py +0 -1
  30. agenta/client/backend/scopes/client.py +0 -114
  31. agenta/client/backend/types/analytics_response.py +0 -24
  32. agenta/client/backend/types/bucket_dto.py +0 -26
  33. agenta/client/backend/types/header_dto.py +0 -22
  34. agenta/client/backend/types/legacy_analytics_response.py +0 -29
  35. agenta/client/backend/types/legacy_data_point.py +0 -27
  36. agenta/client/backend/types/metrics_dto.py +0 -24
  37. agenta/client/backend/types/projects_response.py +0 -28
  38. agenta/client/backend/types/provider_key_dto.py +0 -23
  39. agenta/client/backend/types/provider_kind.py +0 -21
  40. agenta/client/backend/types/secret_dto.py +0 -24
  41. agenta/client/backend/types/secret_kind.py +0 -5
  42. agenta/client/backend/types/secret_response_dto.py +0 -27
  43. agenta/client/backend/vault/__init__.py +0 -1
  44. agenta/client/backend/vault/client.py +0 -685
  45. {agenta-0.30.0.dist-info → agenta-0.30.0a2.dist-info}/entry_points.txt +0 -0
@@ -10,13 +10,11 @@ from .types import (
10
10
  AgentaTreesResponse,
11
11
  AggregatedResult,
12
12
  AggregatedResultEvaluatorConfig,
13
- AnalyticsResponse,
14
13
  App,
15
14
  AppVariantResponse,
16
15
  AppVariantRevision,
17
16
  BaseOutput,
18
17
  BodyImportTestset,
19
- BucketDto,
20
18
  CollectStatusResponse,
21
19
  ConfigDb,
22
20
  ConfigDto,
@@ -44,7 +42,6 @@ from .types import (
44
42
  EvaluatorOutputInterface,
45
43
  ExceptionDto,
46
44
  GetConfigResponse,
47
- HeaderDto,
48
45
  HttpValidationError,
49
46
  HumanEvaluation,
50
47
  HumanEvaluationScenario,
@@ -54,14 +51,12 @@ from .types import (
54
51
  HumanEvaluationUpdate,
55
52
  Image,
56
53
  InviteRequest,
57
- LegacyAnalyticsResponse,
58
- LegacyDataPoint,
59
54
  LifecycleDto,
60
55
  LinkDto,
61
56
  ListApiKeysResponse,
62
57
  LlmRunRateLimit,
63
58
  LlmTokens,
64
- MetricsDto,
59
+ LmProvidersEnum,
65
60
  NewHumanEvaluation,
66
61
  NewTestset,
67
62
  NodeDto,
@@ -79,17 +74,11 @@ from .types import (
79
74
  Outputs,
80
75
  ParentDto,
81
76
  Permission,
82
- ProjectsResponse,
83
- ProviderKeyDto,
84
- ProviderKind,
85
77
  ReferenceDto,
86
78
  ReferenceRequestModel,
87
79
  Result,
88
80
  RootDto,
89
81
  Score,
90
- SecretDto,
91
- SecretKind,
92
- SecretResponseDto,
93
82
  SimpleEvaluationOutput,
94
83
  Span,
95
84
  SpanDetail,
@@ -122,7 +111,6 @@ from .types import (
122
111
  )
123
112
  from .errors import UnprocessableEntityError
124
113
  from . import (
125
- access_control,
126
114
  apps,
127
115
  bases,
128
116
  configs,
@@ -132,14 +120,12 @@ from . import (
132
120
  evaluators,
133
121
  observability,
134
122
  observability_v_1,
135
- scopes,
136
123
  testsets,
137
124
  variants,
138
- vault,
139
125
  )
140
126
  from .client import AgentaApi, AsyncAgentaApi
141
127
  from .containers import ContainerTemplatesResponse
142
- from .observability_v_1 import Format, QueryAnalyticsResponse, QueryTracesResponse
128
+ from .observability_v_1 import Format, QueryTracesResponse
143
129
  from .variants import AddVariantFromBaseAndConfigResponse
144
130
 
145
131
  __all__ = [
@@ -154,14 +140,12 @@ __all__ = [
154
140
  "AgentaTreesResponse",
155
141
  "AggregatedResult",
156
142
  "AggregatedResultEvaluatorConfig",
157
- "AnalyticsResponse",
158
143
  "App",
159
144
  "AppVariantResponse",
160
145
  "AppVariantRevision",
161
146
  "AsyncAgentaApi",
162
147
  "BaseOutput",
163
148
  "BodyImportTestset",
164
- "BucketDto",
165
149
  "CollectStatusResponse",
166
150
  "ConfigDb",
167
151
  "ConfigDto",
@@ -191,7 +175,6 @@ __all__ = [
191
175
  "ExceptionDto",
192
176
  "Format",
193
177
  "GetConfigResponse",
194
- "HeaderDto",
195
178
  "HttpValidationError",
196
179
  "HumanEvaluation",
197
180
  "HumanEvaluationScenario",
@@ -201,14 +184,12 @@ __all__ = [
201
184
  "HumanEvaluationUpdate",
202
185
  "Image",
203
186
  "InviteRequest",
204
- "LegacyAnalyticsResponse",
205
- "LegacyDataPoint",
206
187
  "LifecycleDto",
207
188
  "LinkDto",
208
189
  "ListApiKeysResponse",
209
190
  "LlmRunRateLimit",
210
191
  "LlmTokens",
211
- "MetricsDto",
192
+ "LmProvidersEnum",
212
193
  "NewHumanEvaluation",
213
194
  "NewTestset",
214
195
  "NodeDto",
@@ -226,19 +207,12 @@ __all__ = [
226
207
  "Outputs",
227
208
  "ParentDto",
228
209
  "Permission",
229
- "ProjectsResponse",
230
- "ProviderKeyDto",
231
- "ProviderKind",
232
- "QueryAnalyticsResponse",
233
210
  "QueryTracesResponse",
234
211
  "ReferenceDto",
235
212
  "ReferenceRequestModel",
236
213
  "Result",
237
214
  "RootDto",
238
215
  "Score",
239
- "SecretDto",
240
- "SecretKind",
241
- "SecretResponseDto",
242
216
  "SimpleEvaluationOutput",
243
217
  "Span",
244
218
  "SpanDetail",
@@ -269,7 +243,6 @@ __all__ = [
269
243
  "WorkspaceResponse",
270
244
  "WorkspaceRole",
271
245
  "WorkspaceRoleResponse",
272
- "access_control",
273
246
  "apps",
274
247
  "bases",
275
248
  "configs",
@@ -279,8 +252,6 @@ __all__ = [
279
252
  "evaluators",
280
253
  "observability",
281
254
  "observability_v_1",
282
- "scopes",
283
255
  "testsets",
284
256
  "variants",
285
- "vault",
286
257
  ]
@@ -216,9 +216,7 @@ class AppsClient:
216
216
  _response = self._client_wrapper.httpx_client.request(
217
217
  "apps",
218
218
  method="GET",
219
- params={
220
- "app_name": app_name,
221
- },
219
+ params={"app_name": app_name},
222
220
  request_options=request_options,
223
221
  )
224
222
  try:
@@ -250,15 +248,13 @@ class AppsClient:
250
248
  *,
251
249
  app_name: str,
252
250
  project_id: typing.Optional[str] = OMIT,
253
- workspace_id: typing.Optional[str] = OMIT,
254
- organization_id: typing.Optional[str] = OMIT,
255
251
  request_options: typing.Optional[RequestOptions] = None,
256
252
  ) -> CreateAppOutput:
257
253
  """
258
- Create a new app for a user or organization.
254
+ Create a new app for a user.
259
255
 
260
256
  Args:
261
- payload (CreateApp): The payload containing the app name and organization ID (optional).
257
+ payload (CreateApp): The payload containing the app name.
262
258
  stoken_session (SessionContainer): The session container containing the user's session token.
263
259
 
264
260
  Returns:
@@ -273,10 +269,6 @@ class AppsClient:
273
269
 
274
270
  project_id : typing.Optional[str]
275
271
 
276
- workspace_id : typing.Optional[str]
277
-
278
- organization_id : typing.Optional[str]
279
-
280
272
  request_options : typing.Optional[RequestOptions]
281
273
  Request-specific configuration.
282
274
 
@@ -303,11 +295,6 @@ class AppsClient:
303
295
  json={
304
296
  "app_name": app_name,
305
297
  "project_id": project_id,
306
- "workspace_id": workspace_id,
307
- "organization_id": organization_id,
308
- },
309
- headers={
310
- "content-type": "application/json",
311
298
  },
312
299
  request_options=request_options,
313
300
  omit=OMIT,
@@ -406,7 +393,7 @@ class AppsClient:
406
393
  request_options: typing.Optional[RequestOptions] = None,
407
394
  ) -> UpdateAppOutput:
408
395
  """
409
- Update an app for a user or organization.
396
+ Update an app for a user.
410
397
 
411
398
  Args:
412
399
  app_id (str): The ID of the app.
@@ -452,9 +439,6 @@ class AppsClient:
452
439
  json={
453
440
  "app_name": app_name,
454
441
  },
455
- headers={
456
- "content-type": "application/json",
457
- },
458
442
  request_options=request_options,
459
443
  omit=OMIT,
460
444
  )
@@ -554,9 +538,6 @@ class AppsClient:
554
538
  "base_name": base_name,
555
539
  "config_name": config_name,
556
540
  },
557
- headers={
558
- "content-type": "application/json",
559
- },
560
541
  request_options=request_options,
561
542
  omit=OMIT,
562
543
  )
@@ -591,8 +572,6 @@ class AppsClient:
591
572
  template_id: str,
592
573
  env_vars: typing.Dict[str, str],
593
574
  project_id: typing.Optional[str] = OMIT,
594
- workspace_id: typing.Optional[str] = OMIT,
595
- organization_id: typing.Optional[str] = OMIT,
596
575
  request_options: typing.Optional[RequestOptions] = None,
597
576
  ) -> AppVariantResponse:
598
577
  """
@@ -618,10 +597,6 @@ class AppsClient:
618
597
 
619
598
  project_id : typing.Optional[str]
620
599
 
621
- workspace_id : typing.Optional[str]
622
-
623
- organization_id : typing.Optional[str]
624
-
625
600
  request_options : typing.Optional[RequestOptions]
626
601
  Request-specific configuration.
627
602
 
@@ -651,12 +626,7 @@ class AppsClient:
651
626
  "app_name": app_name,
652
627
  "template_id": template_id,
653
628
  "project_id": project_id,
654
- "workspace_id": workspace_id,
655
629
  "env_vars": env_vars,
656
- "organization_id": organization_id,
657
- },
658
- headers={
659
- "content-type": "application/json",
660
630
  },
661
631
  request_options=request_options,
662
632
  omit=OMIT,
@@ -782,7 +752,7 @@ class AppsClient:
782
752
  base_url="https://yourhost.com/path/to/api",
783
753
  )
784
754
  client.apps.environment_revisions(
785
- app_id="app_id",
755
+ app_id="string",
786
756
  environment_name={"key": "value"},
787
757
  )
788
758
  """
@@ -1035,9 +1005,7 @@ class AsyncAppsClient:
1035
1005
  _response = await self._client_wrapper.httpx_client.request(
1036
1006
  "apps",
1037
1007
  method="GET",
1038
- params={
1039
- "app_name": app_name,
1040
- },
1008
+ params={"app_name": app_name},
1041
1009
  request_options=request_options,
1042
1010
  )
1043
1011
  try:
@@ -1069,15 +1037,13 @@ class AsyncAppsClient:
1069
1037
  *,
1070
1038
  app_name: str,
1071
1039
  project_id: typing.Optional[str] = OMIT,
1072
- workspace_id: typing.Optional[str] = OMIT,
1073
- organization_id: typing.Optional[str] = OMIT,
1074
1040
  request_options: typing.Optional[RequestOptions] = None,
1075
1041
  ) -> CreateAppOutput:
1076
1042
  """
1077
- Create a new app for a user or organization.
1043
+ Create a new app for a user.
1078
1044
 
1079
1045
  Args:
1080
- payload (CreateApp): The payload containing the app name and organization ID (optional).
1046
+ payload (CreateApp): The payload containing the app name.
1081
1047
  stoken_session (SessionContainer): The session container containing the user's session token.
1082
1048
 
1083
1049
  Returns:
@@ -1092,10 +1058,6 @@ class AsyncAppsClient:
1092
1058
 
1093
1059
  project_id : typing.Optional[str]
1094
1060
 
1095
- workspace_id : typing.Optional[str]
1096
-
1097
- organization_id : typing.Optional[str]
1098
-
1099
1061
  request_options : typing.Optional[RequestOptions]
1100
1062
  Request-specific configuration.
1101
1063
 
@@ -1130,11 +1092,6 @@ class AsyncAppsClient:
1130
1092
  json={
1131
1093
  "app_name": app_name,
1132
1094
  "project_id": project_id,
1133
- "workspace_id": workspace_id,
1134
- "organization_id": organization_id,
1135
- },
1136
- headers={
1137
- "content-type": "application/json",
1138
1095
  },
1139
1096
  request_options=request_options,
1140
1097
  omit=OMIT,
@@ -1241,7 +1198,7 @@ class AsyncAppsClient:
1241
1198
  request_options: typing.Optional[RequestOptions] = None,
1242
1199
  ) -> UpdateAppOutput:
1243
1200
  """
1244
- Update an app for a user or organization.
1201
+ Update an app for a user.
1245
1202
 
1246
1203
  Args:
1247
1204
  app_id (str): The ID of the app.
@@ -1295,9 +1252,6 @@ class AsyncAppsClient:
1295
1252
  json={
1296
1253
  "app_name": app_name,
1297
1254
  },
1298
- headers={
1299
- "content-type": "application/json",
1300
- },
1301
1255
  request_options=request_options,
1302
1256
  omit=OMIT,
1303
1257
  )
@@ -1405,9 +1359,6 @@ class AsyncAppsClient:
1405
1359
  "base_name": base_name,
1406
1360
  "config_name": config_name,
1407
1361
  },
1408
- headers={
1409
- "content-type": "application/json",
1410
- },
1411
1362
  request_options=request_options,
1412
1363
  omit=OMIT,
1413
1364
  )
@@ -1442,8 +1393,6 @@ class AsyncAppsClient:
1442
1393
  template_id: str,
1443
1394
  env_vars: typing.Dict[str, str],
1444
1395
  project_id: typing.Optional[str] = OMIT,
1445
- workspace_id: typing.Optional[str] = OMIT,
1446
- organization_id: typing.Optional[str] = OMIT,
1447
1396
  request_options: typing.Optional[RequestOptions] = None,
1448
1397
  ) -> AppVariantResponse:
1449
1398
  """
@@ -1469,10 +1418,6 @@ class AsyncAppsClient:
1469
1418
 
1470
1419
  project_id : typing.Optional[str]
1471
1420
 
1472
- workspace_id : typing.Optional[str]
1473
-
1474
- organization_id : typing.Optional[str]
1475
-
1476
1421
  request_options : typing.Optional[RequestOptions]
1477
1422
  Request-specific configuration.
1478
1423
 
@@ -1510,12 +1455,7 @@ class AsyncAppsClient:
1510
1455
  "app_name": app_name,
1511
1456
  "template_id": template_id,
1512
1457
  "project_id": project_id,
1513
- "workspace_id": workspace_id,
1514
1458
  "env_vars": env_vars,
1515
- "organization_id": organization_id,
1516
- },
1517
- headers={
1518
- "content-type": "application/json",
1519
1459
  },
1520
1460
  request_options=request_options,
1521
1461
  omit=OMIT,
@@ -1654,7 +1594,7 @@ class AsyncAppsClient:
1654
1594
 
1655
1595
  async def main() -> None:
1656
1596
  await client.apps.environment_revisions(
1657
- app_id="app_id",
1597
+ app_id="string",
1658
1598
  environment_name={"key": "value"},
1659
1599
  )
1660
1600
 
@@ -4,9 +4,6 @@ import typing
4
4
  import httpx
5
5
  from .core.client_wrapper import SyncClientWrapper
6
6
  from .observability.client import ObservabilityClient
7
- from .vault.client import VaultClient
8
- from .access_control.client import AccessControlClient
9
- from .scopes.client import ScopesClient
10
7
  from .apps.client import AppsClient
11
8
  from .variants.client import VariantsClient
12
9
  from .evaluations.client import EvaluationsClient
@@ -22,9 +19,9 @@ from .types.list_api_keys_response import ListApiKeysResponse
22
19
  from .core.pydantic_utilities import parse_obj_as
23
20
  from json.decoder import JSONDecodeError
24
21
  from .core.api_error import ApiError
25
- from .core.jsonable_encoder import jsonable_encoder
26
22
  from .errors.unprocessable_entity_error import UnprocessableEntityError
27
23
  from .types.http_validation_error import HttpValidationError
24
+ from .core.jsonable_encoder import jsonable_encoder
28
25
  from .types.organization import Organization
29
26
  from .types.organization_output import OrganizationOutput
30
27
  from .types.invite_request import InviteRequest
@@ -35,9 +32,6 @@ from .types.workspace_role_response import WorkspaceRoleResponse
35
32
  from .types.permission import Permission
36
33
  from .core.client_wrapper import AsyncClientWrapper
37
34
  from .observability.client import AsyncObservabilityClient
38
- from .vault.client import AsyncVaultClient
39
- from .access_control.client import AsyncAccessControlClient
40
- from .scopes.client import AsyncScopesClient
41
35
  from .apps.client import AsyncAppsClient
42
36
  from .variants.client import AsyncVariantsClient
43
37
  from .evaluations.client import AsyncEvaluationsClient
@@ -107,9 +101,6 @@ class AgentaApi:
107
101
  timeout=_defaulted_timeout,
108
102
  )
109
103
  self.observability = ObservabilityClient(client_wrapper=self._client_wrapper)
110
- self.vault = VaultClient(client_wrapper=self._client_wrapper)
111
- self.access_control = AccessControlClient(client_wrapper=self._client_wrapper)
112
- self.scopes = ScopesClient(client_wrapper=self._client_wrapper)
113
104
  self.apps = AppsClient(client_wrapper=self._client_wrapper)
114
105
  self.variants = VariantsClient(client_wrapper=self._client_wrapper)
115
106
  self.evaluations = EvaluationsClient(client_wrapper=self._client_wrapper)
@@ -175,7 +166,10 @@ class AgentaApi:
175
166
  raise ApiError(status_code=_response.status_code, body=_response_json)
176
167
 
177
168
  def create_api_key(
178
- self, *, request_options: typing.Optional[RequestOptions] = None
169
+ self,
170
+ *,
171
+ workspace_id: str,
172
+ request_options: typing.Optional[RequestOptions] = None,
179
173
  ) -> str:
180
174
  """
181
175
  Creates an API key for a user.
@@ -188,6 +182,8 @@ class AgentaApi:
188
182
 
189
183
  Parameters
190
184
  ----------
185
+ workspace_id : str
186
+
191
187
  request_options : typing.Optional[RequestOptions]
192
188
  Request-specific configuration.
193
189
 
@@ -204,11 +200,16 @@ class AgentaApi:
204
200
  api_key="YOUR_API_KEY",
205
201
  base_url="https://yourhost.com/path/to/api",
206
202
  )
207
- client.create_api_key()
203
+ client.create_api_key(
204
+ workspace_id="workspace_id",
205
+ )
208
206
  """
209
207
  _response = self._client_wrapper.httpx_client.request(
210
208
  "keys",
211
209
  method="POST",
210
+ params={
211
+ "workspace_id": workspace_id,
212
+ },
212
213
  request_options=request_options,
213
214
  )
214
215
  try:
@@ -220,6 +221,16 @@ class AgentaApi:
220
221
  object_=_response.json(),
221
222
  ),
222
223
  )
224
+ if _response.status_code == 422:
225
+ raise UnprocessableEntityError(
226
+ typing.cast(
227
+ HttpValidationError,
228
+ parse_obj_as(
229
+ type_=HttpValidationError, # type: ignore
230
+ object_=_response.json(),
231
+ ),
232
+ )
233
+ )
223
234
  _response_json = _response.json()
224
235
  except JSONDecodeError:
225
236
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -465,9 +476,6 @@ class AgentaApi:
465
476
  "description": description,
466
477
  "type": type,
467
478
  },
468
- headers={
469
- "content-type": "application/json",
470
- },
471
479
  request_options=request_options,
472
480
  omit=OMIT,
473
481
  )
@@ -652,9 +660,6 @@ class AgentaApi:
652
660
  "description": description,
653
661
  "updated_at": updated_at,
654
662
  },
655
- headers={
656
- "content-type": "application/json",
657
- },
658
663
  request_options=request_options,
659
664
  omit=OMIT,
660
665
  )
@@ -816,9 +821,6 @@ class AgentaApi:
816
821
  json={
817
822
  "email": email,
818
823
  },
819
- headers={
820
- "content-type": "application/json",
821
- },
822
824
  request_options=request_options,
823
825
  omit=OMIT,
824
826
  )
@@ -908,9 +910,6 @@ class AgentaApi:
908
910
  json={
909
911
  "token": token,
910
912
  },
911
- headers={
912
- "content-type": "application/json",
913
- },
914
913
  request_options=request_options,
915
914
  omit=OMIT,
916
915
  )
@@ -987,9 +986,6 @@ class AgentaApi:
987
986
  "description": description,
988
987
  "type": type,
989
988
  },
990
- headers={
991
- "content-type": "application/json",
992
- },
993
989
  request_options=request_options,
994
990
  omit=OMIT,
995
991
  )
@@ -1069,9 +1065,6 @@ class AgentaApi:
1069
1065
  "description": description,
1070
1066
  "updated_at": updated_at,
1071
1067
  },
1072
- headers={
1073
- "content-type": "application/json",
1074
- },
1075
1068
  request_options=request_options,
1076
1069
  omit=OMIT,
1077
1070
  )
@@ -1269,9 +1262,6 @@ class AgentaApi:
1269
1262
  "organization_id": organization_id,
1270
1263
  "role": role,
1271
1264
  },
1272
- headers={
1273
- "content-type": "application/json",
1274
- },
1275
1265
  request_options=request_options,
1276
1266
  omit=OMIT,
1277
1267
  )
@@ -1642,11 +1632,6 @@ class AsyncAgentaApi:
1642
1632
  self.observability = AsyncObservabilityClient(
1643
1633
  client_wrapper=self._client_wrapper
1644
1634
  )
1645
- self.vault = AsyncVaultClient(client_wrapper=self._client_wrapper)
1646
- self.access_control = AsyncAccessControlClient(
1647
- client_wrapper=self._client_wrapper
1648
- )
1649
- self.scopes = AsyncScopesClient(client_wrapper=self._client_wrapper)
1650
1635
  self.apps = AsyncAppsClient(client_wrapper=self._client_wrapper)
1651
1636
  self.variants = AsyncVariantsClient(client_wrapper=self._client_wrapper)
1652
1637
  self.evaluations = AsyncEvaluationsClient(client_wrapper=self._client_wrapper)
@@ -1720,7 +1705,10 @@ class AsyncAgentaApi:
1720
1705
  raise ApiError(status_code=_response.status_code, body=_response_json)
1721
1706
 
1722
1707
  async def create_api_key(
1723
- self, *, request_options: typing.Optional[RequestOptions] = None
1708
+ self,
1709
+ *,
1710
+ workspace_id: str,
1711
+ request_options: typing.Optional[RequestOptions] = None,
1724
1712
  ) -> str:
1725
1713
  """
1726
1714
  Creates an API key for a user.
@@ -1733,6 +1721,8 @@ class AsyncAgentaApi:
1733
1721
 
1734
1722
  Parameters
1735
1723
  ----------
1724
+ workspace_id : str
1725
+
1736
1726
  request_options : typing.Optional[RequestOptions]
1737
1727
  Request-specific configuration.
1738
1728
 
@@ -1754,7 +1744,9 @@ class AsyncAgentaApi:
1754
1744
 
1755
1745
 
1756
1746
  async def main() -> None:
1757
- await client.create_api_key()
1747
+ await client.create_api_key(
1748
+ workspace_id="workspace_id",
1749
+ )
1758
1750
 
1759
1751
 
1760
1752
  asyncio.run(main())
@@ -1762,6 +1754,9 @@ class AsyncAgentaApi:
1762
1754
  _response = await self._client_wrapper.httpx_client.request(
1763
1755
  "keys",
1764
1756
  method="POST",
1757
+ params={
1758
+ "workspace_id": workspace_id,
1759
+ },
1765
1760
  request_options=request_options,
1766
1761
  )
1767
1762
  try:
@@ -1773,6 +1768,16 @@ class AsyncAgentaApi:
1773
1768
  object_=_response.json(),
1774
1769
  ),
1775
1770
  )
1771
+ if _response.status_code == 422:
1772
+ raise UnprocessableEntityError(
1773
+ typing.cast(
1774
+ HttpValidationError,
1775
+ parse_obj_as(
1776
+ type_=HttpValidationError, # type: ignore
1777
+ object_=_response.json(),
1778
+ ),
1779
+ )
1780
+ )
1776
1781
  _response_json = _response.json()
1777
1782
  except JSONDecodeError:
1778
1783
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -2050,9 +2055,6 @@ class AsyncAgentaApi:
2050
2055
  "description": description,
2051
2056
  "type": type,
2052
2057
  },
2053
- headers={
2054
- "content-type": "application/json",
2055
- },
2056
2058
  request_options=request_options,
2057
2059
  omit=OMIT,
2058
2060
  )
@@ -2261,9 +2263,6 @@ class AsyncAgentaApi:
2261
2263
  "description": description,
2262
2264
  "updated_at": updated_at,
2263
2265
  },
2264
- headers={
2265
- "content-type": "application/json",
2266
- },
2267
2266
  request_options=request_options,
2268
2267
  omit=OMIT,
2269
2268
  )
@@ -2441,9 +2440,6 @@ class AsyncAgentaApi:
2441
2440
  json={
2442
2441
  "email": email,
2443
2442
  },
2444
- headers={
2445
- "content-type": "application/json",
2446
- },
2447
2443
  request_options=request_options,
2448
2444
  omit=OMIT,
2449
2445
  )
@@ -2541,9 +2537,6 @@ class AsyncAgentaApi:
2541
2537
  json={
2542
2538
  "token": token,
2543
2539
  },
2544
- headers={
2545
- "content-type": "application/json",
2546
- },
2547
2540
  request_options=request_options,
2548
2541
  omit=OMIT,
2549
2542
  )
@@ -2628,9 +2621,6 @@ class AsyncAgentaApi:
2628
2621
  "description": description,
2629
2622
  "type": type,
2630
2623
  },
2631
- headers={
2632
- "content-type": "application/json",
2633
- },
2634
2624
  request_options=request_options,
2635
2625
  omit=OMIT,
2636
2626
  )
@@ -2718,9 +2708,6 @@ class AsyncAgentaApi:
2718
2708
  "description": description,
2719
2709
  "updated_at": updated_at,
2720
2710
  },
2721
- headers={
2722
- "content-type": "application/json",
2723
- },
2724
2711
  request_options=request_options,
2725
2712
  omit=OMIT,
2726
2713
  )
@@ -2942,9 +2929,6 @@ class AsyncAgentaApi:
2942
2929
  "organization_id": organization_id,
2943
2930
  "role": role,
2944
2931
  },
2945
- headers={
2946
- "content-type": "application/json",
2947
- },
2948
2932
  request_options=request_options,
2949
2933
  omit=OMIT,
2950
2934
  )
@@ -143,9 +143,6 @@ class ConfigsClient:
143
143
  "parameters": parameters,
144
144
  "overwrite": overwrite,
145
145
  },
146
- headers={
147
- "content-type": "application/json",
148
- },
149
146
  request_options=request_options,
150
147
  omit=OMIT,
151
148
  )
@@ -437,9 +434,6 @@ class AsyncConfigsClient:
437
434
  "parameters": parameters,
438
435
  "overwrite": overwrite,
439
436
  },
440
- headers={
441
- "content-type": "application/json",
442
- },
443
437
  request_options=request_options,
444
438
  omit=OMIT,
445
439
  )