agenta 0.32.0a1__py3-none-any.whl → 0.33.0a1__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/decorators/routing.py +32 -10
- agenta/sdk/decorators/tracing.py +16 -4
- agenta/sdk/litellm/litellm.py +44 -8
- agenta/sdk/litellm/mockllm.py +2 -2
- agenta/sdk/litellm/mocks/__init__.py +9 -3
- agenta/sdk/middleware/auth.py +5 -1
- agenta/sdk/middleware/config.py +10 -2
- agenta/sdk/tracing/exporters.py +0 -1
- agenta/sdk/tracing/inline.py +26 -30
- agenta/sdk/types.py +12 -9
- {agenta-0.32.0a1.dist-info → agenta-0.33.0a1.dist-info}/METADATA +9 -11
- {agenta-0.32.0a1.dist-info → agenta-0.33.0a1.dist-info}/RECORD +28 -29
- 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.32.0a1.dist-info → agenta-0.33.0a1.dist-info}/WHEEL +0 -0
- {agenta-0.32.0a1.dist-info → agenta-0.33.0a1.dist-info}/entry_points.txt +0 -0
|
@@ -29,12 +29,12 @@ class EnvironmentsClient:
|
|
|
29
29
|
Deploys a given variant to an environment
|
|
30
30
|
|
|
31
31
|
Args:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
environment_name: Name of the environment to deploy to.
|
|
33
|
+
variant_id: variant id to deploy.
|
|
34
|
+
stoken_session: . Defaults to Depends(verify_session()).
|
|
35
35
|
|
|
36
36
|
Raises:
|
|
37
|
-
|
|
37
|
+
HTTPException: If the deployment fails.
|
|
38
38
|
|
|
39
39
|
Parameters
|
|
40
40
|
----------
|
|
@@ -116,12 +116,12 @@ class AsyncEnvironmentsClient:
|
|
|
116
116
|
Deploys a given variant to an environment
|
|
117
117
|
|
|
118
118
|
Args:
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
environment_name: Name of the environment to deploy to.
|
|
120
|
+
variant_id: variant id to deploy.
|
|
121
|
+
stoken_session: . Defaults to Depends(verify_session()).
|
|
122
122
|
|
|
123
123
|
Raises:
|
|
124
|
-
|
|
124
|
+
HTTPException: If the deployment fails.
|
|
125
125
|
|
|
126
126
|
Parameters
|
|
127
127
|
----------
|
|
@@ -34,15 +34,15 @@ class EvaluationsClient:
|
|
|
34
34
|
Fetches evaluation ids for a given resource type and id.
|
|
35
35
|
|
|
36
36
|
Arguments:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
app_id (str): The ID of the app for which to fetch evaluations.
|
|
38
|
+
resource_type (str): The type of resource for which to fetch evaluations.
|
|
39
|
+
resource_ids List[ObjectId]: The IDs of resource for which to fetch evaluations.
|
|
40
40
|
|
|
41
41
|
Raises:
|
|
42
|
-
|
|
42
|
+
HTTPException: If the resource_type is invalid or access is denied.
|
|
43
43
|
|
|
44
44
|
Returns:
|
|
45
|
-
|
|
45
|
+
List[str]: A list of evaluation ids.
|
|
46
46
|
|
|
47
47
|
Parameters
|
|
48
48
|
----------
|
|
@@ -110,10 +110,10 @@ class EvaluationsClient:
|
|
|
110
110
|
Fetches a list of evaluations, optionally filtered by an app ID.
|
|
111
111
|
|
|
112
112
|
Args:
|
|
113
|
-
|
|
113
|
+
app_id (Optional[str]): An optional app ID to filter the evaluations.
|
|
114
114
|
|
|
115
115
|
Returns:
|
|
116
|
-
|
|
116
|
+
List[Evaluation]: A list of evaluations.
|
|
117
117
|
|
|
118
118
|
Parameters
|
|
119
119
|
----------
|
|
@@ -188,9 +188,9 @@ class EvaluationsClient:
|
|
|
188
188
|
"""
|
|
189
189
|
Creates a new comparison table document
|
|
190
190
|
Raises:
|
|
191
|
-
|
|
191
|
+
HTTPException: _description_
|
|
192
192
|
Returns:
|
|
193
|
-
|
|
193
|
+
_description_
|
|
194
194
|
|
|
195
195
|
Parameters
|
|
196
196
|
----------
|
|
@@ -366,11 +366,11 @@ class EvaluationsClient:
|
|
|
366
366
|
Fetches the status of the evaluation.
|
|
367
367
|
|
|
368
368
|
Args:
|
|
369
|
-
|
|
370
|
-
|
|
369
|
+
evaluation_id (str): the evaluation id
|
|
370
|
+
request (Request): the request object
|
|
371
371
|
|
|
372
372
|
Returns:
|
|
373
|
-
|
|
373
|
+
(str): the evaluation status
|
|
374
374
|
|
|
375
375
|
Parameters
|
|
376
376
|
----------
|
|
@@ -435,11 +435,11 @@ class EvaluationsClient:
|
|
|
435
435
|
Fetches the results of the evaluation
|
|
436
436
|
|
|
437
437
|
Args:
|
|
438
|
-
|
|
439
|
-
|
|
438
|
+
evaluation_id (str): the evaluation id
|
|
439
|
+
request (Request): the request object
|
|
440
440
|
|
|
441
441
|
Returns:
|
|
442
|
-
|
|
442
|
+
_type_: _description_
|
|
443
443
|
|
|
444
444
|
Parameters
|
|
445
445
|
----------
|
|
@@ -504,13 +504,13 @@ class EvaluationsClient:
|
|
|
504
504
|
Fetches evaluation scenarios for a given evaluation ID.
|
|
505
505
|
|
|
506
506
|
Arguments:
|
|
507
|
-
|
|
507
|
+
evaluation_id (str): The ID of the evaluation for which to fetch scenarios.
|
|
508
508
|
|
|
509
509
|
Raises:
|
|
510
|
-
|
|
510
|
+
HTTPException: If the evaluation is not found or access is denied.
|
|
511
511
|
|
|
512
512
|
Returns:
|
|
513
|
-
|
|
513
|
+
List[EvaluationScenario]: A list of evaluation scenarios.
|
|
514
514
|
|
|
515
515
|
Parameters
|
|
516
516
|
----------
|
|
@@ -575,10 +575,10 @@ class EvaluationsClient:
|
|
|
575
575
|
Fetches a single evaluation based on its ID.
|
|
576
576
|
|
|
577
577
|
Args:
|
|
578
|
-
|
|
578
|
+
evaluation_id (str): The ID of the evaluation to fetch.
|
|
579
579
|
|
|
580
580
|
Returns:
|
|
581
|
-
|
|
581
|
+
Evaluation: The fetched evaluation.
|
|
582
582
|
|
|
583
583
|
Parameters
|
|
584
584
|
----------
|
|
@@ -643,13 +643,13 @@ class EvaluationsClient:
|
|
|
643
643
|
Fetches evaluation scenarios for a given evaluation ID.
|
|
644
644
|
|
|
645
645
|
Arguments:
|
|
646
|
-
|
|
646
|
+
evaluation_id (str): The ID of the evaluation for which to fetch scenarios.
|
|
647
647
|
|
|
648
648
|
Raises:
|
|
649
|
-
|
|
649
|
+
HTTPException: If the evaluation is not found or access is denied.
|
|
650
650
|
|
|
651
651
|
Returns:
|
|
652
|
-
|
|
652
|
+
List[EvaluationScenario]: A list of evaluation scenarios.
|
|
653
653
|
|
|
654
654
|
Parameters
|
|
655
655
|
----------
|
|
@@ -723,15 +723,15 @@ class AsyncEvaluationsClient:
|
|
|
723
723
|
Fetches evaluation ids for a given resource type and id.
|
|
724
724
|
|
|
725
725
|
Arguments:
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
726
|
+
app_id (str): The ID of the app for which to fetch evaluations.
|
|
727
|
+
resource_type (str): The type of resource for which to fetch evaluations.
|
|
728
|
+
resource_ids List[ObjectId]: The IDs of resource for which to fetch evaluations.
|
|
729
729
|
|
|
730
730
|
Raises:
|
|
731
|
-
|
|
731
|
+
HTTPException: If the resource_type is invalid or access is denied.
|
|
732
732
|
|
|
733
733
|
Returns:
|
|
734
|
-
|
|
734
|
+
List[str]: A list of evaluation ids.
|
|
735
735
|
|
|
736
736
|
Parameters
|
|
737
737
|
----------
|
|
@@ -807,10 +807,10 @@ class AsyncEvaluationsClient:
|
|
|
807
807
|
Fetches a list of evaluations, optionally filtered by an app ID.
|
|
808
808
|
|
|
809
809
|
Args:
|
|
810
|
-
|
|
810
|
+
app_id (Optional[str]): An optional app ID to filter the evaluations.
|
|
811
811
|
|
|
812
812
|
Returns:
|
|
813
|
-
|
|
813
|
+
List[Evaluation]: A list of evaluations.
|
|
814
814
|
|
|
815
815
|
Parameters
|
|
816
816
|
----------
|
|
@@ -893,9 +893,9 @@ class AsyncEvaluationsClient:
|
|
|
893
893
|
"""
|
|
894
894
|
Creates a new comparison table document
|
|
895
895
|
Raises:
|
|
896
|
-
|
|
896
|
+
HTTPException: _description_
|
|
897
897
|
Returns:
|
|
898
|
-
|
|
898
|
+
_description_
|
|
899
899
|
|
|
900
900
|
Parameters
|
|
901
901
|
----------
|
|
@@ -1087,11 +1087,11 @@ class AsyncEvaluationsClient:
|
|
|
1087
1087
|
Fetches the status of the evaluation.
|
|
1088
1088
|
|
|
1089
1089
|
Args:
|
|
1090
|
-
|
|
1091
|
-
|
|
1090
|
+
evaluation_id (str): the evaluation id
|
|
1091
|
+
request (Request): the request object
|
|
1092
1092
|
|
|
1093
1093
|
Returns:
|
|
1094
|
-
|
|
1094
|
+
(str): the evaluation status
|
|
1095
1095
|
|
|
1096
1096
|
Parameters
|
|
1097
1097
|
----------
|
|
@@ -1164,11 +1164,11 @@ class AsyncEvaluationsClient:
|
|
|
1164
1164
|
Fetches the results of the evaluation
|
|
1165
1165
|
|
|
1166
1166
|
Args:
|
|
1167
|
-
|
|
1168
|
-
|
|
1167
|
+
evaluation_id (str): the evaluation id
|
|
1168
|
+
request (Request): the request object
|
|
1169
1169
|
|
|
1170
1170
|
Returns:
|
|
1171
|
-
|
|
1171
|
+
_type_: _description_
|
|
1172
1172
|
|
|
1173
1173
|
Parameters
|
|
1174
1174
|
----------
|
|
@@ -1241,13 +1241,13 @@ class AsyncEvaluationsClient:
|
|
|
1241
1241
|
Fetches evaluation scenarios for a given evaluation ID.
|
|
1242
1242
|
|
|
1243
1243
|
Arguments:
|
|
1244
|
-
|
|
1244
|
+
evaluation_id (str): The ID of the evaluation for which to fetch scenarios.
|
|
1245
1245
|
|
|
1246
1246
|
Raises:
|
|
1247
|
-
|
|
1247
|
+
HTTPException: If the evaluation is not found or access is denied.
|
|
1248
1248
|
|
|
1249
1249
|
Returns:
|
|
1250
|
-
|
|
1250
|
+
List[EvaluationScenario]: A list of evaluation scenarios.
|
|
1251
1251
|
|
|
1252
1252
|
Parameters
|
|
1253
1253
|
----------
|
|
@@ -1320,10 +1320,10 @@ class AsyncEvaluationsClient:
|
|
|
1320
1320
|
Fetches a single evaluation based on its ID.
|
|
1321
1321
|
|
|
1322
1322
|
Args:
|
|
1323
|
-
|
|
1323
|
+
evaluation_id (str): The ID of the evaluation to fetch.
|
|
1324
1324
|
|
|
1325
1325
|
Returns:
|
|
1326
|
-
|
|
1326
|
+
Evaluation: The fetched evaluation.
|
|
1327
1327
|
|
|
1328
1328
|
Parameters
|
|
1329
1329
|
----------
|
|
@@ -1396,13 +1396,13 @@ class AsyncEvaluationsClient:
|
|
|
1396
1396
|
Fetches evaluation scenarios for a given evaluation ID.
|
|
1397
1397
|
|
|
1398
1398
|
Arguments:
|
|
1399
|
-
|
|
1399
|
+
evaluation_id (str): The ID of the evaluation for which to fetch scenarios.
|
|
1400
1400
|
|
|
1401
1401
|
Raises:
|
|
1402
|
-
|
|
1402
|
+
HTTPException: If the evaluation is not found or access is denied.
|
|
1403
1403
|
|
|
1404
1404
|
Returns:
|
|
1405
|
-
|
|
1405
|
+
List[EvaluationScenario]: A list of evaluation scenarios.
|
|
1406
1406
|
|
|
1407
1407
|
Parameters
|
|
1408
1408
|
----------
|
|
@@ -30,7 +30,7 @@ class EvaluatorsClient:
|
|
|
30
30
|
Endpoint to fetch a list of evaluators.
|
|
31
31
|
|
|
32
32
|
Returns:
|
|
33
|
-
|
|
33
|
+
List[Evaluator]: A list of evaluator objects.
|
|
34
34
|
|
|
35
35
|
Parameters
|
|
36
36
|
----------
|
|
@@ -82,11 +82,11 @@ class EvaluatorsClient:
|
|
|
82
82
|
Endpoint to map the experiment data tree to evaluator interface.
|
|
83
83
|
|
|
84
84
|
Args:
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
request (Request): The request object.
|
|
86
|
+
payload (EvaluatorMappingInputInterface): The payload containing the request data.
|
|
87
87
|
|
|
88
88
|
Returns:
|
|
89
|
-
|
|
89
|
+
EvaluatorMappingOutputInterface: the evaluator mapping output object
|
|
90
90
|
|
|
91
91
|
Parameters
|
|
92
92
|
----------
|
|
@@ -167,12 +167,12 @@ class EvaluatorsClient:
|
|
|
167
167
|
Endpoint to evaluate LLM app run
|
|
168
168
|
|
|
169
169
|
Args:
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
170
|
+
request (Request): The request object.
|
|
171
|
+
evaluator_key (str): The key of the evaluator.
|
|
172
|
+
payload (EvaluatorInputInterface): The payload containing the request data.
|
|
173
173
|
|
|
174
174
|
Returns:
|
|
175
|
-
|
|
175
|
+
result: EvaluatorOutputInterface object containing the outputs.
|
|
176
176
|
|
|
177
177
|
Parameters
|
|
178
178
|
----------
|
|
@@ -249,10 +249,10 @@ class EvaluatorsClient:
|
|
|
249
249
|
Endpoint to fetch evaluator configurations for a specific app.
|
|
250
250
|
|
|
251
251
|
Args:
|
|
252
|
-
|
|
252
|
+
app_id (str): The ID of the app.
|
|
253
253
|
|
|
254
254
|
Returns:
|
|
255
|
-
|
|
255
|
+
List[EvaluatorConfigDB]: A list of evaluator configuration objects.
|
|
256
256
|
|
|
257
257
|
Parameters
|
|
258
258
|
----------
|
|
@@ -323,10 +323,10 @@ class EvaluatorsClient:
|
|
|
323
323
|
Endpoint to fetch evaluator configurations for a specific app.
|
|
324
324
|
|
|
325
325
|
Args:
|
|
326
|
-
|
|
326
|
+
app_id (str): The ID of the app.
|
|
327
327
|
|
|
328
328
|
Returns:
|
|
329
|
-
|
|
329
|
+
EvaluatorConfigDB: Evaluator configuration api model.
|
|
330
330
|
|
|
331
331
|
Parameters
|
|
332
332
|
----------
|
|
@@ -410,7 +410,7 @@ class EvaluatorsClient:
|
|
|
410
410
|
Endpoint to fetch evaluator configurations for a specific app.
|
|
411
411
|
|
|
412
412
|
Returns:
|
|
413
|
-
|
|
413
|
+
List[EvaluatorConfigDB]: A list of evaluator configuration objects.
|
|
414
414
|
|
|
415
415
|
Parameters
|
|
416
416
|
----------
|
|
@@ -480,7 +480,7 @@ class EvaluatorsClient:
|
|
|
480
480
|
Endpoint to update evaluator configurations for a specific app.
|
|
481
481
|
|
|
482
482
|
Returns:
|
|
483
|
-
|
|
483
|
+
List[EvaluatorConfigDB]: A list of evaluator configuration objects.
|
|
484
484
|
|
|
485
485
|
Parameters
|
|
486
486
|
----------
|
|
@@ -560,10 +560,10 @@ class EvaluatorsClient:
|
|
|
560
560
|
Endpoint to delete a specific evaluator configuration.
|
|
561
561
|
|
|
562
562
|
Args:
|
|
563
|
-
|
|
563
|
+
evaluator_config_id (str): The unique identifier of the evaluator configuration.
|
|
564
564
|
|
|
565
565
|
Returns:
|
|
566
|
-
|
|
566
|
+
bool: True if deletion was successful, False otherwise.
|
|
567
567
|
|
|
568
568
|
Parameters
|
|
569
569
|
----------
|
|
@@ -630,7 +630,7 @@ class AsyncEvaluatorsClient:
|
|
|
630
630
|
Endpoint to fetch a list of evaluators.
|
|
631
631
|
|
|
632
632
|
Returns:
|
|
633
|
-
|
|
633
|
+
List[Evaluator]: A list of evaluator objects.
|
|
634
634
|
|
|
635
635
|
Parameters
|
|
636
636
|
----------
|
|
@@ -690,11 +690,11 @@ class AsyncEvaluatorsClient:
|
|
|
690
690
|
Endpoint to map the experiment data tree to evaluator interface.
|
|
691
691
|
|
|
692
692
|
Args:
|
|
693
|
-
|
|
694
|
-
|
|
693
|
+
request (Request): The request object.
|
|
694
|
+
payload (EvaluatorMappingInputInterface): The payload containing the request data.
|
|
695
695
|
|
|
696
696
|
Returns:
|
|
697
|
-
|
|
697
|
+
EvaluatorMappingOutputInterface: the evaluator mapping output object
|
|
698
698
|
|
|
699
699
|
Parameters
|
|
700
700
|
----------
|
|
@@ -783,12 +783,12 @@ class AsyncEvaluatorsClient:
|
|
|
783
783
|
Endpoint to evaluate LLM app run
|
|
784
784
|
|
|
785
785
|
Args:
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
786
|
+
request (Request): The request object.
|
|
787
|
+
evaluator_key (str): The key of the evaluator.
|
|
788
|
+
payload (EvaluatorInputInterface): The payload containing the request data.
|
|
789
789
|
|
|
790
790
|
Returns:
|
|
791
|
-
|
|
791
|
+
result: EvaluatorOutputInterface object containing the outputs.
|
|
792
792
|
|
|
793
793
|
Parameters
|
|
794
794
|
----------
|
|
@@ -873,10 +873,10 @@ class AsyncEvaluatorsClient:
|
|
|
873
873
|
Endpoint to fetch evaluator configurations for a specific app.
|
|
874
874
|
|
|
875
875
|
Args:
|
|
876
|
-
|
|
876
|
+
app_id (str): The ID of the app.
|
|
877
877
|
|
|
878
878
|
Returns:
|
|
879
|
-
|
|
879
|
+
List[EvaluatorConfigDB]: A list of evaluator configuration objects.
|
|
880
880
|
|
|
881
881
|
Parameters
|
|
882
882
|
----------
|
|
@@ -955,10 +955,10 @@ class AsyncEvaluatorsClient:
|
|
|
955
955
|
Endpoint to fetch evaluator configurations for a specific app.
|
|
956
956
|
|
|
957
957
|
Args:
|
|
958
|
-
|
|
958
|
+
app_id (str): The ID of the app.
|
|
959
959
|
|
|
960
960
|
Returns:
|
|
961
|
-
|
|
961
|
+
EvaluatorConfigDB: Evaluator configuration api model.
|
|
962
962
|
|
|
963
963
|
Parameters
|
|
964
964
|
----------
|
|
@@ -1050,7 +1050,7 @@ class AsyncEvaluatorsClient:
|
|
|
1050
1050
|
Endpoint to fetch evaluator configurations for a specific app.
|
|
1051
1051
|
|
|
1052
1052
|
Returns:
|
|
1053
|
-
|
|
1053
|
+
List[EvaluatorConfigDB]: A list of evaluator configuration objects.
|
|
1054
1054
|
|
|
1055
1055
|
Parameters
|
|
1056
1056
|
----------
|
|
@@ -1128,7 +1128,7 @@ class AsyncEvaluatorsClient:
|
|
|
1128
1128
|
Endpoint to update evaluator configurations for a specific app.
|
|
1129
1129
|
|
|
1130
1130
|
Returns:
|
|
1131
|
-
|
|
1131
|
+
List[EvaluatorConfigDB]: A list of evaluator configuration objects.
|
|
1132
1132
|
|
|
1133
1133
|
Parameters
|
|
1134
1134
|
----------
|
|
@@ -1216,10 +1216,10 @@ class AsyncEvaluatorsClient:
|
|
|
1216
1216
|
Endpoint to delete a specific evaluator configuration.
|
|
1217
1217
|
|
|
1218
1218
|
Args:
|
|
1219
|
-
|
|
1219
|
+
evaluator_config_id (str): The unique identifier of the evaluator configuration.
|
|
1220
1220
|
|
|
1221
1221
|
Returns:
|
|
1222
|
-
|
|
1222
|
+
bool: True if deletion was successful, False otherwise.
|
|
1223
1223
|
|
|
1224
1224
|
Parameters
|
|
1225
1225
|
----------
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|