agenta 0.32.0a1__py3-none-any.whl → 0.33.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.
- agenta/__init__.py +2 -0
- agenta/client/backend/__init__.py +39 -31
- agenta/client/backend/admin/__init__.py +1 -0
- agenta/client/backend/admin/client.py +576 -0
- agenta/client/backend/apps/client.py +450 -68
- agenta/client/backend/bases/client.py +10 -10
- agenta/client/backend/client.py +112 -122
- agenta/client/backend/containers/client.py +70 -28
- agenta/client/backend/core/http_client.py +3 -3
- agenta/client/backend/environments/client.py +8 -8
- agenta/client/backend/evaluations/client.py +46 -52
- agenta/client/backend/evaluators/client.py +32 -32
- agenta/client/backend/human_evaluations/__init__.py +1 -0
- agenta/client/backend/human_evaluations/client.py +1692 -0
- agenta/client/backend/observability/__init__.py +4 -0
- agenta/client/backend/observability/client.py +221 -744
- agenta/client/backend/testsets/client.py +38 -202
- agenta/client/backend/types/__init__.py +34 -28
- agenta/client/backend/types/account_response.py +24 -0
- agenta/client/backend/types/app_variant_revision.py +2 -1
- agenta/client/backend/types/{create_trace_response.py → delete_evaluation.py} +2 -3
- agenta/client/backend/types/{evaluation_scenario_score_update.py → legacy_scope_request.py} +2 -2
- agenta/client/backend/types/legacy_scopes_response.py +29 -0
- agenta/client/backend/types/{human_evaluation_update.py → legacy_user_request.py} +4 -4
- agenta/client/backend/types/{span_variant.py → legacy_user_response.py} +2 -4
- agenta/client/backend/types/organization_membership_request.py +25 -0
- agenta/client/backend/types/organization_request.py +23 -0
- agenta/client/backend/types/permission.py +4 -0
- agenta/client/backend/types/{llm_tokens.py → project_membership_request.py} +8 -5
- agenta/client/backend/types/project_request.py +26 -0
- agenta/client/backend/types/project_scope.py +29 -0
- agenta/client/backend/types/provider_kind.py +1 -1
- agenta/client/backend/types/reference.py +22 -0
- agenta/client/backend/types/role.py +15 -0
- agenta/client/backend/types/scopes_response_model.py +22 -0
- agenta/client/backend/types/score.py +1 -1
- agenta/client/backend/types/secret_response_dto.py +2 -2
- agenta/client/backend/types/user_request.py +22 -0
- agenta/client/backend/types/workspace_membership_request.py +26 -0
- agenta/client/backend/types/workspace_request.py +25 -0
- agenta/client/backend/variants/client.py +208 -42
- agenta/client/backend/vault/client.py +11 -9
- agenta/sdk/__init__.py +3 -0
- agenta/sdk/agenta_init.py +3 -1
- agenta/sdk/assets.py +4 -4
- agenta/sdk/decorators/routing.py +129 -23
- 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/managers/apps.py +64 -0
- agenta/sdk/managers/shared.py +2 -2
- agenta/sdk/middleware/auth.py +156 -53
- agenta/sdk/middleware/config.py +28 -16
- agenta/sdk/middleware/inline.py +1 -1
- agenta/sdk/middleware/mock.py +1 -1
- agenta/sdk/middleware/otel.py +1 -1
- agenta/sdk/middleware/vault.py +1 -1
- 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.0.dist-info}/METADATA +23 -20
- {agenta-0.32.0a1.dist-info → agenta-0.33.0.dist-info}/RECORD +69 -63
- agenta/client/backend/observability_v_1/__init__.py +0 -5
- agenta/client/backend/observability_v_1/client.py +0 -763
- agenta/client/backend/types/create_span.py +0 -45
- agenta/client/backend/types/human_evaluation_scenario_update.py +0 -30
- agenta/client/backend/types/new_human_evaluation.py +0 -27
- agenta/client/backend/types/outputs.py +0 -5
- agenta/client/backend/types/span.py +0 -42
- agenta/client/backend/types/span_detail.py +0 -44
- agenta/client/backend/types/span_status_code.py +0 -5
- agenta/client/backend/types/trace_detail.py +0 -44
- agenta/client/backend/types/with_pagination.py +0 -26
- /agenta/client/backend/{observability_v_1 → observability}/types/__init__.py +0 -0
- /agenta/client/backend/{observability_v_1 → observability}/types/format.py +0 -0
- /agenta/client/backend/{observability_v_1 → observability}/types/query_analytics_response.py +0 -0
- /agenta/client/backend/{observability_v_1 → observability}/types/query_traces_response.py +0 -0
- {agenta-0.32.0a1.dist-info → agenta-0.33.0.dist-info}/WHEEL +0 -0
- {agenta-0.32.0a1.dist-info → agenta-0.33.0.dist-info}/entry_points.txt +0 -0
|
@@ -31,15 +31,15 @@ class TestsetsClient:
|
|
|
31
31
|
request_options: typing.Optional[RequestOptions] = None,
|
|
32
32
|
) -> TestSetSimpleResponse:
|
|
33
33
|
"""
|
|
34
|
-
Uploads a CSV or JSON file and saves its data to
|
|
34
|
+
Uploads a CSV or JSON file and saves its data to Postgres.
|
|
35
35
|
|
|
36
36
|
Args:
|
|
37
37
|
upload_type : Either a json or csv file.
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
file (UploadFile): The CSV or JSON file to upload.
|
|
39
|
+
testset_name (Optional): the name of the testset if provided.
|
|
40
40
|
|
|
41
41
|
Returns:
|
|
42
|
-
|
|
42
|
+
dict: The result of the upload process.
|
|
43
43
|
|
|
44
44
|
Parameters
|
|
45
45
|
----------
|
|
@@ -108,22 +108,25 @@ class TestsetsClient:
|
|
|
108
108
|
def import_testset(
|
|
109
109
|
self,
|
|
110
110
|
*,
|
|
111
|
+
authorization: typing.Optional[str] = None,
|
|
111
112
|
endpoint: typing.Optional[str] = OMIT,
|
|
112
113
|
testset_name: typing.Optional[str] = OMIT,
|
|
113
114
|
request_options: typing.Optional[RequestOptions] = None,
|
|
114
115
|
) -> TestSetSimpleResponse:
|
|
115
116
|
"""
|
|
116
|
-
Import JSON testset data from an endpoint and save it to
|
|
117
|
+
Import JSON testset data from an endpoint and save it to Postgres.
|
|
117
118
|
|
|
118
119
|
Args:
|
|
119
|
-
|
|
120
|
-
|
|
120
|
+
endpoint (str): An endpoint URL to import data from.
|
|
121
|
+
testset_name (str): the name of the testset if provided.
|
|
121
122
|
|
|
122
123
|
Returns:
|
|
123
|
-
|
|
124
|
+
dict: The result of the import process.
|
|
124
125
|
|
|
125
126
|
Parameters
|
|
126
127
|
----------
|
|
128
|
+
authorization : typing.Optional[str]
|
|
129
|
+
|
|
127
130
|
endpoint : typing.Optional[str]
|
|
128
131
|
|
|
129
132
|
testset_name : typing.Optional[str]
|
|
@@ -149,6 +152,9 @@ class TestsetsClient:
|
|
|
149
152
|
_response = self._client_wrapper.httpx_client.request(
|
|
150
153
|
"testsets/endpoint",
|
|
151
154
|
method="POST",
|
|
155
|
+
params={
|
|
156
|
+
"authorization": authorization,
|
|
157
|
+
},
|
|
152
158
|
json={
|
|
153
159
|
"endpoint": endpoint,
|
|
154
160
|
"testset_name": testset_name,
|
|
@@ -187,11 +193,9 @@ class TestsetsClient:
|
|
|
187
193
|
Get all testsets.
|
|
188
194
|
|
|
189
195
|
Returns:
|
|
190
|
-
|
|
191
196
|
- A list of testset objects.
|
|
192
197
|
|
|
193
198
|
Raises:
|
|
194
|
-
|
|
195
199
|
- `HTTPException` with status code 404 if no testsets are found.
|
|
196
200
|
|
|
197
201
|
Parameters
|
|
@@ -241,7 +245,7 @@ class TestsetsClient:
|
|
|
241
245
|
request_options: typing.Optional[RequestOptions] = None,
|
|
242
246
|
) -> TestSetSimpleResponse:
|
|
243
247
|
"""
|
|
244
|
-
Create a testset with given name, save the testset to
|
|
248
|
+
Create a testset with given name, save the testset to Postgres.
|
|
245
249
|
|
|
246
250
|
Args:
|
|
247
251
|
name (str): name of the test set.
|
|
@@ -386,88 +390,6 @@ class TestsetsClient:
|
|
|
386
390
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
387
391
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
388
392
|
|
|
389
|
-
def deprecating_create_testset(
|
|
390
|
-
self,
|
|
391
|
-
app_id: str,
|
|
392
|
-
*,
|
|
393
|
-
name: str,
|
|
394
|
-
csvdata: typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]],
|
|
395
|
-
request_options: typing.Optional[RequestOptions] = None,
|
|
396
|
-
) -> TestSetSimpleResponse:
|
|
397
|
-
"""
|
|
398
|
-
Create a testset with given name, save the testset to MongoDB.
|
|
399
|
-
|
|
400
|
-
Args:
|
|
401
|
-
name (str): name of the test set.
|
|
402
|
-
testset (Dict[str, str]): test set data.
|
|
403
|
-
|
|
404
|
-
Returns:
|
|
405
|
-
str: The id of the test set created.
|
|
406
|
-
|
|
407
|
-
Parameters
|
|
408
|
-
----------
|
|
409
|
-
app_id : str
|
|
410
|
-
|
|
411
|
-
name : str
|
|
412
|
-
|
|
413
|
-
csvdata : typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
414
|
-
|
|
415
|
-
request_options : typing.Optional[RequestOptions]
|
|
416
|
-
Request-specific configuration.
|
|
417
|
-
|
|
418
|
-
Returns
|
|
419
|
-
-------
|
|
420
|
-
TestSetSimpleResponse
|
|
421
|
-
Successful Response
|
|
422
|
-
|
|
423
|
-
Examples
|
|
424
|
-
--------
|
|
425
|
-
from agenta import AgentaApi
|
|
426
|
-
|
|
427
|
-
client = AgentaApi(
|
|
428
|
-
api_key="YOUR_API_KEY",
|
|
429
|
-
base_url="https://yourhost.com/path/to/api",
|
|
430
|
-
)
|
|
431
|
-
client.testsets.deprecating_create_testset(
|
|
432
|
-
app_id="app_id",
|
|
433
|
-
name="name",
|
|
434
|
-
csvdata=[{"key": "value"}],
|
|
435
|
-
)
|
|
436
|
-
"""
|
|
437
|
-
_response = self._client_wrapper.httpx_client.request(
|
|
438
|
-
f"testsets/{jsonable_encoder(app_id)}",
|
|
439
|
-
method="POST",
|
|
440
|
-
json={
|
|
441
|
-
"name": name,
|
|
442
|
-
"csvdata": csvdata,
|
|
443
|
-
},
|
|
444
|
-
request_options=request_options,
|
|
445
|
-
omit=OMIT,
|
|
446
|
-
)
|
|
447
|
-
try:
|
|
448
|
-
if 200 <= _response.status_code < 300:
|
|
449
|
-
return typing.cast(
|
|
450
|
-
TestSetSimpleResponse,
|
|
451
|
-
parse_obj_as(
|
|
452
|
-
type_=TestSetSimpleResponse, # type: ignore
|
|
453
|
-
object_=_response.json(),
|
|
454
|
-
),
|
|
455
|
-
)
|
|
456
|
-
if _response.status_code == 422:
|
|
457
|
-
raise UnprocessableEntityError(
|
|
458
|
-
typing.cast(
|
|
459
|
-
HttpValidationError,
|
|
460
|
-
parse_obj_as(
|
|
461
|
-
type_=HttpValidationError, # type: ignore
|
|
462
|
-
object_=_response.json(),
|
|
463
|
-
),
|
|
464
|
-
)
|
|
465
|
-
)
|
|
466
|
-
_response_json = _response.json()
|
|
467
|
-
except JSONDecodeError:
|
|
468
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
469
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
470
|
-
|
|
471
393
|
def get_single_testset(
|
|
472
394
|
self,
|
|
473
395
|
testset_id: str,
|
|
@@ -475,13 +397,13 @@ class TestsetsClient:
|
|
|
475
397
|
request_options: typing.Optional[RequestOptions] = None,
|
|
476
398
|
) -> typing.Optional[typing.Any]:
|
|
477
399
|
"""
|
|
478
|
-
Fetch a specific testset in
|
|
400
|
+
Fetch a specific testset in Postgres.
|
|
479
401
|
|
|
480
402
|
Args:
|
|
481
|
-
|
|
403
|
+
testset_id (str): The id of the testset to fetch.
|
|
482
404
|
|
|
483
405
|
Returns:
|
|
484
|
-
|
|
406
|
+
The requested testset if found, else an HTTPException.
|
|
485
407
|
|
|
486
408
|
Parameters
|
|
487
409
|
----------
|
|
@@ -545,7 +467,7 @@ class TestsetsClient:
|
|
|
545
467
|
request_options: typing.Optional[RequestOptions] = None,
|
|
546
468
|
) -> typing.Optional[typing.Any]:
|
|
547
469
|
"""
|
|
548
|
-
Update a testset with given id, update the testset in
|
|
470
|
+
Update a testset with given id, update the testset in Postgres.
|
|
549
471
|
|
|
550
472
|
Args:
|
|
551
473
|
testset_id (str): id of the test set to be updated.
|
|
@@ -632,15 +554,15 @@ class AsyncTestsetsClient:
|
|
|
632
554
|
request_options: typing.Optional[RequestOptions] = None,
|
|
633
555
|
) -> TestSetSimpleResponse:
|
|
634
556
|
"""
|
|
635
|
-
Uploads a CSV or JSON file and saves its data to
|
|
557
|
+
Uploads a CSV or JSON file and saves its data to Postgres.
|
|
636
558
|
|
|
637
559
|
Args:
|
|
638
560
|
upload_type : Either a json or csv file.
|
|
639
|
-
|
|
640
|
-
|
|
561
|
+
file (UploadFile): The CSV or JSON file to upload.
|
|
562
|
+
testset_name (Optional): the name of the testset if provided.
|
|
641
563
|
|
|
642
564
|
Returns:
|
|
643
|
-
|
|
565
|
+
dict: The result of the upload process.
|
|
644
566
|
|
|
645
567
|
Parameters
|
|
646
568
|
----------
|
|
@@ -717,22 +639,25 @@ class AsyncTestsetsClient:
|
|
|
717
639
|
async def import_testset(
|
|
718
640
|
self,
|
|
719
641
|
*,
|
|
642
|
+
authorization: typing.Optional[str] = None,
|
|
720
643
|
endpoint: typing.Optional[str] = OMIT,
|
|
721
644
|
testset_name: typing.Optional[str] = OMIT,
|
|
722
645
|
request_options: typing.Optional[RequestOptions] = None,
|
|
723
646
|
) -> TestSetSimpleResponse:
|
|
724
647
|
"""
|
|
725
|
-
Import JSON testset data from an endpoint and save it to
|
|
648
|
+
Import JSON testset data from an endpoint and save it to Postgres.
|
|
726
649
|
|
|
727
650
|
Args:
|
|
728
|
-
|
|
729
|
-
|
|
651
|
+
endpoint (str): An endpoint URL to import data from.
|
|
652
|
+
testset_name (str): the name of the testset if provided.
|
|
730
653
|
|
|
731
654
|
Returns:
|
|
732
|
-
|
|
655
|
+
dict: The result of the import process.
|
|
733
656
|
|
|
734
657
|
Parameters
|
|
735
658
|
----------
|
|
659
|
+
authorization : typing.Optional[str]
|
|
660
|
+
|
|
736
661
|
endpoint : typing.Optional[str]
|
|
737
662
|
|
|
738
663
|
testset_name : typing.Optional[str]
|
|
@@ -766,6 +691,9 @@ class AsyncTestsetsClient:
|
|
|
766
691
|
_response = await self._client_wrapper.httpx_client.request(
|
|
767
692
|
"testsets/endpoint",
|
|
768
693
|
method="POST",
|
|
694
|
+
params={
|
|
695
|
+
"authorization": authorization,
|
|
696
|
+
},
|
|
769
697
|
json={
|
|
770
698
|
"endpoint": endpoint,
|
|
771
699
|
"testset_name": testset_name,
|
|
@@ -804,11 +732,9 @@ class AsyncTestsetsClient:
|
|
|
804
732
|
Get all testsets.
|
|
805
733
|
|
|
806
734
|
Returns:
|
|
807
|
-
|
|
808
735
|
- A list of testset objects.
|
|
809
736
|
|
|
810
737
|
Raises:
|
|
811
|
-
|
|
812
738
|
- `HTTPException` with status code 404 if no testsets are found.
|
|
813
739
|
|
|
814
740
|
Parameters
|
|
@@ -866,7 +792,7 @@ class AsyncTestsetsClient:
|
|
|
866
792
|
request_options: typing.Optional[RequestOptions] = None,
|
|
867
793
|
) -> TestSetSimpleResponse:
|
|
868
794
|
"""
|
|
869
|
-
Create a testset with given name, save the testset to
|
|
795
|
+
Create a testset with given name, save the testset to Postgres.
|
|
870
796
|
|
|
871
797
|
Args:
|
|
872
798
|
name (str): name of the test set.
|
|
@@ -1027,96 +953,6 @@ class AsyncTestsetsClient:
|
|
|
1027
953
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
1028
954
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
1029
955
|
|
|
1030
|
-
async def deprecating_create_testset(
|
|
1031
|
-
self,
|
|
1032
|
-
app_id: str,
|
|
1033
|
-
*,
|
|
1034
|
-
name: str,
|
|
1035
|
-
csvdata: typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]],
|
|
1036
|
-
request_options: typing.Optional[RequestOptions] = None,
|
|
1037
|
-
) -> TestSetSimpleResponse:
|
|
1038
|
-
"""
|
|
1039
|
-
Create a testset with given name, save the testset to MongoDB.
|
|
1040
|
-
|
|
1041
|
-
Args:
|
|
1042
|
-
name (str): name of the test set.
|
|
1043
|
-
testset (Dict[str, str]): test set data.
|
|
1044
|
-
|
|
1045
|
-
Returns:
|
|
1046
|
-
str: The id of the test set created.
|
|
1047
|
-
|
|
1048
|
-
Parameters
|
|
1049
|
-
----------
|
|
1050
|
-
app_id : str
|
|
1051
|
-
|
|
1052
|
-
name : str
|
|
1053
|
-
|
|
1054
|
-
csvdata : typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
1055
|
-
|
|
1056
|
-
request_options : typing.Optional[RequestOptions]
|
|
1057
|
-
Request-specific configuration.
|
|
1058
|
-
|
|
1059
|
-
Returns
|
|
1060
|
-
-------
|
|
1061
|
-
TestSetSimpleResponse
|
|
1062
|
-
Successful Response
|
|
1063
|
-
|
|
1064
|
-
Examples
|
|
1065
|
-
--------
|
|
1066
|
-
import asyncio
|
|
1067
|
-
|
|
1068
|
-
from agenta import AsyncAgentaApi
|
|
1069
|
-
|
|
1070
|
-
client = AsyncAgentaApi(
|
|
1071
|
-
api_key="YOUR_API_KEY",
|
|
1072
|
-
base_url="https://yourhost.com/path/to/api",
|
|
1073
|
-
)
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
async def main() -> None:
|
|
1077
|
-
await client.testsets.deprecating_create_testset(
|
|
1078
|
-
app_id="app_id",
|
|
1079
|
-
name="name",
|
|
1080
|
-
csvdata=[{"key": "value"}],
|
|
1081
|
-
)
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
asyncio.run(main())
|
|
1085
|
-
"""
|
|
1086
|
-
_response = await self._client_wrapper.httpx_client.request(
|
|
1087
|
-
f"testsets/{jsonable_encoder(app_id)}",
|
|
1088
|
-
method="POST",
|
|
1089
|
-
json={
|
|
1090
|
-
"name": name,
|
|
1091
|
-
"csvdata": csvdata,
|
|
1092
|
-
},
|
|
1093
|
-
request_options=request_options,
|
|
1094
|
-
omit=OMIT,
|
|
1095
|
-
)
|
|
1096
|
-
try:
|
|
1097
|
-
if 200 <= _response.status_code < 300:
|
|
1098
|
-
return typing.cast(
|
|
1099
|
-
TestSetSimpleResponse,
|
|
1100
|
-
parse_obj_as(
|
|
1101
|
-
type_=TestSetSimpleResponse, # type: ignore
|
|
1102
|
-
object_=_response.json(),
|
|
1103
|
-
),
|
|
1104
|
-
)
|
|
1105
|
-
if _response.status_code == 422:
|
|
1106
|
-
raise UnprocessableEntityError(
|
|
1107
|
-
typing.cast(
|
|
1108
|
-
HttpValidationError,
|
|
1109
|
-
parse_obj_as(
|
|
1110
|
-
type_=HttpValidationError, # type: ignore
|
|
1111
|
-
object_=_response.json(),
|
|
1112
|
-
),
|
|
1113
|
-
)
|
|
1114
|
-
)
|
|
1115
|
-
_response_json = _response.json()
|
|
1116
|
-
except JSONDecodeError:
|
|
1117
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
1118
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
1119
|
-
|
|
1120
956
|
async def get_single_testset(
|
|
1121
957
|
self,
|
|
1122
958
|
testset_id: str,
|
|
@@ -1124,13 +960,13 @@ class AsyncTestsetsClient:
|
|
|
1124
960
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1125
961
|
) -> typing.Optional[typing.Any]:
|
|
1126
962
|
"""
|
|
1127
|
-
Fetch a specific testset in
|
|
963
|
+
Fetch a specific testset in Postgres.
|
|
1128
964
|
|
|
1129
965
|
Args:
|
|
1130
|
-
|
|
966
|
+
testset_id (str): The id of the testset to fetch.
|
|
1131
967
|
|
|
1132
968
|
Returns:
|
|
1133
|
-
|
|
969
|
+
The requested testset if found, else an HTTPException.
|
|
1134
970
|
|
|
1135
971
|
Parameters
|
|
1136
972
|
----------
|
|
@@ -1202,7 +1038,7 @@ class AsyncTestsetsClient:
|
|
|
1202
1038
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1203
1039
|
) -> typing.Optional[typing.Any]:
|
|
1204
1040
|
"""
|
|
1205
|
-
Update a testset with given id, update the testset in
|
|
1041
|
+
Update a testset with given id, update the testset in Postgres.
|
|
1206
1042
|
|
|
1207
1043
|
Args:
|
|
1208
1044
|
testset_id (str): id of the test set to be updated.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
+
from .account_response import AccountResponse
|
|
3
4
|
from .agenta_node_dto import AgentaNodeDto
|
|
4
5
|
from .agenta_node_dto_nodes_value import AgentaNodeDtoNodesValue
|
|
5
6
|
from .agenta_nodes_response import AgentaNodesResponse
|
|
@@ -22,8 +23,7 @@ from .config_dto import ConfigDto
|
|
|
22
23
|
from .config_response_model import ConfigResponseModel
|
|
23
24
|
from .correct_answer import CorrectAnswer
|
|
24
25
|
from .create_app_output import CreateAppOutput
|
|
25
|
-
from .
|
|
26
|
-
from .create_trace_response import CreateTraceResponse
|
|
26
|
+
from .delete_evaluation import DeleteEvaluation
|
|
27
27
|
from .docker_env_vars import DockerEnvVars
|
|
28
28
|
from .environment_output import EnvironmentOutput
|
|
29
29
|
from .environment_output_extended import EnvironmentOutputExtended
|
|
@@ -34,7 +34,6 @@ from .evaluation_scenario import EvaluationScenario
|
|
|
34
34
|
from .evaluation_scenario_input import EvaluationScenarioInput
|
|
35
35
|
from .evaluation_scenario_output import EvaluationScenarioOutput
|
|
36
36
|
from .evaluation_scenario_result import EvaluationScenarioResult
|
|
37
|
-
from .evaluation_scenario_score_update import EvaluationScenarioScoreUpdate
|
|
38
37
|
from .evaluation_status_enum import EvaluationStatusEnum
|
|
39
38
|
from .evaluation_type import EvaluationType
|
|
40
39
|
from .evaluator import Evaluator
|
|
@@ -49,19 +48,19 @@ from .human_evaluation import HumanEvaluation
|
|
|
49
48
|
from .human_evaluation_scenario import HumanEvaluationScenario
|
|
50
49
|
from .human_evaluation_scenario_input import HumanEvaluationScenarioInput
|
|
51
50
|
from .human_evaluation_scenario_output import HumanEvaluationScenarioOutput
|
|
52
|
-
from .human_evaluation_scenario_update import HumanEvaluationScenarioUpdate
|
|
53
|
-
from .human_evaluation_update import HumanEvaluationUpdate
|
|
54
51
|
from .image import Image
|
|
55
52
|
from .invite_request import InviteRequest
|
|
56
53
|
from .legacy_analytics_response import LegacyAnalyticsResponse
|
|
57
54
|
from .legacy_data_point import LegacyDataPoint
|
|
55
|
+
from .legacy_scope_request import LegacyScopeRequest
|
|
56
|
+
from .legacy_scopes_response import LegacyScopesResponse
|
|
57
|
+
from .legacy_user_request import LegacyUserRequest
|
|
58
|
+
from .legacy_user_response import LegacyUserResponse
|
|
58
59
|
from .lifecycle_dto import LifecycleDto
|
|
59
60
|
from .link_dto import LinkDto
|
|
60
61
|
from .list_api_keys_response import ListApiKeysResponse
|
|
61
62
|
from .llm_run_rate_limit import LlmRunRateLimit
|
|
62
|
-
from .llm_tokens import LlmTokens
|
|
63
63
|
from .metrics_dto import MetricsDto
|
|
64
|
-
from .new_human_evaluation import NewHumanEvaluation
|
|
65
64
|
from .new_testset import NewTestset
|
|
66
65
|
from .node_dto import NodeDto
|
|
67
66
|
from .node_type import NodeType
|
|
@@ -74,28 +73,31 @@ from .o_tel_span_kind import OTelSpanKind
|
|
|
74
73
|
from .o_tel_spans_response import OTelSpansResponse
|
|
75
74
|
from .o_tel_status_code import OTelStatusCode
|
|
76
75
|
from .organization import Organization
|
|
76
|
+
from .organization_membership_request import OrganizationMembershipRequest
|
|
77
77
|
from .organization_output import OrganizationOutput
|
|
78
|
-
from .
|
|
78
|
+
from .organization_request import OrganizationRequest
|
|
79
79
|
from .parent_dto import ParentDto
|
|
80
80
|
from .permission import Permission
|
|
81
|
+
from .project_membership_request import ProjectMembershipRequest
|
|
82
|
+
from .project_request import ProjectRequest
|
|
83
|
+
from .project_scope import ProjectScope
|
|
81
84
|
from .projects_response import ProjectsResponse
|
|
82
85
|
from .provider_key_dto import ProviderKeyDto
|
|
83
86
|
from .provider_kind import ProviderKind
|
|
87
|
+
from .reference import Reference
|
|
84
88
|
from .reference_dto import ReferenceDto
|
|
85
89
|
from .reference_request_model import ReferenceRequestModel
|
|
86
90
|
from .result import Result
|
|
91
|
+
from .role import Role
|
|
87
92
|
from .root_dto import RootDto
|
|
93
|
+
from .scopes_response_model import ScopesResponseModel
|
|
88
94
|
from .score import Score
|
|
89
95
|
from .secret_dto import SecretDto
|
|
90
96
|
from .secret_kind import SecretKind
|
|
91
97
|
from .secret_response_dto import SecretResponseDto
|
|
92
98
|
from .simple_evaluation_output import SimpleEvaluationOutput
|
|
93
|
-
from .span import Span
|
|
94
|
-
from .span_detail import SpanDetail
|
|
95
99
|
from .span_dto import SpanDto
|
|
96
100
|
from .span_dto_nodes_value import SpanDtoNodesValue
|
|
97
|
-
from .span_status_code import SpanStatusCode
|
|
98
|
-
from .span_variant import SpanVariant
|
|
99
101
|
from .status_code import StatusCode
|
|
100
102
|
from .status_dto import StatusDto
|
|
101
103
|
from .template import Template
|
|
@@ -103,23 +105,25 @@ from .template_image_info import TemplateImageInfo
|
|
|
103
105
|
from .test_set_output_response import TestSetOutputResponse
|
|
104
106
|
from .test_set_simple_response import TestSetSimpleResponse
|
|
105
107
|
from .time_dto import TimeDto
|
|
106
|
-
from .trace_detail import TraceDetail
|
|
107
108
|
from .tree_dto import TreeDto
|
|
108
109
|
from .tree_type import TreeType
|
|
109
110
|
from .update_app_output import UpdateAppOutput
|
|
110
111
|
from .uri import Uri
|
|
112
|
+
from .user_request import UserRequest
|
|
111
113
|
from .validation_error import ValidationError
|
|
112
114
|
from .validation_error_loc_item import ValidationErrorLocItem
|
|
113
115
|
from .variant_action import VariantAction
|
|
114
116
|
from .variant_action_enum import VariantActionEnum
|
|
115
|
-
from .with_pagination import WithPagination
|
|
116
117
|
from .workspace_member_response import WorkspaceMemberResponse
|
|
118
|
+
from .workspace_membership_request import WorkspaceMembershipRequest
|
|
117
119
|
from .workspace_permission import WorkspacePermission
|
|
120
|
+
from .workspace_request import WorkspaceRequest
|
|
118
121
|
from .workspace_response import WorkspaceResponse
|
|
119
122
|
from .workspace_role import WorkspaceRole
|
|
120
123
|
from .workspace_role_response import WorkspaceRoleResponse
|
|
121
124
|
|
|
122
125
|
__all__ = [
|
|
126
|
+
"AccountResponse",
|
|
123
127
|
"AgentaNodeDto",
|
|
124
128
|
"AgentaNodeDtoNodesValue",
|
|
125
129
|
"AgentaNodesResponse",
|
|
@@ -142,8 +146,7 @@ __all__ = [
|
|
|
142
146
|
"ConfigResponseModel",
|
|
143
147
|
"CorrectAnswer",
|
|
144
148
|
"CreateAppOutput",
|
|
145
|
-
"
|
|
146
|
-
"CreateTraceResponse",
|
|
149
|
+
"DeleteEvaluation",
|
|
147
150
|
"DockerEnvVars",
|
|
148
151
|
"EnvironmentOutput",
|
|
149
152
|
"EnvironmentOutputExtended",
|
|
@@ -154,7 +157,6 @@ __all__ = [
|
|
|
154
157
|
"EvaluationScenarioInput",
|
|
155
158
|
"EvaluationScenarioOutput",
|
|
156
159
|
"EvaluationScenarioResult",
|
|
157
|
-
"EvaluationScenarioScoreUpdate",
|
|
158
160
|
"EvaluationStatusEnum",
|
|
159
161
|
"EvaluationType",
|
|
160
162
|
"Evaluator",
|
|
@@ -169,19 +171,19 @@ __all__ = [
|
|
|
169
171
|
"HumanEvaluationScenario",
|
|
170
172
|
"HumanEvaluationScenarioInput",
|
|
171
173
|
"HumanEvaluationScenarioOutput",
|
|
172
|
-
"HumanEvaluationScenarioUpdate",
|
|
173
|
-
"HumanEvaluationUpdate",
|
|
174
174
|
"Image",
|
|
175
175
|
"InviteRequest",
|
|
176
176
|
"LegacyAnalyticsResponse",
|
|
177
177
|
"LegacyDataPoint",
|
|
178
|
+
"LegacyScopeRequest",
|
|
179
|
+
"LegacyScopesResponse",
|
|
180
|
+
"LegacyUserRequest",
|
|
181
|
+
"LegacyUserResponse",
|
|
178
182
|
"LifecycleDto",
|
|
179
183
|
"LinkDto",
|
|
180
184
|
"ListApiKeysResponse",
|
|
181
185
|
"LlmRunRateLimit",
|
|
182
|
-
"LlmTokens",
|
|
183
186
|
"MetricsDto",
|
|
184
|
-
"NewHumanEvaluation",
|
|
185
187
|
"NewTestset",
|
|
186
188
|
"NodeDto",
|
|
187
189
|
"NodeType",
|
|
@@ -194,28 +196,31 @@ __all__ = [
|
|
|
194
196
|
"OTelSpansResponse",
|
|
195
197
|
"OTelStatusCode",
|
|
196
198
|
"Organization",
|
|
199
|
+
"OrganizationMembershipRequest",
|
|
197
200
|
"OrganizationOutput",
|
|
198
|
-
"
|
|
201
|
+
"OrganizationRequest",
|
|
199
202
|
"ParentDto",
|
|
200
203
|
"Permission",
|
|
204
|
+
"ProjectMembershipRequest",
|
|
205
|
+
"ProjectRequest",
|
|
206
|
+
"ProjectScope",
|
|
201
207
|
"ProjectsResponse",
|
|
202
208
|
"ProviderKeyDto",
|
|
203
209
|
"ProviderKind",
|
|
210
|
+
"Reference",
|
|
204
211
|
"ReferenceDto",
|
|
205
212
|
"ReferenceRequestModel",
|
|
206
213
|
"Result",
|
|
214
|
+
"Role",
|
|
207
215
|
"RootDto",
|
|
216
|
+
"ScopesResponseModel",
|
|
208
217
|
"Score",
|
|
209
218
|
"SecretDto",
|
|
210
219
|
"SecretKind",
|
|
211
220
|
"SecretResponseDto",
|
|
212
221
|
"SimpleEvaluationOutput",
|
|
213
|
-
"Span",
|
|
214
|
-
"SpanDetail",
|
|
215
222
|
"SpanDto",
|
|
216
223
|
"SpanDtoNodesValue",
|
|
217
|
-
"SpanStatusCode",
|
|
218
|
-
"SpanVariant",
|
|
219
224
|
"StatusCode",
|
|
220
225
|
"StatusDto",
|
|
221
226
|
"Template",
|
|
@@ -223,18 +228,19 @@ __all__ = [
|
|
|
223
228
|
"TestSetOutputResponse",
|
|
224
229
|
"TestSetSimpleResponse",
|
|
225
230
|
"TimeDto",
|
|
226
|
-
"TraceDetail",
|
|
227
231
|
"TreeDto",
|
|
228
232
|
"TreeType",
|
|
229
233
|
"UpdateAppOutput",
|
|
230
234
|
"Uri",
|
|
235
|
+
"UserRequest",
|
|
231
236
|
"ValidationError",
|
|
232
237
|
"ValidationErrorLocItem",
|
|
233
238
|
"VariantAction",
|
|
234
239
|
"VariantActionEnum",
|
|
235
|
-
"WithPagination",
|
|
236
240
|
"WorkspaceMemberResponse",
|
|
241
|
+
"WorkspaceMembershipRequest",
|
|
237
242
|
"WorkspacePermission",
|
|
243
|
+
"WorkspaceRequest",
|
|
238
244
|
"WorkspaceResponse",
|
|
239
245
|
"WorkspaceRole",
|
|
240
246
|
"WorkspaceRoleResponse",
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
import typing
|
|
5
|
+
from .legacy_user_response import LegacyUserResponse
|
|
6
|
+
from .legacy_scopes_response import LegacyScopesResponse
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
|
+
import pydantic
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class AccountResponse(UniversalBaseModel):
|
|
12
|
+
user: typing.Optional[LegacyUserResponse] = None
|
|
13
|
+
scopes: typing.Optional[typing.List[LegacyScopesResponse]] = None
|
|
14
|
+
|
|
15
|
+
if IS_PYDANTIC_V2:
|
|
16
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
17
|
+
extra="allow", frozen=True
|
|
18
|
+
) # type: ignore # Pydantic v2
|
|
19
|
+
else:
|
|
20
|
+
|
|
21
|
+
class Config:
|
|
22
|
+
frozen = True
|
|
23
|
+
smart_union = True
|
|
24
|
+
extra = pydantic.Extra.allow
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
3
|
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
import typing
|
|
4
5
|
from .config_db import ConfigDb
|
|
5
6
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
6
|
-
import typing
|
|
7
7
|
import pydantic
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class AppVariantRevision(UniversalBaseModel):
|
|
11
|
+
id: typing.Optional[str] = None
|
|
11
12
|
revision: int
|
|
12
13
|
modified_by: str
|
|
13
14
|
config: ConfigDb
|
|
@@ -6,9 +6,8 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
|
6
6
|
import pydantic
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
class
|
|
10
|
-
|
|
11
|
-
data: typing.Dict[str, typing.Optional[typing.Any]]
|
|
9
|
+
class DeleteEvaluation(UniversalBaseModel):
|
|
10
|
+
evaluations_ids: typing.List[str]
|
|
12
11
|
|
|
13
12
|
if IS_PYDANTIC_V2:
|
|
14
13
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
@@ -6,8 +6,8 @@ import typing
|
|
|
6
6
|
import pydantic
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
class
|
|
10
|
-
|
|
9
|
+
class LegacyScopeRequest(UniversalBaseModel):
|
|
10
|
+
name: str
|
|
11
11
|
|
|
12
12
|
if IS_PYDANTIC_V2:
|
|
13
13
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|