agenta 0.28.2a2__py3-none-any.whl → 0.30.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/cli/main.py +2 -2
- agenta/client/backend/__init__.py +32 -3
- agenta/client/backend/access_control/__init__.py +1 -0
- agenta/client/backend/access_control/client.py +167 -0
- agenta/client/backend/apps/client.py +70 -10
- agenta/client/backend/client.py +61 -45
- agenta/client/backend/configs/client.py +6 -0
- agenta/client/backend/containers/client.py +6 -0
- agenta/client/backend/core/file.py +13 -8
- agenta/client/backend/environments/client.py +6 -0
- agenta/client/backend/evaluations/client.py +14 -1
- agenta/client/backend/evaluators/client.py +24 -0
- agenta/client/backend/observability/client.py +22 -16
- agenta/client/backend/observability_v_1/__init__.py +2 -2
- agenta/client/backend/observability_v_1/client.py +203 -0
- agenta/client/backend/observability_v_1/types/__init__.py +2 -1
- agenta/client/backend/observability_v_1/types/format.py +1 -1
- agenta/client/backend/observability_v_1/types/query_analytics_response.py +7 -0
- agenta/client/backend/scopes/__init__.py +1 -0
- agenta/client/backend/scopes/client.py +114 -0
- agenta/client/backend/testsets/client.py +305 -121
- agenta/client/backend/types/__init__.py +24 -2
- agenta/client/backend/types/analytics_response.py +24 -0
- agenta/client/backend/types/app.py +2 -1
- agenta/client/backend/types/body_import_testset.py +0 -1
- agenta/client/backend/types/bucket_dto.py +26 -0
- agenta/client/backend/types/header_dto.py +22 -0
- agenta/client/backend/types/legacy_analytics_response.py +29 -0
- agenta/client/backend/types/legacy_data_point.py +27 -0
- agenta/client/backend/types/metrics_dto.py +24 -0
- agenta/client/backend/types/permission.py +1 -0
- agenta/client/backend/types/projects_response.py +28 -0
- agenta/client/backend/types/provider_key_dto.py +23 -0
- agenta/client/backend/types/provider_kind.py +21 -0
- agenta/client/backend/types/secret_dto.py +24 -0
- agenta/client/backend/types/secret_kind.py +5 -0
- agenta/client/backend/types/secret_response_dto.py +27 -0
- agenta/client/backend/variants/client.py +66 -0
- agenta/client/backend/vault/__init__.py +1 -0
- agenta/client/backend/vault/client.py +685 -0
- agenta/sdk/decorators/routing.py +4 -0
- agenta/sdk/utils/helpers.py +8 -0
- {agenta-0.28.2a2.dist-info → agenta-0.30.0.dist-info}/METADATA +2 -2
- {agenta-0.28.2a2.dist-info → agenta-0.30.0.dist-info}/RECORD +46 -27
- {agenta-0.28.2a2.dist-info → agenta-0.30.0.dist-info}/WHEEL +1 -1
- agenta/client/backend/types/lm_providers_enum.py +0 -21
- {agenta-0.28.2a2.dist-info → agenta-0.30.0.dist-info}/entry_points.txt +0 -0
agenta/client/backend/client.py
CHANGED
|
@@ -4,6 +4,9 @@ import typing
|
|
|
4
4
|
import httpx
|
|
5
5
|
from .core.client_wrapper import SyncClientWrapper
|
|
6
6
|
from .observability.client import ObservabilityClient
|
|
7
|
+
from .vault.client import VaultClient
|
|
8
|
+
from .access_control.client import AccessControlClient
|
|
9
|
+
from .scopes.client import ScopesClient
|
|
7
10
|
from .apps.client import AppsClient
|
|
8
11
|
from .variants.client import VariantsClient
|
|
9
12
|
from .evaluations.client import EvaluationsClient
|
|
@@ -19,9 +22,9 @@ from .types.list_api_keys_response import ListApiKeysResponse
|
|
|
19
22
|
from .core.pydantic_utilities import parse_obj_as
|
|
20
23
|
from json.decoder import JSONDecodeError
|
|
21
24
|
from .core.api_error import ApiError
|
|
25
|
+
from .core.jsonable_encoder import jsonable_encoder
|
|
22
26
|
from .errors.unprocessable_entity_error import UnprocessableEntityError
|
|
23
27
|
from .types.http_validation_error import HttpValidationError
|
|
24
|
-
from .core.jsonable_encoder import jsonable_encoder
|
|
25
28
|
from .types.organization import Organization
|
|
26
29
|
from .types.organization_output import OrganizationOutput
|
|
27
30
|
from .types.invite_request import InviteRequest
|
|
@@ -32,6 +35,9 @@ from .types.workspace_role_response import WorkspaceRoleResponse
|
|
|
32
35
|
from .types.permission import Permission
|
|
33
36
|
from .core.client_wrapper import AsyncClientWrapper
|
|
34
37
|
from .observability.client import AsyncObservabilityClient
|
|
38
|
+
from .vault.client import AsyncVaultClient
|
|
39
|
+
from .access_control.client import AsyncAccessControlClient
|
|
40
|
+
from .scopes.client import AsyncScopesClient
|
|
35
41
|
from .apps.client import AsyncAppsClient
|
|
36
42
|
from .variants.client import AsyncVariantsClient
|
|
37
43
|
from .evaluations.client import AsyncEvaluationsClient
|
|
@@ -101,6 +107,9 @@ class AgentaApi:
|
|
|
101
107
|
timeout=_defaulted_timeout,
|
|
102
108
|
)
|
|
103
109
|
self.observability = ObservabilityClient(client_wrapper=self._client_wrapper)
|
|
110
|
+
self.vault = VaultClient(client_wrapper=self._client_wrapper)
|
|
111
|
+
self.access_control = AccessControlClient(client_wrapper=self._client_wrapper)
|
|
112
|
+
self.scopes = ScopesClient(client_wrapper=self._client_wrapper)
|
|
104
113
|
self.apps = AppsClient(client_wrapper=self._client_wrapper)
|
|
105
114
|
self.variants = VariantsClient(client_wrapper=self._client_wrapper)
|
|
106
115
|
self.evaluations = EvaluationsClient(client_wrapper=self._client_wrapper)
|
|
@@ -166,10 +175,7 @@ class AgentaApi:
|
|
|
166
175
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
167
176
|
|
|
168
177
|
def create_api_key(
|
|
169
|
-
self,
|
|
170
|
-
*,
|
|
171
|
-
workspace_id: str,
|
|
172
|
-
request_options: typing.Optional[RequestOptions] = None,
|
|
178
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
173
179
|
) -> str:
|
|
174
180
|
"""
|
|
175
181
|
Creates an API key for a user.
|
|
@@ -182,8 +188,6 @@ class AgentaApi:
|
|
|
182
188
|
|
|
183
189
|
Parameters
|
|
184
190
|
----------
|
|
185
|
-
workspace_id : str
|
|
186
|
-
|
|
187
191
|
request_options : typing.Optional[RequestOptions]
|
|
188
192
|
Request-specific configuration.
|
|
189
193
|
|
|
@@ -200,16 +204,11 @@ class AgentaApi:
|
|
|
200
204
|
api_key="YOUR_API_KEY",
|
|
201
205
|
base_url="https://yourhost.com/path/to/api",
|
|
202
206
|
)
|
|
203
|
-
client.create_api_key(
|
|
204
|
-
workspace_id="workspace_id",
|
|
205
|
-
)
|
|
207
|
+
client.create_api_key()
|
|
206
208
|
"""
|
|
207
209
|
_response = self._client_wrapper.httpx_client.request(
|
|
208
210
|
"keys",
|
|
209
211
|
method="POST",
|
|
210
|
-
params={
|
|
211
|
-
"workspace_id": workspace_id,
|
|
212
|
-
},
|
|
213
212
|
request_options=request_options,
|
|
214
213
|
)
|
|
215
214
|
try:
|
|
@@ -221,16 +220,6 @@ class AgentaApi:
|
|
|
221
220
|
object_=_response.json(),
|
|
222
221
|
),
|
|
223
222
|
)
|
|
224
|
-
if _response.status_code == 422:
|
|
225
|
-
raise UnprocessableEntityError(
|
|
226
|
-
typing.cast(
|
|
227
|
-
HttpValidationError,
|
|
228
|
-
parse_obj_as(
|
|
229
|
-
type_=HttpValidationError, # type: ignore
|
|
230
|
-
object_=_response.json(),
|
|
231
|
-
),
|
|
232
|
-
)
|
|
233
|
-
)
|
|
234
223
|
_response_json = _response.json()
|
|
235
224
|
except JSONDecodeError:
|
|
236
225
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -476,6 +465,9 @@ class AgentaApi:
|
|
|
476
465
|
"description": description,
|
|
477
466
|
"type": type,
|
|
478
467
|
},
|
|
468
|
+
headers={
|
|
469
|
+
"content-type": "application/json",
|
|
470
|
+
},
|
|
479
471
|
request_options=request_options,
|
|
480
472
|
omit=OMIT,
|
|
481
473
|
)
|
|
@@ -660,6 +652,9 @@ class AgentaApi:
|
|
|
660
652
|
"description": description,
|
|
661
653
|
"updated_at": updated_at,
|
|
662
654
|
},
|
|
655
|
+
headers={
|
|
656
|
+
"content-type": "application/json",
|
|
657
|
+
},
|
|
663
658
|
request_options=request_options,
|
|
664
659
|
omit=OMIT,
|
|
665
660
|
)
|
|
@@ -821,6 +816,9 @@ class AgentaApi:
|
|
|
821
816
|
json={
|
|
822
817
|
"email": email,
|
|
823
818
|
},
|
|
819
|
+
headers={
|
|
820
|
+
"content-type": "application/json",
|
|
821
|
+
},
|
|
824
822
|
request_options=request_options,
|
|
825
823
|
omit=OMIT,
|
|
826
824
|
)
|
|
@@ -910,6 +908,9 @@ class AgentaApi:
|
|
|
910
908
|
json={
|
|
911
909
|
"token": token,
|
|
912
910
|
},
|
|
911
|
+
headers={
|
|
912
|
+
"content-type": "application/json",
|
|
913
|
+
},
|
|
913
914
|
request_options=request_options,
|
|
914
915
|
omit=OMIT,
|
|
915
916
|
)
|
|
@@ -986,6 +987,9 @@ class AgentaApi:
|
|
|
986
987
|
"description": description,
|
|
987
988
|
"type": type,
|
|
988
989
|
},
|
|
990
|
+
headers={
|
|
991
|
+
"content-type": "application/json",
|
|
992
|
+
},
|
|
989
993
|
request_options=request_options,
|
|
990
994
|
omit=OMIT,
|
|
991
995
|
)
|
|
@@ -1065,6 +1069,9 @@ class AgentaApi:
|
|
|
1065
1069
|
"description": description,
|
|
1066
1070
|
"updated_at": updated_at,
|
|
1067
1071
|
},
|
|
1072
|
+
headers={
|
|
1073
|
+
"content-type": "application/json",
|
|
1074
|
+
},
|
|
1068
1075
|
request_options=request_options,
|
|
1069
1076
|
omit=OMIT,
|
|
1070
1077
|
)
|
|
@@ -1262,6 +1269,9 @@ class AgentaApi:
|
|
|
1262
1269
|
"organization_id": organization_id,
|
|
1263
1270
|
"role": role,
|
|
1264
1271
|
},
|
|
1272
|
+
headers={
|
|
1273
|
+
"content-type": "application/json",
|
|
1274
|
+
},
|
|
1265
1275
|
request_options=request_options,
|
|
1266
1276
|
omit=OMIT,
|
|
1267
1277
|
)
|
|
@@ -1632,6 +1642,11 @@ class AsyncAgentaApi:
|
|
|
1632
1642
|
self.observability = AsyncObservabilityClient(
|
|
1633
1643
|
client_wrapper=self._client_wrapper
|
|
1634
1644
|
)
|
|
1645
|
+
self.vault = AsyncVaultClient(client_wrapper=self._client_wrapper)
|
|
1646
|
+
self.access_control = AsyncAccessControlClient(
|
|
1647
|
+
client_wrapper=self._client_wrapper
|
|
1648
|
+
)
|
|
1649
|
+
self.scopes = AsyncScopesClient(client_wrapper=self._client_wrapper)
|
|
1635
1650
|
self.apps = AsyncAppsClient(client_wrapper=self._client_wrapper)
|
|
1636
1651
|
self.variants = AsyncVariantsClient(client_wrapper=self._client_wrapper)
|
|
1637
1652
|
self.evaluations = AsyncEvaluationsClient(client_wrapper=self._client_wrapper)
|
|
@@ -1705,10 +1720,7 @@ class AsyncAgentaApi:
|
|
|
1705
1720
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
1706
1721
|
|
|
1707
1722
|
async def create_api_key(
|
|
1708
|
-
self,
|
|
1709
|
-
*,
|
|
1710
|
-
workspace_id: str,
|
|
1711
|
-
request_options: typing.Optional[RequestOptions] = None,
|
|
1723
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
1712
1724
|
) -> str:
|
|
1713
1725
|
"""
|
|
1714
1726
|
Creates an API key for a user.
|
|
@@ -1721,8 +1733,6 @@ class AsyncAgentaApi:
|
|
|
1721
1733
|
|
|
1722
1734
|
Parameters
|
|
1723
1735
|
----------
|
|
1724
|
-
workspace_id : str
|
|
1725
|
-
|
|
1726
1736
|
request_options : typing.Optional[RequestOptions]
|
|
1727
1737
|
Request-specific configuration.
|
|
1728
1738
|
|
|
@@ -1744,9 +1754,7 @@ class AsyncAgentaApi:
|
|
|
1744
1754
|
|
|
1745
1755
|
|
|
1746
1756
|
async def main() -> None:
|
|
1747
|
-
await client.create_api_key(
|
|
1748
|
-
workspace_id="workspace_id",
|
|
1749
|
-
)
|
|
1757
|
+
await client.create_api_key()
|
|
1750
1758
|
|
|
1751
1759
|
|
|
1752
1760
|
asyncio.run(main())
|
|
@@ -1754,9 +1762,6 @@ class AsyncAgentaApi:
|
|
|
1754
1762
|
_response = await self._client_wrapper.httpx_client.request(
|
|
1755
1763
|
"keys",
|
|
1756
1764
|
method="POST",
|
|
1757
|
-
params={
|
|
1758
|
-
"workspace_id": workspace_id,
|
|
1759
|
-
},
|
|
1760
1765
|
request_options=request_options,
|
|
1761
1766
|
)
|
|
1762
1767
|
try:
|
|
@@ -1768,16 +1773,6 @@ class AsyncAgentaApi:
|
|
|
1768
1773
|
object_=_response.json(),
|
|
1769
1774
|
),
|
|
1770
1775
|
)
|
|
1771
|
-
if _response.status_code == 422:
|
|
1772
|
-
raise UnprocessableEntityError(
|
|
1773
|
-
typing.cast(
|
|
1774
|
-
HttpValidationError,
|
|
1775
|
-
parse_obj_as(
|
|
1776
|
-
type_=HttpValidationError, # type: ignore
|
|
1777
|
-
object_=_response.json(),
|
|
1778
|
-
),
|
|
1779
|
-
)
|
|
1780
|
-
)
|
|
1781
1776
|
_response_json = _response.json()
|
|
1782
1777
|
except JSONDecodeError:
|
|
1783
1778
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -2055,6 +2050,9 @@ class AsyncAgentaApi:
|
|
|
2055
2050
|
"description": description,
|
|
2056
2051
|
"type": type,
|
|
2057
2052
|
},
|
|
2053
|
+
headers={
|
|
2054
|
+
"content-type": "application/json",
|
|
2055
|
+
},
|
|
2058
2056
|
request_options=request_options,
|
|
2059
2057
|
omit=OMIT,
|
|
2060
2058
|
)
|
|
@@ -2263,6 +2261,9 @@ class AsyncAgentaApi:
|
|
|
2263
2261
|
"description": description,
|
|
2264
2262
|
"updated_at": updated_at,
|
|
2265
2263
|
},
|
|
2264
|
+
headers={
|
|
2265
|
+
"content-type": "application/json",
|
|
2266
|
+
},
|
|
2266
2267
|
request_options=request_options,
|
|
2267
2268
|
omit=OMIT,
|
|
2268
2269
|
)
|
|
@@ -2440,6 +2441,9 @@ class AsyncAgentaApi:
|
|
|
2440
2441
|
json={
|
|
2441
2442
|
"email": email,
|
|
2442
2443
|
},
|
|
2444
|
+
headers={
|
|
2445
|
+
"content-type": "application/json",
|
|
2446
|
+
},
|
|
2443
2447
|
request_options=request_options,
|
|
2444
2448
|
omit=OMIT,
|
|
2445
2449
|
)
|
|
@@ -2537,6 +2541,9 @@ class AsyncAgentaApi:
|
|
|
2537
2541
|
json={
|
|
2538
2542
|
"token": token,
|
|
2539
2543
|
},
|
|
2544
|
+
headers={
|
|
2545
|
+
"content-type": "application/json",
|
|
2546
|
+
},
|
|
2540
2547
|
request_options=request_options,
|
|
2541
2548
|
omit=OMIT,
|
|
2542
2549
|
)
|
|
@@ -2621,6 +2628,9 @@ class AsyncAgentaApi:
|
|
|
2621
2628
|
"description": description,
|
|
2622
2629
|
"type": type,
|
|
2623
2630
|
},
|
|
2631
|
+
headers={
|
|
2632
|
+
"content-type": "application/json",
|
|
2633
|
+
},
|
|
2624
2634
|
request_options=request_options,
|
|
2625
2635
|
omit=OMIT,
|
|
2626
2636
|
)
|
|
@@ -2708,6 +2718,9 @@ class AsyncAgentaApi:
|
|
|
2708
2718
|
"description": description,
|
|
2709
2719
|
"updated_at": updated_at,
|
|
2710
2720
|
},
|
|
2721
|
+
headers={
|
|
2722
|
+
"content-type": "application/json",
|
|
2723
|
+
},
|
|
2711
2724
|
request_options=request_options,
|
|
2712
2725
|
omit=OMIT,
|
|
2713
2726
|
)
|
|
@@ -2929,6 +2942,9 @@ class AsyncAgentaApi:
|
|
|
2929
2942
|
"organization_id": organization_id,
|
|
2930
2943
|
"role": role,
|
|
2931
2944
|
},
|
|
2945
|
+
headers={
|
|
2946
|
+
"content-type": "application/json",
|
|
2947
|
+
},
|
|
2932
2948
|
request_options=request_options,
|
|
2933
2949
|
omit=OMIT,
|
|
2934
2950
|
)
|
|
@@ -143,6 +143,9 @@ class ConfigsClient:
|
|
|
143
143
|
"parameters": parameters,
|
|
144
144
|
"overwrite": overwrite,
|
|
145
145
|
},
|
|
146
|
+
headers={
|
|
147
|
+
"content-type": "application/json",
|
|
148
|
+
},
|
|
146
149
|
request_options=request_options,
|
|
147
150
|
omit=OMIT,
|
|
148
151
|
)
|
|
@@ -434,6 +437,9 @@ class AsyncConfigsClient:
|
|
|
434
437
|
"parameters": parameters,
|
|
435
438
|
"overwrite": overwrite,
|
|
436
439
|
},
|
|
440
|
+
headers={
|
|
441
|
+
"content-type": "application/json",
|
|
442
|
+
},
|
|
437
443
|
request_options=request_options,
|
|
438
444
|
omit=OMIT,
|
|
439
445
|
)
|
|
@@ -156,6 +156,9 @@ class ContainersClient:
|
|
|
156
156
|
json={
|
|
157
157
|
"variant_id": variant_id,
|
|
158
158
|
},
|
|
159
|
+
headers={
|
|
160
|
+
"content-type": "application/json",
|
|
161
|
+
},
|
|
159
162
|
request_options=request_options,
|
|
160
163
|
omit=OMIT,
|
|
161
164
|
)
|
|
@@ -468,6 +471,9 @@ class AsyncContainersClient:
|
|
|
468
471
|
json={
|
|
469
472
|
"variant_id": variant_id,
|
|
470
473
|
},
|
|
474
|
+
headers={
|
|
475
|
+
"content-type": "application/json",
|
|
476
|
+
},
|
|
471
477
|
request_options=request_options,
|
|
472
478
|
omit=OMIT,
|
|
473
479
|
)
|
|
@@ -43,23 +43,28 @@ def convert_file_dict_to_httpx_tuples(
|
|
|
43
43
|
return httpx_tuples
|
|
44
44
|
|
|
45
45
|
|
|
46
|
-
def with_content_type(*, file: File,
|
|
47
|
-
"""
|
|
46
|
+
def with_content_type(*, file: File, default_content_type: str) -> File:
|
|
47
|
+
"""
|
|
48
|
+
This function resolves to the file's content type, if provided, and defaults
|
|
49
|
+
to the default_content_type value if not.
|
|
50
|
+
"""
|
|
48
51
|
if isinstance(file, tuple):
|
|
49
52
|
if len(file) == 2:
|
|
50
53
|
filename, content = cast(Tuple[Optional[str], FileContent], file) # type: ignore
|
|
51
|
-
return (filename, content,
|
|
54
|
+
return (filename, content, default_content_type)
|
|
52
55
|
elif len(file) == 3:
|
|
53
|
-
filename, content,
|
|
56
|
+
filename, content, file_content_type = cast(
|
|
54
57
|
Tuple[Optional[str], FileContent, Optional[str]], file
|
|
55
58
|
) # type: ignore
|
|
56
|
-
|
|
59
|
+
out_content_type = file_content_type or default_content_type
|
|
60
|
+
return (filename, content, out_content_type)
|
|
57
61
|
elif len(file) == 4:
|
|
58
|
-
filename, content,
|
|
62
|
+
filename, content, file_content_type, headers = cast( # type: ignore
|
|
59
63
|
Tuple[Optional[str], FileContent, Optional[str], Mapping[str, str]],
|
|
60
64
|
file,
|
|
61
65
|
)
|
|
62
|
-
|
|
66
|
+
out_content_type = file_content_type or default_content_type
|
|
67
|
+
return (filename, content, out_content_type, headers)
|
|
63
68
|
else:
|
|
64
69
|
raise ValueError(f"Unexpected tuple length: {len(file)}")
|
|
65
|
-
return (None, file,
|
|
70
|
+
return (None, file, default_content_type)
|
|
@@ -70,6 +70,9 @@ class EnvironmentsClient:
|
|
|
70
70
|
"environment_name": environment_name,
|
|
71
71
|
"variant_id": variant_id,
|
|
72
72
|
},
|
|
73
|
+
headers={
|
|
74
|
+
"content-type": "application/json",
|
|
75
|
+
},
|
|
73
76
|
request_options=request_options,
|
|
74
77
|
omit=OMIT,
|
|
75
78
|
)
|
|
@@ -162,6 +165,9 @@ class AsyncEnvironmentsClient:
|
|
|
162
165
|
"environment_name": environment_name,
|
|
163
166
|
"variant_id": variant_id,
|
|
164
167
|
},
|
|
168
|
+
headers={
|
|
169
|
+
"content-type": "application/json",
|
|
170
|
+
},
|
|
165
171
|
request_options=request_options,
|
|
166
172
|
omit=OMIT,
|
|
167
173
|
)
|
|
@@ -34,6 +34,7 @@ class EvaluationsClient:
|
|
|
34
34
|
Fetches evaluation ids for a given resource type and id.
|
|
35
35
|
|
|
36
36
|
Arguments:
|
|
37
|
+
app_id (str): The ID of the app for which to fetch evaluations.
|
|
37
38
|
resource_type (str): The type of resource for which to fetch evaluations.
|
|
38
39
|
resource_ids List[ObjectId]: The IDs of resource for which to fetch evaluations.
|
|
39
40
|
|
|
@@ -250,6 +251,9 @@ class EvaluationsClient:
|
|
|
250
251
|
"lm_providers_keys": lm_providers_keys,
|
|
251
252
|
"correct_answer_column": correct_answer_column,
|
|
252
253
|
},
|
|
254
|
+
headers={
|
|
255
|
+
"content-type": "application/json",
|
|
256
|
+
},
|
|
253
257
|
request_options=request_options,
|
|
254
258
|
omit=OMIT,
|
|
255
259
|
)
|
|
@@ -322,6 +326,9 @@ class EvaluationsClient:
|
|
|
322
326
|
json={
|
|
323
327
|
"evaluations_ids": evaluations_ids,
|
|
324
328
|
},
|
|
329
|
+
headers={
|
|
330
|
+
"content-type": "application/json",
|
|
331
|
+
},
|
|
325
332
|
request_options=request_options,
|
|
326
333
|
omit=OMIT,
|
|
327
334
|
)
|
|
@@ -716,6 +723,7 @@ class AsyncEvaluationsClient:
|
|
|
716
723
|
Fetches evaluation ids for a given resource type and id.
|
|
717
724
|
|
|
718
725
|
Arguments:
|
|
726
|
+
app_id (str): The ID of the app for which to fetch evaluations.
|
|
719
727
|
resource_type (str): The type of resource for which to fetch evaluations.
|
|
720
728
|
resource_ids List[ObjectId]: The IDs of resource for which to fetch evaluations.
|
|
721
729
|
|
|
@@ -727,7 +735,6 @@ class AsyncEvaluationsClient:
|
|
|
727
735
|
|
|
728
736
|
Parameters
|
|
729
737
|
----------
|
|
730
|
-
|
|
731
738
|
resource_type : str
|
|
732
739
|
|
|
733
740
|
resource_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
@@ -957,6 +964,9 @@ class AsyncEvaluationsClient:
|
|
|
957
964
|
"lm_providers_keys": lm_providers_keys,
|
|
958
965
|
"correct_answer_column": correct_answer_column,
|
|
959
966
|
},
|
|
967
|
+
headers={
|
|
968
|
+
"content-type": "application/json",
|
|
969
|
+
},
|
|
960
970
|
request_options=request_options,
|
|
961
971
|
omit=OMIT,
|
|
962
972
|
)
|
|
@@ -1037,6 +1047,9 @@ class AsyncEvaluationsClient:
|
|
|
1037
1047
|
json={
|
|
1038
1048
|
"evaluations_ids": evaluations_ids,
|
|
1039
1049
|
},
|
|
1050
|
+
headers={
|
|
1051
|
+
"content-type": "application/json",
|
|
1052
|
+
},
|
|
1040
1053
|
request_options=request_options,
|
|
1041
1054
|
omit=OMIT,
|
|
1042
1055
|
)
|
|
@@ -122,6 +122,9 @@ class EvaluatorsClient:
|
|
|
122
122
|
"inputs": inputs,
|
|
123
123
|
"mapping": mapping,
|
|
124
124
|
},
|
|
125
|
+
headers={
|
|
126
|
+
"content-type": "application/json",
|
|
127
|
+
},
|
|
125
128
|
request_options=request_options,
|
|
126
129
|
omit=OMIT,
|
|
127
130
|
)
|
|
@@ -209,6 +212,9 @@ class EvaluatorsClient:
|
|
|
209
212
|
"settings": settings,
|
|
210
213
|
"credentials": credentials,
|
|
211
214
|
},
|
|
215
|
+
headers={
|
|
216
|
+
"content-type": "application/json",
|
|
217
|
+
},
|
|
212
218
|
request_options=request_options,
|
|
213
219
|
omit=OMIT,
|
|
214
220
|
)
|
|
@@ -364,6 +370,9 @@ class EvaluatorsClient:
|
|
|
364
370
|
"evaluator_key": evaluator_key,
|
|
365
371
|
"settings_values": settings_values,
|
|
366
372
|
},
|
|
373
|
+
headers={
|
|
374
|
+
"content-type": "application/json",
|
|
375
|
+
},
|
|
367
376
|
request_options=request_options,
|
|
368
377
|
omit=OMIT,
|
|
369
378
|
)
|
|
@@ -511,6 +520,9 @@ class EvaluatorsClient:
|
|
|
511
520
|
"evaluator_key": evaluator_key,
|
|
512
521
|
"settings_values": settings_values,
|
|
513
522
|
},
|
|
523
|
+
headers={
|
|
524
|
+
"content-type": "application/json",
|
|
525
|
+
},
|
|
514
526
|
request_options=request_options,
|
|
515
527
|
omit=OMIT,
|
|
516
528
|
)
|
|
@@ -726,6 +738,9 @@ class AsyncEvaluatorsClient:
|
|
|
726
738
|
"inputs": inputs,
|
|
727
739
|
"mapping": mapping,
|
|
728
740
|
},
|
|
741
|
+
headers={
|
|
742
|
+
"content-type": "application/json",
|
|
743
|
+
},
|
|
729
744
|
request_options=request_options,
|
|
730
745
|
omit=OMIT,
|
|
731
746
|
)
|
|
@@ -821,6 +836,9 @@ class AsyncEvaluatorsClient:
|
|
|
821
836
|
"settings": settings,
|
|
822
837
|
"credentials": credentials,
|
|
823
838
|
},
|
|
839
|
+
headers={
|
|
840
|
+
"content-type": "application/json",
|
|
841
|
+
},
|
|
824
842
|
request_options=request_options,
|
|
825
843
|
omit=OMIT,
|
|
826
844
|
)
|
|
@@ -992,6 +1010,9 @@ class AsyncEvaluatorsClient:
|
|
|
992
1010
|
"evaluator_key": evaluator_key,
|
|
993
1011
|
"settings_values": settings_values,
|
|
994
1012
|
},
|
|
1013
|
+
headers={
|
|
1014
|
+
"content-type": "application/json",
|
|
1015
|
+
},
|
|
995
1016
|
request_options=request_options,
|
|
996
1017
|
omit=OMIT,
|
|
997
1018
|
)
|
|
@@ -1155,6 +1176,9 @@ class AsyncEvaluatorsClient:
|
|
|
1155
1176
|
"evaluator_key": evaluator_key,
|
|
1156
1177
|
"settings_values": settings_values,
|
|
1157
1178
|
},
|
|
1179
|
+
headers={
|
|
1180
|
+
"content-type": "application/json",
|
|
1181
|
+
},
|
|
1158
1182
|
request_options=request_options,
|
|
1159
1183
|
omit=OMIT,
|
|
1160
1184
|
)
|