agenta 0.30.0__py3-none-any.whl → 0.30.0a2__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 +3 -32
- agenta/client/backend/apps/client.py +10 -70
- agenta/client/backend/client.py +45 -61
- agenta/client/backend/configs/client.py +0 -6
- agenta/client/backend/containers/client.py +0 -6
- agenta/client/backend/core/file.py +8 -13
- agenta/client/backend/environments/client.py +0 -6
- agenta/client/backend/evaluations/client.py +1 -14
- agenta/client/backend/evaluators/client.py +0 -24
- agenta/client/backend/observability/client.py +16 -22
- agenta/client/backend/observability_v_1/__init__.py +2 -2
- agenta/client/backend/observability_v_1/client.py +0 -203
- agenta/client/backend/observability_v_1/types/__init__.py +1 -2
- agenta/client/backend/observability_v_1/types/format.py +1 -1
- agenta/client/backend/testsets/client.py +121 -305
- agenta/client/backend/types/__init__.py +2 -24
- agenta/client/backend/types/app.py +1 -2
- agenta/client/backend/types/body_import_testset.py +1 -0
- agenta/client/backend/types/lm_providers_enum.py +21 -0
- agenta/client/backend/types/permission.py +0 -1
- agenta/client/backend/variants/client.py +0 -66
- agenta/sdk/decorators/routing.py +0 -102
- {agenta-0.30.0.dist-info → agenta-0.30.0a2.dist-info}/METADATA +3 -4
- {agenta-0.30.0.dist-info → agenta-0.30.0a2.dist-info}/RECORD +26 -44
- {agenta-0.30.0.dist-info → agenta-0.30.0a2.dist-info}/WHEEL +1 -1
- agenta/client/backend/access_control/__init__.py +0 -1
- agenta/client/backend/access_control/client.py +0 -167
- agenta/client/backend/observability_v_1/types/query_analytics_response.py +0 -7
- agenta/client/backend/scopes/__init__.py +0 -1
- agenta/client/backend/scopes/client.py +0 -114
- agenta/client/backend/types/analytics_response.py +0 -24
- agenta/client/backend/types/bucket_dto.py +0 -26
- agenta/client/backend/types/header_dto.py +0 -22
- agenta/client/backend/types/legacy_analytics_response.py +0 -29
- agenta/client/backend/types/legacy_data_point.py +0 -27
- agenta/client/backend/types/metrics_dto.py +0 -24
- agenta/client/backend/types/projects_response.py +0 -28
- agenta/client/backend/types/provider_key_dto.py +0 -23
- agenta/client/backend/types/provider_kind.py +0 -21
- agenta/client/backend/types/secret_dto.py +0 -24
- agenta/client/backend/types/secret_kind.py +0 -5
- agenta/client/backend/types/secret_response_dto.py +0 -27
- agenta/client/backend/vault/__init__.py +0 -1
- agenta/client/backend/vault/client.py +0 -685
- {agenta-0.30.0.dist-info → agenta-0.30.0a2.dist-info}/entry_points.txt +0 -0
|
@@ -9,13 +9,11 @@ from .agenta_tree_dto import AgentaTreeDto
|
|
|
9
9
|
from .agenta_trees_response import AgentaTreesResponse
|
|
10
10
|
from .aggregated_result import AggregatedResult
|
|
11
11
|
from .aggregated_result_evaluator_config import AggregatedResultEvaluatorConfig
|
|
12
|
-
from .analytics_response import AnalyticsResponse
|
|
13
12
|
from .app import App
|
|
14
13
|
from .app_variant_response import AppVariantResponse
|
|
15
14
|
from .app_variant_revision import AppVariantRevision
|
|
16
15
|
from .base_output import BaseOutput
|
|
17
16
|
from .body_import_testset import BodyImportTestset
|
|
18
|
-
from .bucket_dto import BucketDto
|
|
19
17
|
from .collect_status_response import CollectStatusResponse
|
|
20
18
|
from .config_db import ConfigDb
|
|
21
19
|
from .config_dto import ConfigDto
|
|
@@ -43,7 +41,6 @@ from .evaluator_mapping_output_interface import EvaluatorMappingOutputInterface
|
|
|
43
41
|
from .evaluator_output_interface import EvaluatorOutputInterface
|
|
44
42
|
from .exception_dto import ExceptionDto
|
|
45
43
|
from .get_config_response import GetConfigResponse
|
|
46
|
-
from .header_dto import HeaderDto
|
|
47
44
|
from .http_validation_error import HttpValidationError
|
|
48
45
|
from .human_evaluation import HumanEvaluation
|
|
49
46
|
from .human_evaluation_scenario import HumanEvaluationScenario
|
|
@@ -53,14 +50,12 @@ from .human_evaluation_scenario_update import HumanEvaluationScenarioUpdate
|
|
|
53
50
|
from .human_evaluation_update import HumanEvaluationUpdate
|
|
54
51
|
from .image import Image
|
|
55
52
|
from .invite_request import InviteRequest
|
|
56
|
-
from .legacy_analytics_response import LegacyAnalyticsResponse
|
|
57
|
-
from .legacy_data_point import LegacyDataPoint
|
|
58
53
|
from .lifecycle_dto import LifecycleDto
|
|
59
54
|
from .link_dto import LinkDto
|
|
60
55
|
from .list_api_keys_response import ListApiKeysResponse
|
|
61
56
|
from .llm_run_rate_limit import LlmRunRateLimit
|
|
62
57
|
from .llm_tokens import LlmTokens
|
|
63
|
-
from .
|
|
58
|
+
from .lm_providers_enum import LmProvidersEnum
|
|
64
59
|
from .new_human_evaluation import NewHumanEvaluation
|
|
65
60
|
from .new_testset import NewTestset
|
|
66
61
|
from .node_dto import NodeDto
|
|
@@ -78,17 +73,11 @@ from .organization_output import OrganizationOutput
|
|
|
78
73
|
from .outputs import Outputs
|
|
79
74
|
from .parent_dto import ParentDto
|
|
80
75
|
from .permission import Permission
|
|
81
|
-
from .projects_response import ProjectsResponse
|
|
82
|
-
from .provider_key_dto import ProviderKeyDto
|
|
83
|
-
from .provider_kind import ProviderKind
|
|
84
76
|
from .reference_dto import ReferenceDto
|
|
85
77
|
from .reference_request_model import ReferenceRequestModel
|
|
86
78
|
from .result import Result
|
|
87
79
|
from .root_dto import RootDto
|
|
88
80
|
from .score import Score
|
|
89
|
-
from .secret_dto import SecretDto
|
|
90
|
-
from .secret_kind import SecretKind
|
|
91
|
-
from .secret_response_dto import SecretResponseDto
|
|
92
81
|
from .simple_evaluation_output import SimpleEvaluationOutput
|
|
93
82
|
from .span import Span
|
|
94
83
|
from .span_detail import SpanDetail
|
|
@@ -129,13 +118,11 @@ __all__ = [
|
|
|
129
118
|
"AgentaTreesResponse",
|
|
130
119
|
"AggregatedResult",
|
|
131
120
|
"AggregatedResultEvaluatorConfig",
|
|
132
|
-
"AnalyticsResponse",
|
|
133
121
|
"App",
|
|
134
122
|
"AppVariantResponse",
|
|
135
123
|
"AppVariantRevision",
|
|
136
124
|
"BaseOutput",
|
|
137
125
|
"BodyImportTestset",
|
|
138
|
-
"BucketDto",
|
|
139
126
|
"CollectStatusResponse",
|
|
140
127
|
"ConfigDb",
|
|
141
128
|
"ConfigDto",
|
|
@@ -163,7 +150,6 @@ __all__ = [
|
|
|
163
150
|
"EvaluatorOutputInterface",
|
|
164
151
|
"ExceptionDto",
|
|
165
152
|
"GetConfigResponse",
|
|
166
|
-
"HeaderDto",
|
|
167
153
|
"HttpValidationError",
|
|
168
154
|
"HumanEvaluation",
|
|
169
155
|
"HumanEvaluationScenario",
|
|
@@ -173,14 +159,12 @@ __all__ = [
|
|
|
173
159
|
"HumanEvaluationUpdate",
|
|
174
160
|
"Image",
|
|
175
161
|
"InviteRequest",
|
|
176
|
-
"LegacyAnalyticsResponse",
|
|
177
|
-
"LegacyDataPoint",
|
|
178
162
|
"LifecycleDto",
|
|
179
163
|
"LinkDto",
|
|
180
164
|
"ListApiKeysResponse",
|
|
181
165
|
"LlmRunRateLimit",
|
|
182
166
|
"LlmTokens",
|
|
183
|
-
"
|
|
167
|
+
"LmProvidersEnum",
|
|
184
168
|
"NewHumanEvaluation",
|
|
185
169
|
"NewTestset",
|
|
186
170
|
"NodeDto",
|
|
@@ -198,17 +182,11 @@ __all__ = [
|
|
|
198
182
|
"Outputs",
|
|
199
183
|
"ParentDto",
|
|
200
184
|
"Permission",
|
|
201
|
-
"ProjectsResponse",
|
|
202
|
-
"ProviderKeyDto",
|
|
203
|
-
"ProviderKind",
|
|
204
185
|
"ReferenceDto",
|
|
205
186
|
"ReferenceRequestModel",
|
|
206
187
|
"Result",
|
|
207
188
|
"RootDto",
|
|
208
189
|
"Score",
|
|
209
|
-
"SecretDto",
|
|
210
|
-
"SecretKind",
|
|
211
|
-
"SecretResponseDto",
|
|
212
190
|
"SimpleEvaluationOutput",
|
|
213
191
|
"Span",
|
|
214
192
|
"SpanDetail",
|
|
@@ -1,15 +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
|
|
5
4
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
5
|
+
import typing
|
|
6
6
|
import pydantic
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class App(UniversalBaseModel):
|
|
10
10
|
app_id: str
|
|
11
11
|
app_name: str
|
|
12
|
-
app_type: typing.Optional[str] = None
|
|
13
12
|
updated_at: str
|
|
14
13
|
|
|
15
14
|
if IS_PYDANTIC_V2:
|
|
@@ -9,6 +9,7 @@ import pydantic
|
|
|
9
9
|
class BodyImportTestset(UniversalBaseModel):
|
|
10
10
|
endpoint: typing.Optional[str] = None
|
|
11
11
|
testset_name: typing.Optional[str] = None
|
|
12
|
+
app_id: typing.Optional[str] = None
|
|
12
13
|
|
|
13
14
|
if IS_PYDANTIC_V2:
|
|
14
15
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
LmProvidersEnum = typing.Union[
|
|
6
|
+
typing.Literal[
|
|
7
|
+
"OPENAI_API_KEY",
|
|
8
|
+
"MISTRAL_API_KEY",
|
|
9
|
+
"COHERE_API_KEY",
|
|
10
|
+
"ANTHROPIC_API_KEY",
|
|
11
|
+
"ANYSCALE_API_KEY",
|
|
12
|
+
"PERPLEXITYAI_API_KEY",
|
|
13
|
+
"DEEPINFRA_API_KEY",
|
|
14
|
+
"TOGETHERAI_API_KEY",
|
|
15
|
+
"ALEPHALPHA_API_KEY",
|
|
16
|
+
"OPENROUTER_API_KEY",
|
|
17
|
+
"GROQ_API_KEY",
|
|
18
|
+
"GEMINI_API_KEY",
|
|
19
|
+
],
|
|
20
|
+
typing.Any,
|
|
21
|
+
]
|
|
@@ -97,9 +97,6 @@ class VariantsClient:
|
|
|
97
97
|
"new_config_name": new_config_name,
|
|
98
98
|
"parameters": parameters,
|
|
99
99
|
},
|
|
100
|
-
headers={
|
|
101
|
-
"content-type": "application/json",
|
|
102
|
-
},
|
|
103
100
|
request_options=request_options,
|
|
104
101
|
omit=OMIT,
|
|
105
102
|
)
|
|
@@ -252,9 +249,6 @@ class VariantsClient:
|
|
|
252
249
|
object_=env_vars, annotation=DockerEnvVars, direction="write"
|
|
253
250
|
),
|
|
254
251
|
},
|
|
255
|
-
headers={
|
|
256
|
-
"content-type": "application/json",
|
|
257
|
-
},
|
|
258
252
|
request_options=request_options,
|
|
259
253
|
omit=OMIT,
|
|
260
254
|
)
|
|
@@ -405,9 +399,6 @@ class VariantsClient:
|
|
|
405
399
|
json={
|
|
406
400
|
"parameters": parameters,
|
|
407
401
|
},
|
|
408
|
-
headers={
|
|
409
|
-
"content-type": "application/json",
|
|
410
|
-
},
|
|
411
402
|
request_options=request_options,
|
|
412
403
|
omit=OMIT,
|
|
413
404
|
)
|
|
@@ -766,9 +757,6 @@ class VariantsClient:
|
|
|
766
757
|
direction="write",
|
|
767
758
|
),
|
|
768
759
|
},
|
|
769
|
-
headers={
|
|
770
|
-
"content-type": "application/json",
|
|
771
|
-
},
|
|
772
760
|
request_options=request_options,
|
|
773
761
|
omit=OMIT,
|
|
774
762
|
)
|
|
@@ -851,9 +839,6 @@ class VariantsClient:
|
|
|
851
839
|
direction="write",
|
|
852
840
|
),
|
|
853
841
|
},
|
|
854
|
-
headers={
|
|
855
|
-
"content-type": "application/json",
|
|
856
|
-
},
|
|
857
842
|
request_options=request_options,
|
|
858
843
|
omit=OMIT,
|
|
859
844
|
)
|
|
@@ -936,9 +921,6 @@ class VariantsClient:
|
|
|
936
921
|
direction="write",
|
|
937
922
|
),
|
|
938
923
|
},
|
|
939
|
-
headers={
|
|
940
|
-
"content-type": "application/json",
|
|
941
|
-
},
|
|
942
924
|
request_options=request_options,
|
|
943
925
|
omit=OMIT,
|
|
944
926
|
)
|
|
@@ -1007,9 +989,6 @@ class VariantsClient:
|
|
|
1007
989
|
object_=config, annotation=ConfigDto, direction="write"
|
|
1008
990
|
),
|
|
1009
991
|
},
|
|
1010
|
-
headers={
|
|
1011
|
-
"content-type": "application/json",
|
|
1012
|
-
},
|
|
1013
992
|
request_options=request_options,
|
|
1014
993
|
omit=OMIT,
|
|
1015
994
|
)
|
|
@@ -1095,9 +1074,6 @@ class VariantsClient:
|
|
|
1095
1074
|
direction="write",
|
|
1096
1075
|
),
|
|
1097
1076
|
},
|
|
1098
|
-
headers={
|
|
1099
|
-
"content-type": "application/json",
|
|
1100
|
-
},
|
|
1101
1077
|
request_options=request_options,
|
|
1102
1078
|
omit=OMIT,
|
|
1103
1079
|
)
|
|
@@ -1174,9 +1150,6 @@ class VariantsClient:
|
|
|
1174
1150
|
direction="write",
|
|
1175
1151
|
),
|
|
1176
1152
|
},
|
|
1177
|
-
headers={
|
|
1178
|
-
"content-type": "application/json",
|
|
1179
|
-
},
|
|
1180
1153
|
request_options=request_options,
|
|
1181
1154
|
omit=OMIT,
|
|
1182
1155
|
)
|
|
@@ -1243,9 +1216,6 @@ class VariantsClient:
|
|
|
1243
1216
|
object_=application_ref, annotation=ReferenceDto, direction="write"
|
|
1244
1217
|
),
|
|
1245
1218
|
},
|
|
1246
|
-
headers={
|
|
1247
|
-
"content-type": "application/json",
|
|
1248
|
-
},
|
|
1249
1219
|
request_options=request_options,
|
|
1250
1220
|
omit=OMIT,
|
|
1251
1221
|
)
|
|
@@ -1322,9 +1292,6 @@ class VariantsClient:
|
|
|
1322
1292
|
direction="write",
|
|
1323
1293
|
),
|
|
1324
1294
|
},
|
|
1325
|
-
headers={
|
|
1326
|
-
"content-type": "application/json",
|
|
1327
|
-
},
|
|
1328
1295
|
request_options=request_options,
|
|
1329
1296
|
omit=OMIT,
|
|
1330
1297
|
)
|
|
@@ -1430,9 +1397,6 @@ class AsyncVariantsClient:
|
|
|
1430
1397
|
"new_config_name": new_config_name,
|
|
1431
1398
|
"parameters": parameters,
|
|
1432
1399
|
},
|
|
1433
|
-
headers={
|
|
1434
|
-
"content-type": "application/json",
|
|
1435
|
-
},
|
|
1436
1400
|
request_options=request_options,
|
|
1437
1401
|
omit=OMIT,
|
|
1438
1402
|
)
|
|
@@ -1601,9 +1565,6 @@ class AsyncVariantsClient:
|
|
|
1601
1565
|
object_=env_vars, annotation=DockerEnvVars, direction="write"
|
|
1602
1566
|
),
|
|
1603
1567
|
},
|
|
1604
|
-
headers={
|
|
1605
|
-
"content-type": "application/json",
|
|
1606
|
-
},
|
|
1607
1568
|
request_options=request_options,
|
|
1608
1569
|
omit=OMIT,
|
|
1609
1570
|
)
|
|
@@ -1770,9 +1731,6 @@ class AsyncVariantsClient:
|
|
|
1770
1731
|
json={
|
|
1771
1732
|
"parameters": parameters,
|
|
1772
1733
|
},
|
|
1773
|
-
headers={
|
|
1774
|
-
"content-type": "application/json",
|
|
1775
|
-
},
|
|
1776
1734
|
request_options=request_options,
|
|
1777
1735
|
omit=OMIT,
|
|
1778
1736
|
)
|
|
@@ -2171,9 +2129,6 @@ class AsyncVariantsClient:
|
|
|
2171
2129
|
direction="write",
|
|
2172
2130
|
),
|
|
2173
2131
|
},
|
|
2174
|
-
headers={
|
|
2175
|
-
"content-type": "application/json",
|
|
2176
|
-
},
|
|
2177
2132
|
request_options=request_options,
|
|
2178
2133
|
omit=OMIT,
|
|
2179
2134
|
)
|
|
@@ -2264,9 +2219,6 @@ class AsyncVariantsClient:
|
|
|
2264
2219
|
direction="write",
|
|
2265
2220
|
),
|
|
2266
2221
|
},
|
|
2267
|
-
headers={
|
|
2268
|
-
"content-type": "application/json",
|
|
2269
|
-
},
|
|
2270
2222
|
request_options=request_options,
|
|
2271
2223
|
omit=OMIT,
|
|
2272
2224
|
)
|
|
@@ -2357,9 +2309,6 @@ class AsyncVariantsClient:
|
|
|
2357
2309
|
direction="write",
|
|
2358
2310
|
),
|
|
2359
2311
|
},
|
|
2360
|
-
headers={
|
|
2361
|
-
"content-type": "application/json",
|
|
2362
|
-
},
|
|
2363
2312
|
request_options=request_options,
|
|
2364
2313
|
omit=OMIT,
|
|
2365
2314
|
)
|
|
@@ -2436,9 +2385,6 @@ class AsyncVariantsClient:
|
|
|
2436
2385
|
object_=config, annotation=ConfigDto, direction="write"
|
|
2437
2386
|
),
|
|
2438
2387
|
},
|
|
2439
|
-
headers={
|
|
2440
|
-
"content-type": "application/json",
|
|
2441
|
-
},
|
|
2442
2388
|
request_options=request_options,
|
|
2443
2389
|
omit=OMIT,
|
|
2444
2390
|
)
|
|
@@ -2532,9 +2478,6 @@ class AsyncVariantsClient:
|
|
|
2532
2478
|
direction="write",
|
|
2533
2479
|
),
|
|
2534
2480
|
},
|
|
2535
|
-
headers={
|
|
2536
|
-
"content-type": "application/json",
|
|
2537
|
-
},
|
|
2538
2481
|
request_options=request_options,
|
|
2539
2482
|
omit=OMIT,
|
|
2540
2483
|
)
|
|
@@ -2619,9 +2562,6 @@ class AsyncVariantsClient:
|
|
|
2619
2562
|
direction="write",
|
|
2620
2563
|
),
|
|
2621
2564
|
},
|
|
2622
|
-
headers={
|
|
2623
|
-
"content-type": "application/json",
|
|
2624
|
-
},
|
|
2625
2565
|
request_options=request_options,
|
|
2626
2566
|
omit=OMIT,
|
|
2627
2567
|
)
|
|
@@ -2696,9 +2636,6 @@ class AsyncVariantsClient:
|
|
|
2696
2636
|
object_=application_ref, annotation=ReferenceDto, direction="write"
|
|
2697
2637
|
),
|
|
2698
2638
|
},
|
|
2699
|
-
headers={
|
|
2700
|
-
"content-type": "application/json",
|
|
2701
|
-
},
|
|
2702
2639
|
request_options=request_options,
|
|
2703
2640
|
omit=OMIT,
|
|
2704
2641
|
)
|
|
@@ -2783,9 +2720,6 @@ class AsyncVariantsClient:
|
|
|
2783
2720
|
direction="write",
|
|
2784
2721
|
),
|
|
2785
2722
|
},
|
|
2786
|
-
headers={
|
|
2787
|
-
"content-type": "application/json",
|
|
2788
|
-
},
|
|
2789
2723
|
request_options=request_options,
|
|
2790
2724
|
omit=OMIT,
|
|
2791
2725
|
)
|
agenta/sdk/decorators/routing.py
CHANGED
|
@@ -77,7 +77,6 @@ class route:
|
|
|
77
77
|
self.e = entrypoint(
|
|
78
78
|
f, route_path=self.route_path, config_schema=self.config_schema
|
|
79
79
|
)
|
|
80
|
-
|
|
81
80
|
return f
|
|
82
81
|
|
|
83
82
|
|
|
@@ -306,14 +305,6 @@ class entrypoint:
|
|
|
306
305
|
config=route["config"],
|
|
307
306
|
)
|
|
308
307
|
|
|
309
|
-
if self.is_main_script(func) and route_path == "":
|
|
310
|
-
self.handle_terminal_run(
|
|
311
|
-
func,
|
|
312
|
-
func_signature.parameters, # type: ignore
|
|
313
|
-
config_params,
|
|
314
|
-
ingestible_files,
|
|
315
|
-
)
|
|
316
|
-
|
|
317
308
|
def extract_ingestible_files(
|
|
318
309
|
self,
|
|
319
310
|
func_signature: Signature,
|
|
@@ -615,99 +606,6 @@ class entrypoint:
|
|
|
615
606
|
"""
|
|
616
607
|
return func.__module__ == "__main__"
|
|
617
608
|
|
|
618
|
-
def handle_terminal_run(
|
|
619
|
-
self,
|
|
620
|
-
func: Callable,
|
|
621
|
-
func_params: Dict[str, Parameter],
|
|
622
|
-
config_params: Dict[str, Any],
|
|
623
|
-
ingestible_files: Dict,
|
|
624
|
-
):
|
|
625
|
-
"""
|
|
626
|
-
Parses command line arguments and sets configuration when script is run from the terminal.
|
|
627
|
-
|
|
628
|
-
Args:
|
|
629
|
-
func_params (dict): A dictionary containing the function parameters and their annotations.
|
|
630
|
-
config_params (dict): A dictionary containing the configuration parameters.
|
|
631
|
-
ingestible_files (dict): A dictionary containing the files that should be ingested.
|
|
632
|
-
"""
|
|
633
|
-
|
|
634
|
-
# For required parameters, we add them as arguments
|
|
635
|
-
parser = ArgumentParser()
|
|
636
|
-
for name, param in func_params.items():
|
|
637
|
-
if name in ingestible_files:
|
|
638
|
-
parser.add_argument(name, type=str)
|
|
639
|
-
else:
|
|
640
|
-
parser.add_argument(name, type=param.annotation)
|
|
641
|
-
|
|
642
|
-
for name, param in config_params.items():
|
|
643
|
-
if type(param) is MultipleChoiceParam:
|
|
644
|
-
parser.add_argument(
|
|
645
|
-
f"--{name}",
|
|
646
|
-
type=str,
|
|
647
|
-
default=param.default,
|
|
648
|
-
choices=param.choices, # type: ignore
|
|
649
|
-
)
|
|
650
|
-
else:
|
|
651
|
-
parser.add_argument(
|
|
652
|
-
f"--{name}",
|
|
653
|
-
type=type(param),
|
|
654
|
-
default=param,
|
|
655
|
-
)
|
|
656
|
-
|
|
657
|
-
args = parser.parse_args()
|
|
658
|
-
|
|
659
|
-
# split the arg list into the arg in the app_param and
|
|
660
|
-
# the args from the sig.parameter
|
|
661
|
-
args_config_params = {k: v for k, v in vars(args).items() if k in config_params}
|
|
662
|
-
args_func_params = {
|
|
663
|
-
k: v for k, v in vars(args).items() if k not in config_params
|
|
664
|
-
}
|
|
665
|
-
for name in ingestible_files:
|
|
666
|
-
args_func_params[name] = InFile(
|
|
667
|
-
file_name=Path(args_func_params[name]).stem,
|
|
668
|
-
file_path=args_func_params[name],
|
|
669
|
-
)
|
|
670
|
-
|
|
671
|
-
# Update args_config_params with default values from config_params if not provided in command line arguments
|
|
672
|
-
args_config_params.update(
|
|
673
|
-
{
|
|
674
|
-
key: value
|
|
675
|
-
for key, value in config_params.items()
|
|
676
|
-
if key not in args_config_params
|
|
677
|
-
}
|
|
678
|
-
)
|
|
679
|
-
|
|
680
|
-
loop = get_event_loop()
|
|
681
|
-
|
|
682
|
-
with routing_context_manager(config=args_config_params):
|
|
683
|
-
result = loop.run_until_complete(
|
|
684
|
-
self.execute_function(
|
|
685
|
-
func,
|
|
686
|
-
True, # inline trace: True
|
|
687
|
-
**{"params": args_func_params, "config_params": args_config_params},
|
|
688
|
-
)
|
|
689
|
-
)
|
|
690
|
-
|
|
691
|
-
if result.trace:
|
|
692
|
-
log.info("\n========= Result =========\n")
|
|
693
|
-
|
|
694
|
-
log.info(f"trace_id: {result.trace['trace_id']}")
|
|
695
|
-
log.info(f"latency: {result.trace.get('latency')}")
|
|
696
|
-
log.info(f"cost: {result.trace.get('cost')}")
|
|
697
|
-
log.info(f"usage: {list(result.trace.get('usage', {}).values())}")
|
|
698
|
-
|
|
699
|
-
log.info(" ")
|
|
700
|
-
log.info("data:")
|
|
701
|
-
log.info(dumps(result.data, indent=2))
|
|
702
|
-
|
|
703
|
-
log.info(" ")
|
|
704
|
-
log.info("trace:")
|
|
705
|
-
log.info("----------------")
|
|
706
|
-
log.info(dumps(result.trace.get("spans", []), indent=2))
|
|
707
|
-
log.info("----------------")
|
|
708
|
-
|
|
709
|
-
log.info("\n==========================\n")
|
|
710
|
-
|
|
711
609
|
def override_config_in_schema(
|
|
712
610
|
self,
|
|
713
611
|
openapi_schema: dict,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
2
|
Name: agenta
|
|
3
|
-
Version: 0.30.
|
|
3
|
+
Version: 0.30.0a2
|
|
4
4
|
Summary: The SDK for agenta is an open-source LLMOps platform.
|
|
5
5
|
Home-page: https://agenta.ai
|
|
6
6
|
Keywords: LLMOps,LLM,evaluation,prompt engineering
|
|
@@ -13,8 +13,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.9
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.10
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
18
17
|
Classifier: Topic :: Software Development :: Libraries
|
|
19
18
|
Requires-Dist: cachetools (>=5.3.3,<6.0.0)
|
|
20
19
|
Requires-Dist: click (>=8.1.3,<9.0.0)
|