agenta 0.27.0a15__py3-none-any.whl → 0.27.2__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 +1 -0
- agenta/sdk/__init__.py +1 -0
- agenta/sdk/agenta_init.py +7 -9
- agenta/sdk/decorators/routing.py +1 -1
- agenta/sdk/managers/config.py +2 -2
- agenta/sdk/types.py +15 -1
- {agenta-0.27.0a15.dist-info → agenta-0.27.2.dist-info}/METADATA +1 -1
- {agenta-0.27.0a15.dist-info → agenta-0.27.2.dist-info}/RECORD +10 -10
- {agenta-0.27.0a15.dist-info → agenta-0.27.2.dist-info}/WHEEL +0 -0
- {agenta-0.27.0a15.dist-info → agenta-0.27.2.dist-info}/entry_points.txt +0 -0
agenta/__init__.py
CHANGED
agenta/sdk/__init__.py
CHANGED
agenta/sdk/agenta_init.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import os
|
|
2
1
|
import logging
|
|
3
2
|
import toml
|
|
3
|
+
from os import getenv
|
|
4
4
|
from typing import Optional
|
|
5
5
|
from importlib.metadata import version
|
|
6
6
|
|
|
@@ -72,13 +72,13 @@ class AgentaSingleton:
|
|
|
72
72
|
|
|
73
73
|
self.host = (
|
|
74
74
|
host
|
|
75
|
-
or
|
|
75
|
+
or getenv("AGENTA_HOST")
|
|
76
76
|
or config.get("backend_host")
|
|
77
77
|
or config.get("host")
|
|
78
78
|
or "https://cloud.agenta.ai"
|
|
79
79
|
)
|
|
80
80
|
|
|
81
|
-
self.app_id = app_id or config.get("app_id") or
|
|
81
|
+
self.app_id = app_id or config.get("app_id") or getenv("AGENTA_APP_ID")
|
|
82
82
|
# if not self.app_id:
|
|
83
83
|
# raise ValueError(
|
|
84
84
|
# "App ID must be specified. You can provide it in one of the following ways:\n"
|
|
@@ -87,9 +87,7 @@ class AgentaSingleton:
|
|
|
87
87
|
# "3. As an environment variable 'AGENTA_APP_ID'."
|
|
88
88
|
# )
|
|
89
89
|
|
|
90
|
-
self.api_key = (
|
|
91
|
-
api_key or os.environ.get("AGENTA_API_KEY") or config.get("api_key")
|
|
92
|
-
)
|
|
90
|
+
self.api_key = api_key or getenv("AGENTA_API_KEY") or config.get("api_key")
|
|
93
91
|
|
|
94
92
|
self.tracing = Tracing(
|
|
95
93
|
url=f"{self.host}/api/observability/v1/otlp/traces", # type: ignore
|
|
@@ -103,15 +101,15 @@ class AgentaSingleton:
|
|
|
103
101
|
|
|
104
102
|
self.api = AgentaApi(
|
|
105
103
|
base_url=self.host + "/api",
|
|
106
|
-
api_key=api_key if api_key else "",
|
|
104
|
+
api_key=self.api_key if self.api_key else "",
|
|
107
105
|
)
|
|
108
106
|
|
|
109
107
|
self.async_api = AsyncAgentaApi(
|
|
110
108
|
base_url=self.host + "/api",
|
|
111
|
-
api_key=api_key if api_key else "",
|
|
109
|
+
api_key=self.api_key if self.api_key else "",
|
|
112
110
|
)
|
|
113
111
|
|
|
114
|
-
self.base_id =
|
|
112
|
+
self.base_id = getenv("AGENTA_BASE_ID")
|
|
115
113
|
|
|
116
114
|
self.config = Config(
|
|
117
115
|
host=self.host,
|
agenta/sdk/decorators/routing.py
CHANGED
agenta/sdk/managers/config.py
CHANGED
|
@@ -93,7 +93,7 @@ class ConfigManager:
|
|
|
93
93
|
return parameters
|
|
94
94
|
|
|
95
95
|
@staticmethod
|
|
96
|
-
async def
|
|
96
|
+
async def aget_from_route(
|
|
97
97
|
schema: Optional[Type[T]] = None,
|
|
98
98
|
) -> Union[Dict[str, Any], T]:
|
|
99
99
|
"""
|
|
@@ -214,7 +214,7 @@ class ConfigManager:
|
|
|
214
214
|
return config.params
|
|
215
215
|
|
|
216
216
|
@staticmethod
|
|
217
|
-
async def
|
|
217
|
+
async def aget_from_registry(
|
|
218
218
|
schema: Optional[Type[T]] = None,
|
|
219
219
|
#
|
|
220
220
|
app_id: Optional[str] = None,
|
agenta/sdk/types.py
CHANGED
|
@@ -222,7 +222,10 @@ class LifecyclesResponse(ReferencesResponse):
|
|
|
222
222
|
deployed_by_id: Optional[str] = None
|
|
223
223
|
|
|
224
224
|
def __str__(self):
|
|
225
|
-
return
|
|
225
|
+
return self.model_dump_json(indent=4)
|
|
226
|
+
|
|
227
|
+
def __repr__(self):
|
|
228
|
+
return self.__str__()
|
|
226
229
|
|
|
227
230
|
|
|
228
231
|
class ConfigurationResponse(LifecyclesResponse):
|
|
@@ -231,3 +234,14 @@ class ConfigurationResponse(LifecyclesResponse):
|
|
|
231
234
|
|
|
232
235
|
class DeploymentResponse(LifecyclesResponse):
|
|
233
236
|
pass
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
class Prompt(BaseModel):
|
|
240
|
+
temperature: float
|
|
241
|
+
model: str
|
|
242
|
+
max_tokens: int
|
|
243
|
+
prompt_system: str
|
|
244
|
+
prompt_user: str
|
|
245
|
+
top_p: float
|
|
246
|
+
frequency_penalty: float
|
|
247
|
+
presence_penalty: float
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
agenta/__init__.py,sha256=
|
|
1
|
+
agenta/__init__.py,sha256=vZmOjCyJZMfW3UlqARG1xfkBZe-0kTjg7a_BaZZg2to,1496
|
|
2
2
|
agenta/cli/evaluation_commands.py,sha256=fs6492tprPId9p8eGO02Xy-NCBm2RZNJLZWcUxugwd8,474
|
|
3
3
|
agenta/cli/helper.py,sha256=P97HbNb_qzOyl5CM_MjAqWEBCdgebU6M81G_4UCmF1A,6288
|
|
4
4
|
agenta/cli/main.py,sha256=Wz0ODhoeKK3Qg_CFUhu6D909szk05tc8ZVBB6H1-w7k,9763
|
|
@@ -139,20 +139,20 @@ agenta/docker/docker-assets/entrypoint.sh,sha256=29XK8VQjQsx4hN2j-4JDy-6kQb5y4LC
|
|
|
139
139
|
agenta/docker/docker-assets/lambda_function.py,sha256=h4UZSSfqwpfsCgERv6frqwm_4JrYu9rLz3I-LxCfeEg,83
|
|
140
140
|
agenta/docker/docker-assets/main.py,sha256=7MI-21n81U7N7A0GxebNi0cmGWtJKcR2sPB6FcH2QfA,251
|
|
141
141
|
agenta/docker/docker_utils.py,sha256=kO1q2_IR0fEAo4M-2Pt_v-zC7GxxnkLogjKFhU869Ps,3555
|
|
142
|
-
agenta/sdk/__init__.py,sha256
|
|
143
|
-
agenta/sdk/agenta_init.py,sha256=
|
|
142
|
+
agenta/sdk/__init__.py,sha256=-Z44_jFgz_WAyAvgAd3zHZ6Q-rDf8zaLi09OXQGtPrk,1700
|
|
143
|
+
agenta/sdk/agenta_init.py,sha256=CEL4XbZ69AeE6_09o591ZHX77qXia4T_gSG1SekM4Oo,10642
|
|
144
144
|
agenta/sdk/assets.py,sha256=Zv4i8MVUSB3jMODQon1mzJtYxuntmrCNjLGk8f-2fls,2856
|
|
145
145
|
agenta/sdk/client.py,sha256=trKyBOYFZRk0v5Eptxvh87yPf50Y9CqY6Qgv4Fy-VH4,2142
|
|
146
146
|
agenta/sdk/context/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
147
147
|
agenta/sdk/context/routing.py,sha256=ycUgmJZyWhL4bHjKtUSAsTlt_0Fujr_6OpoaEH1lAN0,683
|
|
148
148
|
agenta/sdk/context/tracing.py,sha256=UmmW15UFFsvxS0myS6aD9wBk5iNepNlQi4tEQ_ejfYM,96
|
|
149
149
|
agenta/sdk/decorators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
150
|
-
agenta/sdk/decorators/routing.py,sha256=
|
|
150
|
+
agenta/sdk/decorators/routing.py,sha256=qwvXBAlRHH9W94L93OK2h_sCm06NGFtjRkdz3Qy5xRs,36142
|
|
151
151
|
agenta/sdk/decorators/tracing.py,sha256=rwxbxsDb6B0VaJf4qLPgyTMYNkJMFLsCiX2ZQ6W-zOw,7713
|
|
152
152
|
agenta/sdk/litellm/__init__.py,sha256=Bpz1gfHQc0MN1yolWcjifLWznv6GjHggvRGQSpxpihM,37
|
|
153
153
|
agenta/sdk/litellm/litellm.py,sha256=J9NefQ2yvfWQy9e0zmPZiRQDz5GM2ThWAw5XM8gCaqw,8461
|
|
154
154
|
agenta/sdk/managers/__init__.py,sha256=SN-LRwG0pRRDV3u2Q4JiiSTigN3-mYpzGNM35RzT4mc,238
|
|
155
|
-
agenta/sdk/managers/config.py,sha256=
|
|
155
|
+
agenta/sdk/managers/config.py,sha256=AuFfHYOkmilDdcAJt2nlw_WlA3ho4Htjf29FKTZGElM,11716
|
|
156
156
|
agenta/sdk/managers/deployment.py,sha256=SEokjZeh6n7HRKZ92Y0WncdG49hIFx-Z3B3HAl2kmUg,1174
|
|
157
157
|
agenta/sdk/managers/shared.py,sha256=e53jckQq5PIMpjdxADOonUj7o8aGfzmSvdeH5f43rGs,21497
|
|
158
158
|
agenta/sdk/managers/variant.py,sha256=A5ga3mq3b0weUTXa9HO72MGaspthGcu1uK9K5OnP738,4172
|
|
@@ -166,7 +166,7 @@ agenta/sdk/tracing/inline.py,sha256=jVIlmDIFSzXr-ofMbGlO8VFnNeiUL4C4yA8soED4AHI,
|
|
|
166
166
|
agenta/sdk/tracing/processors.py,sha256=8hgwC44qtPDmQ5yurKA4T6rEVx5y927w2sDHdU5GoUA,3115
|
|
167
167
|
agenta/sdk/tracing/spans.py,sha256=nqUOjjirBxB8Eacv8Qj4Ra_6rknGi3lbJdNyKmk5ODQ,3707
|
|
168
168
|
agenta/sdk/tracing/tracing.py,sha256=50669Lr6XwRoIEWDqEFj-K4HRcYSaL9i5vqwARvP7bk,6778
|
|
169
|
-
agenta/sdk/types.py,sha256=
|
|
169
|
+
agenta/sdk/types.py,sha256=oEeSUQn4tMzV7dkSuucBC2YlAaxS-7qgkdlT763YfLM,7076
|
|
170
170
|
agenta/sdk/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
171
171
|
agenta/sdk/utils/costs.py,sha256=i8C7ud__pThLS55XkN4YW8czXtGeXr2mx7jjcOFeiXg,5955
|
|
172
172
|
agenta/sdk/utils/debug.py,sha256=DxiCAeXxxrcEZT2CjlNA6BMvujGP4nzQ-rfb-_mLMck,2114
|
|
@@ -190,7 +190,7 @@ agenta/templates/simple_prompt/app.py,sha256=kODgF6lhzsaJPdgL5b21bUki6jkvqjWZzWR
|
|
|
190
190
|
agenta/templates/simple_prompt/env.example,sha256=g9AE5bYcGPpxawXMJ96gh8oenEPCHTabsiOnfQo3c5k,70
|
|
191
191
|
agenta/templates/simple_prompt/requirements.txt,sha256=ywRglRy7pPkw8bljmMEJJ4aOOQKrt9FGKULZ-DGkoBU,23
|
|
192
192
|
agenta/templates/simple_prompt/template.toml,sha256=DQBtRrF4GU8LBEXOZ-GGuINXMQDKGTEG5y37tnvIUIE,60
|
|
193
|
-
agenta-0.27.
|
|
194
|
-
agenta-0.27.
|
|
195
|
-
agenta-0.27.
|
|
196
|
-
agenta-0.27.
|
|
193
|
+
agenta-0.27.2.dist-info/METADATA,sha256=AH76XIwpNa_epvLOBf4hKObUB5WhL3IlwF-tlhfIIXc,31736
|
|
194
|
+
agenta-0.27.2.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
195
|
+
agenta-0.27.2.dist-info/entry_points.txt,sha256=PDiu8_8AsL7ibU9v4iNoOKR1S7F2rdxjlEprjM9QOgo,46
|
|
196
|
+
agenta-0.27.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|