agenta 0.31.0a1__py3-none-any.whl → 0.32.0__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.
- agenta/client/backend/__init__.py +4 -8
- agenta/client/backend/apps/client.py +68 -68
- agenta/client/backend/bases/client.py +10 -10
- agenta/client/backend/client.py +96 -88
- agenta/client/backend/containers/client.py +70 -28
- agenta/client/backend/environments/client.py +8 -8
- agenta/client/backend/evaluations/client.py +46 -46
- agenta/client/backend/evaluators/client.py +32 -32
- agenta/client/backend/human_evaluations/__init__.py +1 -0
- agenta/client/backend/human_evaluations/client.py +1696 -0
- agenta/client/backend/testsets/client.py +28 -28
- agenta/client/backend/types/__init__.py +3 -7
- agenta/client/backend/types/{evaluation_scenario_score_update.py → delete_evaluation.py} +3 -3
- agenta/client/backend/variants/client.py +54 -42
- agenta/sdk/tracing/inline.py +3 -1
- {agenta-0.31.0a1.dist-info → agenta-0.32.0.dist-info}/METADATA +10 -9
- {agenta-0.31.0a1.dist-info → agenta-0.32.0.dist-info}/RECORD +19 -20
- {agenta-0.31.0a1.dist-info → agenta-0.32.0.dist-info}/WHEEL +1 -1
- agenta/client/backend/types/human_evaluation_scenario_update.py +0 -30
- agenta/client/backend/types/human_evaluation_update.py +0 -22
- agenta/client/backend/types/new_human_evaluation.py +0 -27
- {agenta-0.31.0a1.dist-info → agenta-0.32.0.dist-info}/entry_points.txt +0 -0
|
@@ -25,6 +25,7 @@ from .types import (
|
|
|
25
25
|
CreateAppOutput,
|
|
26
26
|
CreateSpan,
|
|
27
27
|
CreateTraceResponse,
|
|
28
|
+
DeleteEvaluation,
|
|
28
29
|
DockerEnvVars,
|
|
29
30
|
EnvironmentOutput,
|
|
30
31
|
EnvironmentOutputExtended,
|
|
@@ -35,7 +36,6 @@ from .types import (
|
|
|
35
36
|
EvaluationScenarioInput,
|
|
36
37
|
EvaluationScenarioOutput,
|
|
37
38
|
EvaluationScenarioResult,
|
|
38
|
-
EvaluationScenarioScoreUpdate,
|
|
39
39
|
EvaluationStatusEnum,
|
|
40
40
|
EvaluationType,
|
|
41
41
|
Evaluator,
|
|
@@ -50,8 +50,6 @@ from .types import (
|
|
|
50
50
|
HumanEvaluationScenario,
|
|
51
51
|
HumanEvaluationScenarioInput,
|
|
52
52
|
HumanEvaluationScenarioOutput,
|
|
53
|
-
HumanEvaluationScenarioUpdate,
|
|
54
|
-
HumanEvaluationUpdate,
|
|
55
53
|
Image,
|
|
56
54
|
InviteRequest,
|
|
57
55
|
LegacyAnalyticsResponse,
|
|
@@ -62,7 +60,6 @@ from .types import (
|
|
|
62
60
|
LlmRunRateLimit,
|
|
63
61
|
LlmTokens,
|
|
64
62
|
MetricsDto,
|
|
65
|
-
NewHumanEvaluation,
|
|
66
63
|
NewTestset,
|
|
67
64
|
NodeDto,
|
|
68
65
|
NodeType,
|
|
@@ -130,6 +127,7 @@ from . import (
|
|
|
130
127
|
environments,
|
|
131
128
|
evaluations,
|
|
132
129
|
evaluators,
|
|
130
|
+
human_evaluations,
|
|
133
131
|
observability,
|
|
134
132
|
observability_v_1,
|
|
135
133
|
scopes,
|
|
@@ -171,6 +169,7 @@ __all__ = [
|
|
|
171
169
|
"CreateAppOutput",
|
|
172
170
|
"CreateSpan",
|
|
173
171
|
"CreateTraceResponse",
|
|
172
|
+
"DeleteEvaluation",
|
|
174
173
|
"DockerEnvVars",
|
|
175
174
|
"EnvironmentOutput",
|
|
176
175
|
"EnvironmentOutputExtended",
|
|
@@ -181,7 +180,6 @@ __all__ = [
|
|
|
181
180
|
"EvaluationScenarioInput",
|
|
182
181
|
"EvaluationScenarioOutput",
|
|
183
182
|
"EvaluationScenarioResult",
|
|
184
|
-
"EvaluationScenarioScoreUpdate",
|
|
185
183
|
"EvaluationStatusEnum",
|
|
186
184
|
"EvaluationType",
|
|
187
185
|
"Evaluator",
|
|
@@ -197,8 +195,6 @@ __all__ = [
|
|
|
197
195
|
"HumanEvaluationScenario",
|
|
198
196
|
"HumanEvaluationScenarioInput",
|
|
199
197
|
"HumanEvaluationScenarioOutput",
|
|
200
|
-
"HumanEvaluationScenarioUpdate",
|
|
201
|
-
"HumanEvaluationUpdate",
|
|
202
198
|
"Image",
|
|
203
199
|
"InviteRequest",
|
|
204
200
|
"LegacyAnalyticsResponse",
|
|
@@ -209,7 +205,6 @@ __all__ = [
|
|
|
209
205
|
"LlmRunRateLimit",
|
|
210
206
|
"LlmTokens",
|
|
211
207
|
"MetricsDto",
|
|
212
|
-
"NewHumanEvaluation",
|
|
213
208
|
"NewTestset",
|
|
214
209
|
"NodeDto",
|
|
215
210
|
"NodeType",
|
|
@@ -277,6 +272,7 @@ __all__ = [
|
|
|
277
272
|
"environments",
|
|
278
273
|
"evaluations",
|
|
279
274
|
"evaluators",
|
|
275
|
+
"human_evaluations",
|
|
280
276
|
"observability",
|
|
281
277
|
"observability_v_1",
|
|
282
278
|
"scopes",
|
|
@@ -32,11 +32,11 @@ class AppsClient:
|
|
|
32
32
|
Retrieve a list of app variants for a given app ID.
|
|
33
33
|
|
|
34
34
|
Args:
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
app_id (str): The ID of the app to retrieve variants for.
|
|
36
|
+
stoken_session (SessionContainer, optional): The session container to verify the user's session. Defaults to Depends(verify_session()).
|
|
37
37
|
|
|
38
38
|
Returns:
|
|
39
|
-
|
|
39
|
+
List[AppVariantResponse]: A list of app variants for the given app ID.
|
|
40
40
|
|
|
41
41
|
Parameters
|
|
42
42
|
----------
|
|
@@ -102,15 +102,15 @@ class AppsClient:
|
|
|
102
102
|
Retrieve the app variant based on the provided app_id and environment.
|
|
103
103
|
|
|
104
104
|
Args:
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
105
|
+
app_id (str): The ID of the app to retrieve the variant for.
|
|
106
|
+
environment (str): The environment of the app variant to retrieve.
|
|
107
|
+
stoken_session (SessionContainer, optional): The session token container. Defaults to Depends(verify_session()).
|
|
108
108
|
|
|
109
109
|
Raises:
|
|
110
|
-
|
|
110
|
+
HTTPException: If the app variant is not found (status_code=500), or if a ValueError is raised (status_code=400), or if any other exception is raised (status_code=500).
|
|
111
111
|
|
|
112
112
|
Returns:
|
|
113
|
-
|
|
113
|
+
AppVariantResponse: The retrieved app variant.
|
|
114
114
|
|
|
115
115
|
Parameters
|
|
116
116
|
----------
|
|
@@ -182,14 +182,14 @@ class AppsClient:
|
|
|
182
182
|
Retrieve a list of apps filtered by app_name.
|
|
183
183
|
|
|
184
184
|
Args:
|
|
185
|
-
|
|
186
|
-
|
|
185
|
+
app_name (Optional[str]): The name of the app to filter by.
|
|
186
|
+
stoken_session (SessionContainer): The session container.
|
|
187
187
|
|
|
188
188
|
Returns:
|
|
189
|
-
|
|
189
|
+
List[App]: A list of apps filtered by app_name.
|
|
190
190
|
|
|
191
191
|
Raises:
|
|
192
|
-
|
|
192
|
+
HTTPException: If there was an error retrieving the list of apps.
|
|
193
193
|
|
|
194
194
|
Parameters
|
|
195
195
|
----------
|
|
@@ -258,14 +258,14 @@ class AppsClient:
|
|
|
258
258
|
Create a new app for a user or organization.
|
|
259
259
|
|
|
260
260
|
Args:
|
|
261
|
-
|
|
262
|
-
|
|
261
|
+
payload (CreateApp): The payload containing the app name and organization ID (optional).
|
|
262
|
+
stoken_session (SessionContainer): The session container containing the user's session token.
|
|
263
263
|
|
|
264
264
|
Returns:
|
|
265
|
-
|
|
265
|
+
CreateAppOutput: The output containing the newly created app's ID and name.
|
|
266
266
|
|
|
267
267
|
Raises:
|
|
268
|
-
|
|
268
|
+
HTTPException: If there is an error creating the app or the user does not have permission to access the app.
|
|
269
269
|
|
|
270
270
|
Parameters
|
|
271
271
|
----------
|
|
@@ -343,7 +343,7 @@ class AppsClient:
|
|
|
343
343
|
Remove app, all its variant, containers and images
|
|
344
344
|
|
|
345
345
|
Arguments:
|
|
346
|
-
|
|
346
|
+
app -- App to remove
|
|
347
347
|
|
|
348
348
|
Parameters
|
|
349
349
|
----------
|
|
@@ -409,15 +409,15 @@ class AppsClient:
|
|
|
409
409
|
Update an app for a user or organization.
|
|
410
410
|
|
|
411
411
|
Args:
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
412
|
+
app_id (str): The ID of the app.
|
|
413
|
+
payload (UpdateApp): The payload containing the app name.
|
|
414
|
+
stoken_session (SessionContainer): The session container containing the user's session token.
|
|
415
415
|
|
|
416
416
|
Returns:
|
|
417
|
-
|
|
417
|
+
UpdateAppOuput: The output containing the newly created app's ID and name.
|
|
418
418
|
|
|
419
419
|
Raises:
|
|
420
|
-
|
|
420
|
+
HTTPException: If there is an error creating the app or the user does not have permission to access the app.
|
|
421
421
|
|
|
422
422
|
Parameters
|
|
423
423
|
----------
|
|
@@ -497,15 +497,15 @@ class AppsClient:
|
|
|
497
497
|
Add a new variant to an app based on a Docker image.
|
|
498
498
|
|
|
499
499
|
Args:
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
500
|
+
app_id (str): The ID of the app to add the variant to.
|
|
501
|
+
payload (AddVariantFromImagePayload): The payload containing information about the variant to add.
|
|
502
|
+
stoken_session (SessionContainer, optional): The session container. Defaults to Depends(verify_session()).
|
|
503
503
|
|
|
504
504
|
Raises:
|
|
505
|
-
|
|
505
|
+
HTTPException: If the feature flag is set to "demo" or if the image does not have a tag starting with the registry name (agenta-server) or if the image is not found or if the user does not have access to the app.
|
|
506
506
|
|
|
507
507
|
Returns:
|
|
508
|
-
|
|
508
|
+
dict: The newly added variant.
|
|
509
509
|
|
|
510
510
|
Parameters
|
|
511
511
|
----------
|
|
@@ -599,14 +599,14 @@ class AppsClient:
|
|
|
599
599
|
Create an app and variant from a template.
|
|
600
600
|
|
|
601
601
|
Args:
|
|
602
|
-
|
|
603
|
-
|
|
602
|
+
payload (CreateAppVariant): The payload containing the app and variant information.
|
|
603
|
+
stoken_session (SessionContainer, optional): The session container. Defaults to Depends(verify_session()).
|
|
604
604
|
|
|
605
605
|
Raises:
|
|
606
|
-
|
|
606
|
+
HTTPException: If the user has reached the app limit or if an app with the same name already exists.
|
|
607
607
|
|
|
608
608
|
Returns:
|
|
609
|
-
|
|
609
|
+
AppVariantResponse: The output of the created app variant.
|
|
610
610
|
|
|
611
611
|
Parameters
|
|
612
612
|
----------
|
|
@@ -692,11 +692,11 @@ class AppsClient:
|
|
|
692
692
|
Retrieve a list of environments for a given app ID.
|
|
693
693
|
|
|
694
694
|
Args:
|
|
695
|
-
|
|
696
|
-
|
|
695
|
+
app_id (str): The ID of the app to retrieve environments for.
|
|
696
|
+
stoken_session (SessionContainer, optional): The session container. Defaults to Depends(verify_session()).
|
|
697
697
|
|
|
698
698
|
Returns:
|
|
699
|
-
|
|
699
|
+
List[EnvironmentOutput]: A list of environment objects.
|
|
700
700
|
|
|
701
701
|
Parameters
|
|
702
702
|
----------
|
|
@@ -827,11 +827,11 @@ class AsyncAppsClient:
|
|
|
827
827
|
Retrieve a list of app variants for a given app ID.
|
|
828
828
|
|
|
829
829
|
Args:
|
|
830
|
-
|
|
831
|
-
|
|
830
|
+
app_id (str): The ID of the app to retrieve variants for.
|
|
831
|
+
stoken_session (SessionContainer, optional): The session container to verify the user's session. Defaults to Depends(verify_session()).
|
|
832
832
|
|
|
833
833
|
Returns:
|
|
834
|
-
|
|
834
|
+
List[AppVariantResponse]: A list of app variants for the given app ID.
|
|
835
835
|
|
|
836
836
|
Parameters
|
|
837
837
|
----------
|
|
@@ -905,15 +905,15 @@ class AsyncAppsClient:
|
|
|
905
905
|
Retrieve the app variant based on the provided app_id and environment.
|
|
906
906
|
|
|
907
907
|
Args:
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
908
|
+
app_id (str): The ID of the app to retrieve the variant for.
|
|
909
|
+
environment (str): The environment of the app variant to retrieve.
|
|
910
|
+
stoken_session (SessionContainer, optional): The session token container. Defaults to Depends(verify_session()).
|
|
911
911
|
|
|
912
912
|
Raises:
|
|
913
|
-
|
|
913
|
+
HTTPException: If the app variant is not found (status_code=500), or if a ValueError is raised (status_code=400), or if any other exception is raised (status_code=500).
|
|
914
914
|
|
|
915
915
|
Returns:
|
|
916
|
-
|
|
916
|
+
AppVariantResponse: The retrieved app variant.
|
|
917
917
|
|
|
918
918
|
Parameters
|
|
919
919
|
----------
|
|
@@ -993,14 +993,14 @@ class AsyncAppsClient:
|
|
|
993
993
|
Retrieve a list of apps filtered by app_name.
|
|
994
994
|
|
|
995
995
|
Args:
|
|
996
|
-
|
|
997
|
-
|
|
996
|
+
app_name (Optional[str]): The name of the app to filter by.
|
|
997
|
+
stoken_session (SessionContainer): The session container.
|
|
998
998
|
|
|
999
999
|
Returns:
|
|
1000
|
-
|
|
1000
|
+
List[App]: A list of apps filtered by app_name.
|
|
1001
1001
|
|
|
1002
1002
|
Raises:
|
|
1003
|
-
|
|
1003
|
+
HTTPException: If there was an error retrieving the list of apps.
|
|
1004
1004
|
|
|
1005
1005
|
Parameters
|
|
1006
1006
|
----------
|
|
@@ -1077,14 +1077,14 @@ class AsyncAppsClient:
|
|
|
1077
1077
|
Create a new app for a user or organization.
|
|
1078
1078
|
|
|
1079
1079
|
Args:
|
|
1080
|
-
|
|
1081
|
-
|
|
1080
|
+
payload (CreateApp): The payload containing the app name and organization ID (optional).
|
|
1081
|
+
stoken_session (SessionContainer): The session container containing the user's session token.
|
|
1082
1082
|
|
|
1083
1083
|
Returns:
|
|
1084
|
-
|
|
1084
|
+
CreateAppOutput: The output containing the newly created app's ID and name.
|
|
1085
1085
|
|
|
1086
1086
|
Raises:
|
|
1087
|
-
|
|
1087
|
+
HTTPException: If there is an error creating the app or the user does not have permission to access the app.
|
|
1088
1088
|
|
|
1089
1089
|
Parameters
|
|
1090
1090
|
----------
|
|
@@ -1170,7 +1170,7 @@ class AsyncAppsClient:
|
|
|
1170
1170
|
Remove app, all its variant, containers and images
|
|
1171
1171
|
|
|
1172
1172
|
Arguments:
|
|
1173
|
-
|
|
1173
|
+
app -- App to remove
|
|
1174
1174
|
|
|
1175
1175
|
Parameters
|
|
1176
1176
|
----------
|
|
@@ -1244,15 +1244,15 @@ class AsyncAppsClient:
|
|
|
1244
1244
|
Update an app for a user or organization.
|
|
1245
1245
|
|
|
1246
1246
|
Args:
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1247
|
+
app_id (str): The ID of the app.
|
|
1248
|
+
payload (UpdateApp): The payload containing the app name.
|
|
1249
|
+
stoken_session (SessionContainer): The session container containing the user's session token.
|
|
1250
1250
|
|
|
1251
1251
|
Returns:
|
|
1252
|
-
|
|
1252
|
+
UpdateAppOuput: The output containing the newly created app's ID and name.
|
|
1253
1253
|
|
|
1254
1254
|
Raises:
|
|
1255
|
-
|
|
1255
|
+
HTTPException: If there is an error creating the app or the user does not have permission to access the app.
|
|
1256
1256
|
|
|
1257
1257
|
Parameters
|
|
1258
1258
|
----------
|
|
@@ -1340,15 +1340,15 @@ class AsyncAppsClient:
|
|
|
1340
1340
|
Add a new variant to an app based on a Docker image.
|
|
1341
1341
|
|
|
1342
1342
|
Args:
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1343
|
+
app_id (str): The ID of the app to add the variant to.
|
|
1344
|
+
payload (AddVariantFromImagePayload): The payload containing information about the variant to add.
|
|
1345
|
+
stoken_session (SessionContainer, optional): The session container. Defaults to Depends(verify_session()).
|
|
1346
1346
|
|
|
1347
1347
|
Raises:
|
|
1348
|
-
|
|
1348
|
+
HTTPException: If the feature flag is set to "demo" or if the image does not have a tag starting with the registry name (agenta-server) or if the image is not found or if the user does not have access to the app.
|
|
1349
1349
|
|
|
1350
1350
|
Returns:
|
|
1351
|
-
|
|
1351
|
+
dict: The newly added variant.
|
|
1352
1352
|
|
|
1353
1353
|
Parameters
|
|
1354
1354
|
----------
|
|
@@ -1450,14 +1450,14 @@ class AsyncAppsClient:
|
|
|
1450
1450
|
Create an app and variant from a template.
|
|
1451
1451
|
|
|
1452
1452
|
Args:
|
|
1453
|
-
|
|
1454
|
-
|
|
1453
|
+
payload (CreateAppVariant): The payload containing the app and variant information.
|
|
1454
|
+
stoken_session (SessionContainer, optional): The session container. Defaults to Depends(verify_session()).
|
|
1455
1455
|
|
|
1456
1456
|
Raises:
|
|
1457
|
-
|
|
1457
|
+
HTTPException: If the user has reached the app limit or if an app with the same name already exists.
|
|
1458
1458
|
|
|
1459
1459
|
Returns:
|
|
1460
|
-
|
|
1460
|
+
AppVariantResponse: The output of the created app variant.
|
|
1461
1461
|
|
|
1462
1462
|
Parameters
|
|
1463
1463
|
----------
|
|
@@ -1551,11 +1551,11 @@ class AsyncAppsClient:
|
|
|
1551
1551
|
Retrieve a list of environments for a given app ID.
|
|
1552
1552
|
|
|
1553
1553
|
Args:
|
|
1554
|
-
|
|
1555
|
-
|
|
1554
|
+
app_id (str): The ID of the app to retrieve environments for.
|
|
1555
|
+
stoken_session (SessionContainer, optional): The session container. Defaults to Depends(verify_session()).
|
|
1556
1556
|
|
|
1557
1557
|
Returns:
|
|
1558
|
-
|
|
1558
|
+
List[EnvironmentOutput]: A list of environment objects.
|
|
1559
1559
|
|
|
1560
1560
|
Parameters
|
|
1561
1561
|
----------
|
|
@@ -27,15 +27,15 @@ class BasesClient:
|
|
|
27
27
|
Retrieve a list of bases filtered by app_id and base_name.
|
|
28
28
|
|
|
29
29
|
Args:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
request (Request): The incoming request.
|
|
31
|
+
app_id (str): The ID of the app to filter by.
|
|
32
|
+
base_name (Optional[str], optional): The name of the base to filter by. Defaults to None.
|
|
33
33
|
|
|
34
34
|
Returns:
|
|
35
|
-
|
|
35
|
+
List[BaseOutput]: A list of BaseOutput objects representing the filtered bases.
|
|
36
36
|
|
|
37
37
|
Raises:
|
|
38
|
-
|
|
38
|
+
HTTPException: If there was an error retrieving the bases.
|
|
39
39
|
|
|
40
40
|
Parameters
|
|
41
41
|
----------
|
|
@@ -112,15 +112,15 @@ class AsyncBasesClient:
|
|
|
112
112
|
Retrieve a list of bases filtered by app_id and base_name.
|
|
113
113
|
|
|
114
114
|
Args:
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
request (Request): The incoming request.
|
|
116
|
+
app_id (str): The ID of the app to filter by.
|
|
117
|
+
base_name (Optional[str], optional): The name of the base to filter by. Defaults to None.
|
|
118
118
|
|
|
119
119
|
Returns:
|
|
120
|
-
|
|
120
|
+
List[BaseOutput]: A list of BaseOutput objects representing the filtered bases.
|
|
121
121
|
|
|
122
122
|
Raises:
|
|
123
|
-
|
|
123
|
+
HTTPException: If there was an error retrieving the bases.
|
|
124
124
|
|
|
125
125
|
Parameters
|
|
126
126
|
----------
|