agenta 0.43.1__py3-none-any.whl → 0.44.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/sdk/agenta_init.py +1 -1
- agenta/sdk/decorators/routing.py +1 -1
- agenta/sdk/litellm/litellm.py +1 -1
- agenta/sdk/managers/apps.py +34 -5
- agenta/sdk/managers/config.py +8 -11
- agenta/sdk/managers/shared.py +1 -1
- agenta/sdk/middleware/auth.py +1 -1
- agenta/sdk/tracing/exporters.py +1 -1
- agenta/sdk/tracing/processors.py +1 -1
- agenta/sdk/tracing/tracing.py +1 -1
- agenta/sdk/utils/exceptions.py +1 -1
- agenta/sdk/utils/timing.py +1 -1
- {agenta-0.43.1.dist-info → agenta-0.44.0.dist-info}/METADATA +3 -2
- {agenta-0.43.1.dist-info → agenta-0.44.0.dist-info}/RECORD +15 -15
- {agenta-0.43.1.dist-info → agenta-0.44.0.dist-info}/WHEEL +1 -1
agenta/sdk/agenta_init.py
CHANGED
agenta/sdk/decorators/routing.py
CHANGED
agenta/sdk/litellm/litellm.py
CHANGED
|
@@ -7,7 +7,7 @@ from agenta.sdk.tracing.spans import CustomSpan
|
|
|
7
7
|
from agenta.sdk.utils.exceptions import suppress # TODO: use it !
|
|
8
8
|
from agenta.sdk.utils.logging import get_module_logger
|
|
9
9
|
|
|
10
|
-
log = get_module_logger(
|
|
10
|
+
log = get_module_logger(__name__)
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
def litellm_handler():
|
agenta/sdk/managers/apps.py
CHANGED
|
@@ -1,25 +1,54 @@
|
|
|
1
|
+
from typing import Optional, Literal
|
|
2
|
+
|
|
1
3
|
from agenta.sdk.utils.logging import get_module_logger
|
|
2
4
|
from agenta.sdk.utils.exceptions import handle_exceptions
|
|
3
5
|
|
|
4
6
|
import agenta as ag
|
|
5
7
|
|
|
6
|
-
log = get_module_logger(
|
|
8
|
+
log = get_module_logger(__name__)
|
|
9
|
+
|
|
10
|
+
AppType = Literal["SERVICE:completion", "SERVICE:chat", "CUSTOM"]
|
|
11
|
+
|
|
12
|
+
DEFAULT_APP_TYPE = "SERVICE:completion"
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
AppType = Literal["SERVICE:completion", "SERVICE:chat", "CUSTOM"]
|
|
16
|
+
|
|
17
|
+
DEFAULT_APP_TYPE = "SERVICE:completion"
|
|
7
18
|
|
|
8
19
|
|
|
9
20
|
class AppManager:
|
|
10
21
|
@classmethod
|
|
11
22
|
@handle_exceptions()
|
|
12
|
-
def create(
|
|
23
|
+
def create(
|
|
24
|
+
cls,
|
|
25
|
+
*,
|
|
26
|
+
app_slug: str,
|
|
27
|
+
template_key: Optional[AppType] = None,
|
|
28
|
+
app_type: Optional[AppType] = DEFAULT_APP_TYPE,
|
|
29
|
+
):
|
|
30
|
+
template_key = template_key or app_type
|
|
31
|
+
|
|
13
32
|
app_response = ag.api.apps.create_app(
|
|
14
|
-
app_name=app_slug,
|
|
33
|
+
app_name=app_slug,
|
|
34
|
+
template_key=template_key,
|
|
15
35
|
)
|
|
16
36
|
return app_response
|
|
17
37
|
|
|
18
38
|
@classmethod
|
|
19
39
|
@handle_exceptions()
|
|
20
|
-
async def acreate(
|
|
40
|
+
async def acreate(
|
|
41
|
+
cls,
|
|
42
|
+
*,
|
|
43
|
+
app_slug: str,
|
|
44
|
+
template_key: Optional[AppType] = None,
|
|
45
|
+
app_type: Optional[AppType] = DEFAULT_APP_TYPE,
|
|
46
|
+
):
|
|
47
|
+
template_key = template_key or app_type
|
|
48
|
+
|
|
21
49
|
app_response = await ag.async_api.apps.create_app(
|
|
22
|
-
app_name=app_slug,
|
|
50
|
+
app_name=app_slug,
|
|
51
|
+
template_key=template_key,
|
|
23
52
|
)
|
|
24
53
|
return app_response
|
|
25
54
|
|
agenta/sdk/managers/config.py
CHANGED
|
@@ -11,7 +11,7 @@ from agenta.sdk.context.routing import routing_context
|
|
|
11
11
|
|
|
12
12
|
T = TypeVar("T", bound=BaseModel)
|
|
13
13
|
|
|
14
|
-
log = get_module_logger(
|
|
14
|
+
log = get_module_logger(__name__)
|
|
15
15
|
|
|
16
16
|
AVAILABLE_ENVIRONMENTS = ["development", "production", "staging"]
|
|
17
17
|
|
|
@@ -51,10 +51,10 @@ class ConfigManager:
|
|
|
51
51
|
|
|
52
52
|
if not parameters:
|
|
53
53
|
return None
|
|
54
|
-
|
|
55
|
-
parameters = parameters["ag_config"]
|
|
54
|
+
|
|
56
55
|
if not schema:
|
|
57
56
|
return parameters
|
|
57
|
+
|
|
58
58
|
return schema(**parameters)
|
|
59
59
|
|
|
60
60
|
@staticmethod
|
|
@@ -97,10 +97,9 @@ class ConfigManager:
|
|
|
97
97
|
environment_slug=environment_slug,
|
|
98
98
|
environment_version=environment_version,
|
|
99
99
|
)
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
params = config.params
|
|
100
|
+
|
|
101
|
+
params = config.params
|
|
102
|
+
|
|
104
103
|
if schema:
|
|
105
104
|
return schema(**params)
|
|
106
105
|
|
|
@@ -146,10 +145,8 @@ class ConfigManager:
|
|
|
146
145
|
environment_slug=environment_slug,
|
|
147
146
|
environment_version=environment_version,
|
|
148
147
|
)
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
else:
|
|
152
|
-
params = config.params
|
|
148
|
+
|
|
149
|
+
params = config.params
|
|
153
150
|
|
|
154
151
|
if schema:
|
|
155
152
|
return schema(**params)
|
agenta/sdk/managers/shared.py
CHANGED
agenta/sdk/middleware/auth.py
CHANGED
agenta/sdk/tracing/exporters.py
CHANGED
agenta/sdk/tracing/processors.py
CHANGED
|
@@ -16,7 +16,7 @@ from opentelemetry.sdk.trace.export import (
|
|
|
16
16
|
from agenta.sdk.utils.logging import get_module_logger
|
|
17
17
|
from agenta.sdk.tracing.conventions import Reference
|
|
18
18
|
|
|
19
|
-
log = get_module_logger(
|
|
19
|
+
log = get_module_logger(__name__)
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
class TraceProcessor(BatchSpanProcessor):
|
agenta/sdk/tracing/tracing.py
CHANGED
|
@@ -24,7 +24,7 @@ from agenta.sdk.tracing.conventions import Reference, is_valid_attribute_key
|
|
|
24
24
|
from agenta.sdk.tracing.propagation import extract, inject
|
|
25
25
|
from agenta.sdk.utils.cache import TTLLRUCache
|
|
26
26
|
|
|
27
|
-
log = get_module_logger(
|
|
27
|
+
log = get_module_logger(__name__)
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
class Tracing(metaclass=Singleton):
|
agenta/sdk/utils/exceptions.py
CHANGED
agenta/sdk/utils/timing.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: agenta
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.44.0
|
|
4
4
|
Summary: The SDK for agenta is an open-source LLMOps platform.
|
|
5
5
|
Keywords: LLMOps,LLM,evaluation,prompt engineering
|
|
6
6
|
Author: Mahmoud Mabrouk
|
|
@@ -16,7 +16,8 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.13
|
|
17
17
|
Classifier: Topic :: Software Development :: Libraries
|
|
18
18
|
Requires-Dist: fastapi (>=0.100.0)
|
|
19
|
-
Requires-Dist:
|
|
19
|
+
Requires-Dist: h11 (>=0.16.0)
|
|
20
|
+
Requires-Dist: httpx (>=0.28.0)
|
|
20
21
|
Requires-Dist: importlib-metadata (>=8.0.0,<9.0)
|
|
21
22
|
Requires-Dist: jinja2 (>=3.1.6,<4.0.0)
|
|
22
23
|
Requires-Dist: litellm (>=1.61.15,<2.0.0)
|
|
@@ -199,29 +199,29 @@ agenta/client/types/provider_kind.py~feat_model-registry,sha256=u_fXncQyXH3pfh2w
|
|
|
199
199
|
agenta/config.py,sha256=0VrTqduB4g8Mt_Ll7ffFcEjKF5qjTUIxmUtTPW2ygWw,653
|
|
200
200
|
agenta/config.toml,sha256=sIORbhnyct2R9lJrquxhNL4pHul3O0R7iaipCoja5MY,193
|
|
201
201
|
agenta/sdk/__init__.py,sha256=m5UxAteSVzJtYhSsmUmdGFsyFdZO6jlfvOpJi_4mK_E,2118
|
|
202
|
-
agenta/sdk/agenta_init.py,sha256=
|
|
202
|
+
agenta/sdk/agenta_init.py,sha256=fZQdPO0i9fub17N7KmUamT2OgAmQekwRo7iFpg8hfL0,6111
|
|
203
203
|
agenta/sdk/assets.py,sha256=z6pUK5b9dZMD7vaaghDu1w9lMD_IopspbgVxmop5PLY,8181
|
|
204
204
|
agenta/sdk/context/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
205
205
|
agenta/sdk/context/exporting.py,sha256=16X8fgMhl58gehSlqANX97FiKxx4TkGiG4d2B0-7ZX0,516
|
|
206
206
|
agenta/sdk/context/routing.py,sha256=FEsjw8EttI1SMyUo96ptcUsvHJnhoKwdr1szlkxxJNU,598
|
|
207
207
|
agenta/sdk/context/tracing.py,sha256=xjErrXP1Nq1AfL-Cif1l-lNEfs12eQ3v_VCRgoKe7nY,743
|
|
208
208
|
agenta/sdk/decorators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
209
|
-
agenta/sdk/decorators/routing.py,sha256=
|
|
209
|
+
agenta/sdk/decorators/routing.py,sha256=B3nplfdFk774KLf_cs72ovx_06nfdpYM8tp6RHd38Z0,24799
|
|
210
210
|
agenta/sdk/decorators/tracing.py,sha256=n3AZWw8HHKUoIHD79_ktPQcoZRIw3RthSxU5xkO-skg,10109
|
|
211
211
|
agenta/sdk/litellm/__init__.py,sha256=Bpz1gfHQc0MN1yolWcjifLWznv6GjHggvRGQSpxpihM,37
|
|
212
|
-
agenta/sdk/litellm/litellm.py,sha256=
|
|
212
|
+
agenta/sdk/litellm/litellm.py,sha256=dCjw0H_jD3L3UQ3l9SbLm5dfeIGnel6dPtQYJ78beYM,10202
|
|
213
213
|
agenta/sdk/litellm/mockllm.py,sha256=8V6dqdv8eA4P-VoXIwHNYlIjHG189P14POSfSfluVw0,678
|
|
214
214
|
agenta/sdk/litellm/mocks/__init__.py,sha256=0bGjOOWXz8BxE0rvRWciPP7SAegO2mgi_UtWw8jTlDk,866
|
|
215
215
|
agenta/sdk/managers/__init__.py,sha256=SN-LRwG0pRRDV3u2Q4JiiSTigN3-mYpzGNM35RzT4mc,238
|
|
216
|
-
agenta/sdk/managers/apps.py,sha256=
|
|
217
|
-
agenta/sdk/managers/config.py,sha256=
|
|
216
|
+
agenta/sdk/managers/apps.py,sha256=hfkXat6cgZUDdW02LlMaMgO1e05m1Me3BKgSyFF9kVc,2359
|
|
217
|
+
agenta/sdk/managers/config.py,sha256=Dl1L4KGvj3h_temzJzn7FVHacABRuB2Q7_x98EpZJQo,7494
|
|
218
218
|
agenta/sdk/managers/deployment.py,sha256=SEokjZeh6n7HRKZ92Y0WncdG49hIFx-Z3B3HAl2kmUg,1174
|
|
219
219
|
agenta/sdk/managers/secrets.py,sha256=QFWLQY3Enev187sNOvV3yBBYFwcPoDnInwgwlRD0SEw,7458
|
|
220
|
-
agenta/sdk/managers/shared.py,sha256=
|
|
220
|
+
agenta/sdk/managers/shared.py,sha256=kI3w74E4rS3YDORG2e-_r0Pz5KslTRzRBK7vgyOeaJA,21559
|
|
221
221
|
agenta/sdk/managers/variant.py,sha256=A5ga3mq3b0weUTXa9HO72MGaspthGcu1uK9K5OnP738,4172
|
|
222
222
|
agenta/sdk/managers/vault.py,sha256=054ce9X_xKa2M4NtQWz-GugO6q_pYVWCP3IxbAJJcRw,337
|
|
223
223
|
agenta/sdk/middleware/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
224
|
-
agenta/sdk/middleware/auth.py,sha256=
|
|
224
|
+
agenta/sdk/middleware/auth.py,sha256=xS8lVlPmapvxz_bbZ2XPxcllA0kK7iFR8TMoMVymp4M,10156
|
|
225
225
|
agenta/sdk/middleware/config.py,sha256=9yFFlrkcoGNczj0ZfkbliWIt1S84cnEvB4RMCzdbBWc,7715
|
|
226
226
|
agenta/sdk/middleware/cors.py,sha256=q3r7lGkrIdMcT_vuhsburMcjG7pyl7w0ycxrIrGJ2e8,921
|
|
227
227
|
agenta/sdk/middleware/inline.py,sha256=ee8E4XBGcRSrHTvblqX1yRXuTN_sxLm7lY1jnywrBG8,901
|
|
@@ -232,24 +232,24 @@ agenta/sdk/router.py,sha256=mOguvtOwl2wmyAgOuWTsf98pQwpNiUILKIo67W_hR3A,119
|
|
|
232
232
|
agenta/sdk/tracing/__init__.py,sha256=rQNe5-zT5Kt7_CDhq-lnUIi1EYTBVzVf_MbfcIxVD98,41
|
|
233
233
|
agenta/sdk/tracing/attributes.py,sha256=DwjjOk3mGOvz0jYu8EYr3hhItvawK5GX80_MfciqPrc,5559
|
|
234
234
|
agenta/sdk/tracing/conventions.py,sha256=JBtznBXZ3aRkGKkLl7cPwdMNh3w1G-H2Ta2YrAxbr38,950
|
|
235
|
-
agenta/sdk/tracing/exporters.py,sha256=
|
|
235
|
+
agenta/sdk/tracing/exporters.py,sha256=Vs1aQLRrWvYgWxjPmlfBWTN4wmUzBREqjTdIV1XcV9o,3251
|
|
236
236
|
agenta/sdk/tracing/inline.py,sha256=tY9mH1zMlJMqf2WWKJdakLtMHJKNeYRaynqvsPeqpTY,31312
|
|
237
|
-
agenta/sdk/tracing/processors.py,sha256=
|
|
237
|
+
agenta/sdk/tracing/processors.py,sha256=MZZvvjL2HeFIS2TKX0nrxTenoY0_oKHdNEU7QgxeNpk,4310
|
|
238
238
|
agenta/sdk/tracing/propagation.py,sha256=EeOqDMqnh_MoEhGd1do_vy_tQBYUcoC8kpLqVoZeqg0,2561
|
|
239
239
|
agenta/sdk/tracing/spans.py,sha256=nqUOjjirBxB8Eacv8Qj4Ra_6rknGi3lbJdNyKmk5ODQ,3707
|
|
240
|
-
agenta/sdk/tracing/tracing.py,sha256=
|
|
240
|
+
agenta/sdk/tracing/tracing.py,sha256=62y9ZAs8ZfjOZmlTYVHniewqZRZeNwz76XGd8cczmY4,7211
|
|
241
241
|
agenta/sdk/types.py,sha256=247cPB451E91icR198wTXvJG0Hgm2HNtC0H2MmqUwTE,19042
|
|
242
242
|
agenta/sdk/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
243
243
|
agenta/sdk/utils/cache.py,sha256=69pQCtmh10DiYoOdKv4t2fCYDQCuWZtH4uy36kXewpw,1372
|
|
244
244
|
agenta/sdk/utils/constants.py,sha256=zW3R4rjXOo2L5lz6q84l_zYuOM9u4mpPRHw_B1Dr_hI,67
|
|
245
245
|
agenta/sdk/utils/costs.py,sha256=i8C7ud__pThLS55XkN4YW8czXtGeXr2mx7jjcOFeiXg,5955
|
|
246
|
-
agenta/sdk/utils/exceptions.py,sha256=
|
|
246
|
+
agenta/sdk/utils/exceptions.py,sha256=Dq3lh5Ug7IhF4nvYRXXlwhgxEuByOnT1w0uVMZx1eaM,1504
|
|
247
247
|
agenta/sdk/utils/globals.py,sha256=9ixKS8aI6ZWgsjT8WngvTg4dsnP2cKErNJngHxzdK9U,256
|
|
248
248
|
agenta/sdk/utils/helpers.py,sha256=utrxDoELpR6QgFgHCEAWrWW4TYWXA10q72Gs5R78Ens,181
|
|
249
249
|
agenta/sdk/utils/logging.py,sha256=gBk2ecRvltN7f8qtnUHXBiZPWOdArN_b5civ_3w_Oek,8225
|
|
250
250
|
agenta/sdk/utils/preinit.py,sha256=YlJL7RLfel0R7DFp-jK7OV-z4ZIQJM0oupYlk7g8b5o,1278
|
|
251
251
|
agenta/sdk/utils/singleton.py,sha256=17Ph7LGnnV8HkPjImruKita2ni03Ari5jr0jqm__4sc,312
|
|
252
|
-
agenta/sdk/utils/timing.py,sha256=
|
|
253
|
-
agenta-0.
|
|
254
|
-
agenta-0.
|
|
255
|
-
agenta-0.
|
|
252
|
+
agenta/sdk/utils/timing.py,sha256=nZR-kudVUtKFlHuBhztgSGxj7FVnCB4Uv6sfg-1dkrQ,1556
|
|
253
|
+
agenta-0.44.0.dist-info/METADATA,sha256=rMuaT_v7rmsHlzIWnk-lmmQHiXLKQE4Uw46ltLbK8cU,31385
|
|
254
|
+
agenta-0.44.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
255
|
+
agenta-0.44.0.dist-info/RECORD,,
|