agenta 0.13.0__py3-none-any.whl → 0.13.0a0__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/__init__.py +0 -1
- agenta/client/backend/client.py +50 -169
- agenta/client/backend/core/api_error.py +1 -3
- agenta/client/backend/core/datetime_utils.py +1 -3
- agenta/client/backend/core/jsonable_encoder.py +3 -9
- agenta/client/backend/resources/__init__.py +1 -12
- agenta/client/backend/resources/apps/__init__.py +1 -0
- agenta/client/backend/resources/apps/client.py +26 -88
- agenta/client/backend/resources/bases/__init__.py +1 -0
- agenta/client/backend/resources/bases/client.py +2 -8
- agenta/client/backend/resources/configs/__init__.py +1 -0
- agenta/client/backend/resources/configs/client.py +14 -58
- agenta/client/backend/resources/containers/client.py +14 -46
- agenta/client/backend/resources/environments/__init__.py +1 -0
- agenta/client/backend/resources/environments/client.py +6 -18
- agenta/client/backend/resources/evaluations/__init__.py +1 -0
- agenta/client/backend/resources/evaluations/client.py +26 -86
- agenta/client/backend/resources/evaluators/__init__.py +1 -0
- agenta/client/backend/resources/evaluators/client.py +17 -57
- agenta/client/backend/resources/observability/__init__.py +1 -0
- agenta/client/backend/resources/observability/client.py +30 -100
- agenta/client/backend/resources/testsets/__init__.py +1 -0
- agenta/client/backend/resources/testsets/client.py +16 -56
- agenta/client/backend/resources/variants/client.py +26 -92
- agenta/client/backend/resources/variants/types/__init__.py +1 -3
- agenta/client/backend/types/aggregated_result.py +2 -10
- agenta/client/backend/types/aggregated_result_evaluator_config.py +1 -3
- agenta/client/backend/types/app.py +2 -10
- agenta/client/backend/types/app_variant_response.py +2 -10
- agenta/client/backend/types/app_variant_revision.py +2 -10
- agenta/client/backend/types/base_output.py +2 -10
- agenta/client/backend/types/body_import_testset.py +2 -10
- agenta/client/backend/types/config_db.py +2 -10
- agenta/client/backend/types/create_app_output.py +2 -10
- agenta/client/backend/types/create_span.py +2 -11
- agenta/client/backend/types/create_trace_response.py +2 -10
- agenta/client/backend/types/docker_env_vars.py +2 -10
- agenta/client/backend/types/environment_output.py +2 -10
- agenta/client/backend/types/environment_output_extended.py +2 -10
- agenta/client/backend/types/environment_revision.py +2 -10
- agenta/client/backend/types/error.py +2 -10
- agenta/client/backend/types/evaluation.py +2 -10
- agenta/client/backend/types/evaluation_scenario.py +2 -10
- agenta/client/backend/types/evaluation_scenario_input.py +2 -10
- agenta/client/backend/types/evaluation_scenario_output.py +2 -10
- agenta/client/backend/types/evaluation_scenario_result.py +2 -10
- agenta/client/backend/types/evaluation_scenario_score_update.py +2 -10
- agenta/client/backend/types/evaluation_type.py +1 -3
- agenta/client/backend/types/evaluation_webhook.py +2 -10
- agenta/client/backend/types/evaluator.py +2 -10
- agenta/client/backend/types/evaluator_config.py +2 -10
- agenta/client/backend/types/feedback.py +2 -10
- agenta/client/backend/types/get_config_response.py +3 -10
- agenta/client/backend/types/http_validation_error.py +2 -10
- agenta/client/backend/types/human_evaluation.py +2 -10
- agenta/client/backend/types/human_evaluation_scenario.py +2 -10
- agenta/client/backend/types/human_evaluation_scenario_input.py +2 -10
- agenta/client/backend/types/human_evaluation_scenario_output.py +2 -10
- agenta/client/backend/types/human_evaluation_scenario_update.py +2 -10
- agenta/client/backend/types/human_evaluation_update.py +2 -10
- agenta/client/backend/types/image.py +2 -10
- agenta/client/backend/types/invite_request.py +2 -10
- agenta/client/backend/types/list_api_keys_response.py +2 -10
- agenta/client/backend/types/llm_run_rate_limit.py +2 -10
- agenta/client/backend/types/llm_tokens.py +2 -10
- agenta/client/backend/types/new_human_evaluation.py +2 -10
- agenta/client/backend/types/new_testset.py +2 -10
- agenta/client/backend/types/organization.py +2 -10
- agenta/client/backend/types/organization_output.py +2 -10
- agenta/client/backend/types/result.py +2 -10
- agenta/client/backend/types/simple_evaluation_output.py +2 -10
- agenta/client/backend/types/span.py +2 -10
- agenta/client/backend/types/span_detail.py +2 -10
- agenta/client/backend/types/span_variant.py +2 -10
- agenta/client/backend/types/template.py +2 -10
- agenta/client/backend/types/template_image_info.py +2 -10
- agenta/client/backend/types/test_set_output_response.py +2 -10
- agenta/client/backend/types/test_set_simple_response.py +2 -10
- agenta/client/backend/types/trace_detail.py +2 -10
- agenta/client/backend/types/uri.py +2 -10
- agenta/client/backend/types/validation_error.py +2 -10
- agenta/client/backend/types/variant_action.py +2 -10
- agenta/client/backend/types/variant_action_enum.py +1 -3
- agenta/client/backend/types/with_pagination.py +2 -10
- agenta/client/backend/types/workspace_member_response.py +2 -10
- agenta/client/backend/types/workspace_permission.py +2 -10
- agenta/client/backend/types/workspace_response.py +2 -10
- agenta/client/backend/types/workspace_role_response.py +2 -10
- agenta/sdk/__init__.py +0 -1
- agenta/sdk/agenta_decorator.py +3 -11
- agenta/sdk/agenta_init.py +1 -3
- agenta/sdk/tracing/llm_tracing.py +18 -35
- agenta/sdk/types.py +0 -38
- {agenta-0.13.0.dist-info → agenta-0.13.0a0.dist-info}/METADATA +96 -46
- agenta-0.13.0a0.dist-info/RECORD +161 -0
- agenta-0.13.0.dist-info/RECORD +0 -161
- {agenta-0.13.0.dist-info → agenta-0.13.0a0.dist-info}/WHEEL +0 -0
- {agenta-0.13.0.dist-info → agenta-0.13.0a0.dist-info}/entry_points.txt +0 -0
|
@@ -69,15 +69,9 @@ class EvaluationsClient:
|
|
|
69
69
|
"""
|
|
70
70
|
_response = self._client_wrapper.httpx_client.request(
|
|
71
71
|
"GET",
|
|
72
|
-
urllib.parse.urljoin(
|
|
73
|
-
f"{self._client_wrapper.get_base_url()}/", "evaluations/by_resource"
|
|
74
|
-
),
|
|
72
|
+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "evaluations/by_resource"),
|
|
75
73
|
params=remove_none_from_dict(
|
|
76
|
-
{
|
|
77
|
-
"app_id": app_id,
|
|
78
|
-
"resource_type": resource_type,
|
|
79
|
-
"resource_ids": resource_ids,
|
|
80
|
-
}
|
|
74
|
+
{"app_id": app_id, "resource_type": resource_type, "resource_ids": resource_ids}
|
|
81
75
|
),
|
|
82
76
|
headers=self._client_wrapper.get_headers(),
|
|
83
77
|
timeout=60,
|
|
@@ -117,9 +111,7 @@ class EvaluationsClient:
|
|
|
117
111
|
"""
|
|
118
112
|
_response = self._client_wrapper.httpx_client.request(
|
|
119
113
|
"GET",
|
|
120
|
-
urllib.parse.urljoin(
|
|
121
|
-
f"{self._client_wrapper.get_base_url()}/", "evaluations"
|
|
122
|
-
),
|
|
114
|
+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "evaluations"),
|
|
123
115
|
params=remove_none_from_dict({"app_id": app_id}),
|
|
124
116
|
headers=self._client_wrapper.get_headers(),
|
|
125
117
|
timeout=60,
|
|
@@ -200,9 +192,7 @@ class EvaluationsClient:
|
|
|
200
192
|
_request["correct_answer_column"] = correct_answer_column
|
|
201
193
|
_response = self._client_wrapper.httpx_client.request(
|
|
202
194
|
"POST",
|
|
203
|
-
urllib.parse.urljoin(
|
|
204
|
-
f"{self._client_wrapper.get_base_url()}/", "evaluations"
|
|
205
|
-
),
|
|
195
|
+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "evaluations"),
|
|
206
196
|
json=jsonable_encoder(_request),
|
|
207
197
|
headers=self._client_wrapper.get_headers(),
|
|
208
198
|
timeout=60,
|
|
@@ -217,9 +207,7 @@ class EvaluationsClient:
|
|
|
217
207
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
218
208
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
219
209
|
|
|
220
|
-
def delete_evaluations(
|
|
221
|
-
self, *, evaluations_ids: typing.List[str]
|
|
222
|
-
) -> typing.List[str]:
|
|
210
|
+
def delete_evaluations(self, *, evaluations_ids: typing.List[str]) -> typing.List[str]:
|
|
223
211
|
"""
|
|
224
212
|
Delete specific comparison tables based on their unique IDs.
|
|
225
213
|
|
|
@@ -244,9 +232,7 @@ class EvaluationsClient:
|
|
|
244
232
|
"""
|
|
245
233
|
_response = self._client_wrapper.httpx_client.request(
|
|
246
234
|
"DELETE",
|
|
247
|
-
urllib.parse.urljoin(
|
|
248
|
-
f"{self._client_wrapper.get_base_url()}/", "evaluations"
|
|
249
|
-
),
|
|
235
|
+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "evaluations"),
|
|
250
236
|
json=jsonable_encoder({"evaluations_ids": evaluations_ids}),
|
|
251
237
|
headers=self._client_wrapper.get_headers(),
|
|
252
238
|
timeout=60,
|
|
@@ -287,10 +273,7 @@ class EvaluationsClient:
|
|
|
287
273
|
"""
|
|
288
274
|
_response = self._client_wrapper.httpx_client.request(
|
|
289
275
|
"GET",
|
|
290
|
-
urllib.parse.urljoin(
|
|
291
|
-
f"{self._client_wrapper.get_base_url()}/",
|
|
292
|
-
f"evaluations/{evaluation_id}/status",
|
|
293
|
-
),
|
|
276
|
+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"evaluations/{evaluation_id}/status"),
|
|
294
277
|
headers=self._client_wrapper.get_headers(),
|
|
295
278
|
timeout=60,
|
|
296
279
|
)
|
|
@@ -330,10 +313,7 @@ class EvaluationsClient:
|
|
|
330
313
|
"""
|
|
331
314
|
_response = self._client_wrapper.httpx_client.request(
|
|
332
315
|
"GET",
|
|
333
|
-
urllib.parse.urljoin(
|
|
334
|
-
f"{self._client_wrapper.get_base_url()}/",
|
|
335
|
-
f"evaluations/{evaluation_id}/results",
|
|
336
|
-
),
|
|
316
|
+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"evaluations/{evaluation_id}/results"),
|
|
337
317
|
headers=self._client_wrapper.get_headers(),
|
|
338
318
|
timeout=60,
|
|
339
319
|
)
|
|
@@ -347,9 +327,7 @@ class EvaluationsClient:
|
|
|
347
327
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
348
328
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
349
329
|
|
|
350
|
-
def fetch_evaluation_scenarios(
|
|
351
|
-
self, evaluation_id: str
|
|
352
|
-
) -> typing.List[EvaluationScenario]:
|
|
330
|
+
def fetch_evaluation_scenarios(self, evaluation_id: str) -> typing.List[EvaluationScenario]:
|
|
353
331
|
"""
|
|
354
332
|
Fetches evaluation scenarios for a given evaluation ID.
|
|
355
333
|
|
|
@@ -378,8 +356,7 @@ class EvaluationsClient:
|
|
|
378
356
|
_response = self._client_wrapper.httpx_client.request(
|
|
379
357
|
"GET",
|
|
380
358
|
urllib.parse.urljoin(
|
|
381
|
-
f"{self._client_wrapper.get_base_url()}/",
|
|
382
|
-
f"evaluations/{evaluation_id}/evaluation_scenarios",
|
|
359
|
+
f"{self._client_wrapper.get_base_url()}/", f"evaluations/{evaluation_id}/evaluation_scenarios"
|
|
383
360
|
),
|
|
384
361
|
headers=self._client_wrapper.get_headers(),
|
|
385
362
|
timeout=60,
|
|
@@ -419,10 +396,7 @@ class EvaluationsClient:
|
|
|
419
396
|
"""
|
|
420
397
|
_response = self._client_wrapper.httpx_client.request(
|
|
421
398
|
"GET",
|
|
422
|
-
urllib.parse.urljoin(
|
|
423
|
-
f"{self._client_wrapper.get_base_url()}/",
|
|
424
|
-
f"evaluations/{evaluation_id}",
|
|
425
|
-
),
|
|
399
|
+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"evaluations/{evaluation_id}"),
|
|
426
400
|
headers=self._client_wrapper.get_headers(),
|
|
427
401
|
timeout=60,
|
|
428
402
|
)
|
|
@@ -454,10 +428,7 @@ class EvaluationsClient:
|
|
|
454
428
|
"""
|
|
455
429
|
_response = self._client_wrapper.httpx_client.request(
|
|
456
430
|
"POST",
|
|
457
|
-
urllib.parse.urljoin(
|
|
458
|
-
f"{self._client_wrapper.get_base_url()}/",
|
|
459
|
-
"evaluations/webhook_example_fake",
|
|
460
|
-
),
|
|
431
|
+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "evaluations/webhook_example_fake"),
|
|
461
432
|
headers=self._client_wrapper.get_headers(),
|
|
462
433
|
timeout=60,
|
|
463
434
|
)
|
|
@@ -498,8 +469,7 @@ class EvaluationsClient:
|
|
|
498
469
|
_response = self._client_wrapper.httpx_client.request(
|
|
499
470
|
"GET",
|
|
500
471
|
urllib.parse.urljoin(
|
|
501
|
-
f"{self._client_wrapper.get_base_url()}/",
|
|
502
|
-
"evaluations/evaluation_scenarios/comparison-results",
|
|
472
|
+
f"{self._client_wrapper.get_base_url()}/", "evaluations/evaluation_scenarios/comparison-results"
|
|
503
473
|
),
|
|
504
474
|
params=remove_none_from_dict({"evaluations_ids": evaluations_ids}),
|
|
505
475
|
headers=self._client_wrapper.get_headers(),
|
|
@@ -561,15 +531,9 @@ class AsyncEvaluationsClient:
|
|
|
561
531
|
"""
|
|
562
532
|
_response = await self._client_wrapper.httpx_client.request(
|
|
563
533
|
"GET",
|
|
564
|
-
urllib.parse.urljoin(
|
|
565
|
-
f"{self._client_wrapper.get_base_url()}/", "evaluations/by_resource"
|
|
566
|
-
),
|
|
534
|
+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "evaluations/by_resource"),
|
|
567
535
|
params=remove_none_from_dict(
|
|
568
|
-
{
|
|
569
|
-
"app_id": app_id,
|
|
570
|
-
"resource_type": resource_type,
|
|
571
|
-
"resource_ids": resource_ids,
|
|
572
|
-
}
|
|
536
|
+
{"app_id": app_id, "resource_type": resource_type, "resource_ids": resource_ids}
|
|
573
537
|
),
|
|
574
538
|
headers=self._client_wrapper.get_headers(),
|
|
575
539
|
timeout=60,
|
|
@@ -609,9 +573,7 @@ class AsyncEvaluationsClient:
|
|
|
609
573
|
"""
|
|
610
574
|
_response = await self._client_wrapper.httpx_client.request(
|
|
611
575
|
"GET",
|
|
612
|
-
urllib.parse.urljoin(
|
|
613
|
-
f"{self._client_wrapper.get_base_url()}/", "evaluations"
|
|
614
|
-
),
|
|
576
|
+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "evaluations"),
|
|
615
577
|
params=remove_none_from_dict({"app_id": app_id}),
|
|
616
578
|
headers=self._client_wrapper.get_headers(),
|
|
617
579
|
timeout=60,
|
|
@@ -692,9 +654,7 @@ class AsyncEvaluationsClient:
|
|
|
692
654
|
_request["correct_answer_column"] = correct_answer_column
|
|
693
655
|
_response = await self._client_wrapper.httpx_client.request(
|
|
694
656
|
"POST",
|
|
695
|
-
urllib.parse.urljoin(
|
|
696
|
-
f"{self._client_wrapper.get_base_url()}/", "evaluations"
|
|
697
|
-
),
|
|
657
|
+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "evaluations"),
|
|
698
658
|
json=jsonable_encoder(_request),
|
|
699
659
|
headers=self._client_wrapper.get_headers(),
|
|
700
660
|
timeout=60,
|
|
@@ -709,9 +669,7 @@ class AsyncEvaluationsClient:
|
|
|
709
669
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
710
670
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
711
671
|
|
|
712
|
-
async def delete_evaluations(
|
|
713
|
-
self, *, evaluations_ids: typing.List[str]
|
|
714
|
-
) -> typing.List[str]:
|
|
672
|
+
async def delete_evaluations(self, *, evaluations_ids: typing.List[str]) -> typing.List[str]:
|
|
715
673
|
"""
|
|
716
674
|
Delete specific comparison tables based on their unique IDs.
|
|
717
675
|
|
|
@@ -736,9 +694,7 @@ class AsyncEvaluationsClient:
|
|
|
736
694
|
"""
|
|
737
695
|
_response = await self._client_wrapper.httpx_client.request(
|
|
738
696
|
"DELETE",
|
|
739
|
-
urllib.parse.urljoin(
|
|
740
|
-
f"{self._client_wrapper.get_base_url()}/", "evaluations"
|
|
741
|
-
),
|
|
697
|
+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "evaluations"),
|
|
742
698
|
json=jsonable_encoder({"evaluations_ids": evaluations_ids}),
|
|
743
699
|
headers=self._client_wrapper.get_headers(),
|
|
744
700
|
timeout=60,
|
|
@@ -779,10 +735,7 @@ class AsyncEvaluationsClient:
|
|
|
779
735
|
"""
|
|
780
736
|
_response = await self._client_wrapper.httpx_client.request(
|
|
781
737
|
"GET",
|
|
782
|
-
urllib.parse.urljoin(
|
|
783
|
-
f"{self._client_wrapper.get_base_url()}/",
|
|
784
|
-
f"evaluations/{evaluation_id}/status",
|
|
785
|
-
),
|
|
738
|
+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"evaluations/{evaluation_id}/status"),
|
|
786
739
|
headers=self._client_wrapper.get_headers(),
|
|
787
740
|
timeout=60,
|
|
788
741
|
)
|
|
@@ -822,10 +775,7 @@ class AsyncEvaluationsClient:
|
|
|
822
775
|
"""
|
|
823
776
|
_response = await self._client_wrapper.httpx_client.request(
|
|
824
777
|
"GET",
|
|
825
|
-
urllib.parse.urljoin(
|
|
826
|
-
f"{self._client_wrapper.get_base_url()}/",
|
|
827
|
-
f"evaluations/{evaluation_id}/results",
|
|
828
|
-
),
|
|
778
|
+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"evaluations/{evaluation_id}/results"),
|
|
829
779
|
headers=self._client_wrapper.get_headers(),
|
|
830
780
|
timeout=60,
|
|
831
781
|
)
|
|
@@ -839,9 +789,7 @@ class AsyncEvaluationsClient:
|
|
|
839
789
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
840
790
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
841
791
|
|
|
842
|
-
async def fetch_evaluation_scenarios(
|
|
843
|
-
self, evaluation_id: str
|
|
844
|
-
) -> typing.List[EvaluationScenario]:
|
|
792
|
+
async def fetch_evaluation_scenarios(self, evaluation_id: str) -> typing.List[EvaluationScenario]:
|
|
845
793
|
"""
|
|
846
794
|
Fetches evaluation scenarios for a given evaluation ID.
|
|
847
795
|
|
|
@@ -870,8 +818,7 @@ class AsyncEvaluationsClient:
|
|
|
870
818
|
_response = await self._client_wrapper.httpx_client.request(
|
|
871
819
|
"GET",
|
|
872
820
|
urllib.parse.urljoin(
|
|
873
|
-
f"{self._client_wrapper.get_base_url()}/",
|
|
874
|
-
f"evaluations/{evaluation_id}/evaluation_scenarios",
|
|
821
|
+
f"{self._client_wrapper.get_base_url()}/", f"evaluations/{evaluation_id}/evaluation_scenarios"
|
|
875
822
|
),
|
|
876
823
|
headers=self._client_wrapper.get_headers(),
|
|
877
824
|
timeout=60,
|
|
@@ -911,10 +858,7 @@ class AsyncEvaluationsClient:
|
|
|
911
858
|
"""
|
|
912
859
|
_response = await self._client_wrapper.httpx_client.request(
|
|
913
860
|
"GET",
|
|
914
|
-
urllib.parse.urljoin(
|
|
915
|
-
f"{self._client_wrapper.get_base_url()}/",
|
|
916
|
-
f"evaluations/{evaluation_id}",
|
|
917
|
-
),
|
|
861
|
+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"evaluations/{evaluation_id}"),
|
|
918
862
|
headers=self._client_wrapper.get_headers(),
|
|
919
863
|
timeout=60,
|
|
920
864
|
)
|
|
@@ -946,10 +890,7 @@ class AsyncEvaluationsClient:
|
|
|
946
890
|
"""
|
|
947
891
|
_response = await self._client_wrapper.httpx_client.request(
|
|
948
892
|
"POST",
|
|
949
|
-
urllib.parse.urljoin(
|
|
950
|
-
f"{self._client_wrapper.get_base_url()}/",
|
|
951
|
-
"evaluations/webhook_example_fake",
|
|
952
|
-
),
|
|
893
|
+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "evaluations/webhook_example_fake"),
|
|
953
894
|
headers=self._client_wrapper.get_headers(),
|
|
954
895
|
timeout=60,
|
|
955
896
|
)
|
|
@@ -990,8 +931,7 @@ class AsyncEvaluationsClient:
|
|
|
990
931
|
_response = await self._client_wrapper.httpx_client.request(
|
|
991
932
|
"GET",
|
|
992
933
|
urllib.parse.urljoin(
|
|
993
|
-
f"{self._client_wrapper.get_base_url()}/",
|
|
994
|
-
"evaluations/evaluation_scenarios/comparison-results",
|
|
934
|
+
f"{self._client_wrapper.get_base_url()}/", "evaluations/evaluation_scenarios/comparison-results"
|
|
995
935
|
),
|
|
996
936
|
params=remove_none_from_dict({"evaluations_ids": evaluations_ids}),
|
|
997
937
|
headers=self._client_wrapper.get_headers(),
|
|
@@ -44,9 +44,7 @@ class EvaluatorsClient:
|
|
|
44
44
|
"""
|
|
45
45
|
_response = self._client_wrapper.httpx_client.request(
|
|
46
46
|
"GET",
|
|
47
|
-
urllib.parse.urljoin(
|
|
48
|
-
f"{self._client_wrapper.get_base_url()}/", "evaluators"
|
|
49
|
-
),
|
|
47
|
+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "evaluators"),
|
|
50
48
|
headers=self._client_wrapper.get_headers(),
|
|
51
49
|
timeout=60,
|
|
52
50
|
)
|
|
@@ -83,9 +81,7 @@ class EvaluatorsClient:
|
|
|
83
81
|
"""
|
|
84
82
|
_response = self._client_wrapper.httpx_client.request(
|
|
85
83
|
"GET",
|
|
86
|
-
urllib.parse.urljoin(
|
|
87
|
-
f"{self._client_wrapper.get_base_url()}/", "evaluators/configs"
|
|
88
|
-
),
|
|
84
|
+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "evaluators/configs"),
|
|
89
85
|
params=remove_none_from_dict({"app_id": app_id}),
|
|
90
86
|
headers=self._client_wrapper.get_headers(),
|
|
91
87
|
timeout=60,
|
|
@@ -101,12 +97,7 @@ class EvaluatorsClient:
|
|
|
101
97
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
102
98
|
|
|
103
99
|
def create_new_evaluator_config(
|
|
104
|
-
self,
|
|
105
|
-
*,
|
|
106
|
-
app_id: str,
|
|
107
|
-
name: str,
|
|
108
|
-
evaluator_key: str,
|
|
109
|
-
settings_values: typing.Dict[str, typing.Any],
|
|
100
|
+
self, *, app_id: str, name: str, evaluator_key: str, settings_values: typing.Dict[str, typing.Any]
|
|
110
101
|
) -> EvaluatorConfig:
|
|
111
102
|
"""
|
|
112
103
|
Endpoint to fetch evaluator configurations for a specific app.
|
|
@@ -141,16 +132,9 @@ class EvaluatorsClient:
|
|
|
141
132
|
"""
|
|
142
133
|
_response = self._client_wrapper.httpx_client.request(
|
|
143
134
|
"POST",
|
|
144
|
-
urllib.parse.urljoin(
|
|
145
|
-
f"{self._client_wrapper.get_base_url()}/", "evaluators/configs"
|
|
146
|
-
),
|
|
135
|
+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "evaluators/configs"),
|
|
147
136
|
json=jsonable_encoder(
|
|
148
|
-
{
|
|
149
|
-
"app_id": app_id,
|
|
150
|
-
"name": name,
|
|
151
|
-
"evaluator_key": evaluator_key,
|
|
152
|
-
"settings_values": settings_values,
|
|
153
|
-
}
|
|
137
|
+
{"app_id": app_id, "name": name, "evaluator_key": evaluator_key, "settings_values": settings_values}
|
|
154
138
|
),
|
|
155
139
|
headers=self._client_wrapper.get_headers(),
|
|
156
140
|
timeout=60,
|
|
@@ -188,8 +172,7 @@ class EvaluatorsClient:
|
|
|
188
172
|
_response = self._client_wrapper.httpx_client.request(
|
|
189
173
|
"GET",
|
|
190
174
|
urllib.parse.urljoin(
|
|
191
|
-
f"{self._client_wrapper.get_base_url()}/",
|
|
192
|
-
f"evaluators/configs/{evaluator_config_id}",
|
|
175
|
+
f"{self._client_wrapper.get_base_url()}/", f"evaluators/configs/{evaluator_config_id}"
|
|
193
176
|
),
|
|
194
177
|
headers=self._client_wrapper.get_headers(),
|
|
195
178
|
timeout=60,
|
|
@@ -247,8 +230,7 @@ class EvaluatorsClient:
|
|
|
247
230
|
_response = self._client_wrapper.httpx_client.request(
|
|
248
231
|
"PUT",
|
|
249
232
|
urllib.parse.urljoin(
|
|
250
|
-
f"{self._client_wrapper.get_base_url()}/",
|
|
251
|
-
f"evaluators/configs/{evaluator_config_id}",
|
|
233
|
+
f"{self._client_wrapper.get_base_url()}/", f"evaluators/configs/{evaluator_config_id}"
|
|
252
234
|
),
|
|
253
235
|
json=jsonable_encoder(_request),
|
|
254
236
|
headers=self._client_wrapper.get_headers(),
|
|
@@ -290,8 +272,7 @@ class EvaluatorsClient:
|
|
|
290
272
|
_response = self._client_wrapper.httpx_client.request(
|
|
291
273
|
"DELETE",
|
|
292
274
|
urllib.parse.urljoin(
|
|
293
|
-
f"{self._client_wrapper.get_base_url()}/",
|
|
294
|
-
f"evaluators/configs/{evaluator_config_id}",
|
|
275
|
+
f"{self._client_wrapper.get_base_url()}/", f"evaluators/configs/{evaluator_config_id}"
|
|
295
276
|
),
|
|
296
277
|
headers=self._client_wrapper.get_headers(),
|
|
297
278
|
timeout=60,
|
|
@@ -329,9 +310,7 @@ class AsyncEvaluatorsClient:
|
|
|
329
310
|
"""
|
|
330
311
|
_response = await self._client_wrapper.httpx_client.request(
|
|
331
312
|
"GET",
|
|
332
|
-
urllib.parse.urljoin(
|
|
333
|
-
f"{self._client_wrapper.get_base_url()}/", "evaluators"
|
|
334
|
-
),
|
|
313
|
+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "evaluators"),
|
|
335
314
|
headers=self._client_wrapper.get_headers(),
|
|
336
315
|
timeout=60,
|
|
337
316
|
)
|
|
@@ -343,9 +322,7 @@ class AsyncEvaluatorsClient:
|
|
|
343
322
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
344
323
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
345
324
|
|
|
346
|
-
async def get_evaluator_configs(
|
|
347
|
-
self, *, app_id: str
|
|
348
|
-
) -> typing.List[EvaluatorConfig]:
|
|
325
|
+
async def get_evaluator_configs(self, *, app_id: str) -> typing.List[EvaluatorConfig]:
|
|
349
326
|
"""
|
|
350
327
|
Endpoint to fetch evaluator configurations for a specific app.
|
|
351
328
|
|
|
@@ -370,9 +347,7 @@ class AsyncEvaluatorsClient:
|
|
|
370
347
|
"""
|
|
371
348
|
_response = await self._client_wrapper.httpx_client.request(
|
|
372
349
|
"GET",
|
|
373
|
-
urllib.parse.urljoin(
|
|
374
|
-
f"{self._client_wrapper.get_base_url()}/", "evaluators/configs"
|
|
375
|
-
),
|
|
350
|
+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "evaluators/configs"),
|
|
376
351
|
params=remove_none_from_dict({"app_id": app_id}),
|
|
377
352
|
headers=self._client_wrapper.get_headers(),
|
|
378
353
|
timeout=60,
|
|
@@ -388,12 +363,7 @@ class AsyncEvaluatorsClient:
|
|
|
388
363
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
389
364
|
|
|
390
365
|
async def create_new_evaluator_config(
|
|
391
|
-
self,
|
|
392
|
-
*,
|
|
393
|
-
app_id: str,
|
|
394
|
-
name: str,
|
|
395
|
-
evaluator_key: str,
|
|
396
|
-
settings_values: typing.Dict[str, typing.Any],
|
|
366
|
+
self, *, app_id: str, name: str, evaluator_key: str, settings_values: typing.Dict[str, typing.Any]
|
|
397
367
|
) -> EvaluatorConfig:
|
|
398
368
|
"""
|
|
399
369
|
Endpoint to fetch evaluator configurations for a specific app.
|
|
@@ -428,16 +398,9 @@ class AsyncEvaluatorsClient:
|
|
|
428
398
|
"""
|
|
429
399
|
_response = await self._client_wrapper.httpx_client.request(
|
|
430
400
|
"POST",
|
|
431
|
-
urllib.parse.urljoin(
|
|
432
|
-
f"{self._client_wrapper.get_base_url()}/", "evaluators/configs"
|
|
433
|
-
),
|
|
401
|
+
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "evaluators/configs"),
|
|
434
402
|
json=jsonable_encoder(
|
|
435
|
-
{
|
|
436
|
-
"app_id": app_id,
|
|
437
|
-
"name": name,
|
|
438
|
-
"evaluator_key": evaluator_key,
|
|
439
|
-
"settings_values": settings_values,
|
|
440
|
-
}
|
|
403
|
+
{"app_id": app_id, "name": name, "evaluator_key": evaluator_key, "settings_values": settings_values}
|
|
441
404
|
),
|
|
442
405
|
headers=self._client_wrapper.get_headers(),
|
|
443
406
|
timeout=60,
|
|
@@ -475,8 +438,7 @@ class AsyncEvaluatorsClient:
|
|
|
475
438
|
_response = await self._client_wrapper.httpx_client.request(
|
|
476
439
|
"GET",
|
|
477
440
|
urllib.parse.urljoin(
|
|
478
|
-
f"{self._client_wrapper.get_base_url()}/",
|
|
479
|
-
f"evaluators/configs/{evaluator_config_id}",
|
|
441
|
+
f"{self._client_wrapper.get_base_url()}/", f"evaluators/configs/{evaluator_config_id}"
|
|
480
442
|
),
|
|
481
443
|
headers=self._client_wrapper.get_headers(),
|
|
482
444
|
timeout=60,
|
|
@@ -534,8 +496,7 @@ class AsyncEvaluatorsClient:
|
|
|
534
496
|
_response = await self._client_wrapper.httpx_client.request(
|
|
535
497
|
"PUT",
|
|
536
498
|
urllib.parse.urljoin(
|
|
537
|
-
f"{self._client_wrapper.get_base_url()}/",
|
|
538
|
-
f"evaluators/configs/{evaluator_config_id}",
|
|
499
|
+
f"{self._client_wrapper.get_base_url()}/", f"evaluators/configs/{evaluator_config_id}"
|
|
539
500
|
),
|
|
540
501
|
json=jsonable_encoder(_request),
|
|
541
502
|
headers=self._client_wrapper.get_headers(),
|
|
@@ -577,8 +538,7 @@ class AsyncEvaluatorsClient:
|
|
|
577
538
|
_response = await self._client_wrapper.httpx_client.request(
|
|
578
539
|
"DELETE",
|
|
579
540
|
urllib.parse.urljoin(
|
|
580
|
-
f"{self._client_wrapper.get_base_url()}/",
|
|
581
|
-
f"evaluators/configs/{evaluator_config_id}",
|
|
541
|
+
f"{self._client_wrapper.get_base_url()}/", f"evaluators/configs/{evaluator_config_id}"
|
|
582
542
|
),
|
|
583
543
|
headers=self._client_wrapper.get_headers(),
|
|
584
544
|
timeout=60,
|