agenta 0.27.0a13__py3-none-any.whl → 0.27.1__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 -7
- agenta/sdk/managers/config.py +2 -2
- agenta/sdk/tracing/inline.py +6 -2
- agenta/sdk/tracing/tracing.py +3 -9
- agenta/sdk/types.py +15 -1
- {agenta-0.27.0a13.dist-info → agenta-0.27.1.dist-info}/METADATA +1 -1
- {agenta-0.27.0a13.dist-info → agenta-0.27.1.dist-info}/RECORD +11 -11
- {agenta-0.27.0a13.dist-info → agenta-0.27.1.dist-info}/WHEEL +0 -0
- {agenta-0.27.0a13.dist-info → agenta-0.27.1.dist-info}/entry_points.txt +0 -0
agenta/__init__.py
CHANGED
agenta/sdk/__init__.py
CHANGED
agenta/sdk/agenta_init.py
CHANGED
|
@@ -79,13 +79,13 @@ class AgentaSingleton:
|
|
|
79
79
|
)
|
|
80
80
|
|
|
81
81
|
self.app_id = app_id or config.get("app_id") or os.environ.get("AGENTA_APP_ID")
|
|
82
|
-
if not self.app_id:
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
82
|
+
# if not self.app_id:
|
|
83
|
+
# raise ValueError(
|
|
84
|
+
# "App ID must be specified. You can provide it in one of the following ways:\n"
|
|
85
|
+
# "1. As an argument when calling ag.init(app_id='your_app_id').\n"
|
|
86
|
+
# "2. In the configuration file specified by config_fname.\n"
|
|
87
|
+
# "3. As an environment variable 'AGENTA_APP_ID'."
|
|
88
|
+
# )
|
|
89
89
|
|
|
90
90
|
self.api_key = (
|
|
91
91
|
api_key or os.environ.get("AGENTA_API_KEY") or config.get("api_key")
|
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/tracing/inline.py
CHANGED
|
@@ -821,11 +821,15 @@ def parse_from_otel_span_dto(
|
|
|
821
821
|
|
|
822
822
|
node_id = UUID(tree_id.hex[16:] + otel_span_dto.context.span_id[2:])
|
|
823
823
|
|
|
824
|
-
node_type
|
|
824
|
+
node_type = NodeType.TASK
|
|
825
|
+
try:
|
|
826
|
+
node_type = NodeType(types.get("node", "").lower())
|
|
827
|
+
except: # pylint: disable=bare-except
|
|
828
|
+
pass
|
|
825
829
|
|
|
826
830
|
node = NodeDTO(
|
|
827
831
|
id=node_id,
|
|
828
|
-
type=node_type
|
|
832
|
+
type=node_type,
|
|
829
833
|
name=otel_span_dto.name,
|
|
830
834
|
)
|
|
831
835
|
|
agenta/sdk/tracing/tracing.py
CHANGED
|
@@ -35,8 +35,6 @@ class Tracing(metaclass=Singleton):
|
|
|
35
35
|
) -> None:
|
|
36
36
|
# ENDPOINT (OTLP)
|
|
37
37
|
self.otlp_url = url
|
|
38
|
-
# AITH (OTLP)
|
|
39
|
-
self.api_key: Optional[str] = None
|
|
40
38
|
# HEADERS (OTLP)
|
|
41
39
|
self.headers: Dict[str, str] = dict()
|
|
42
40
|
# REFERENCES
|
|
@@ -59,16 +57,12 @@ class Tracing(metaclass=Singleton):
|
|
|
59
57
|
# DEPRECATING
|
|
60
58
|
app_id: Optional[str] = None,
|
|
61
59
|
):
|
|
62
|
-
# AUTH (OTLP)
|
|
63
|
-
self.api_key = api_key
|
|
64
60
|
# HEADERS (OTLP)
|
|
65
|
-
self.headers = {}
|
|
66
|
-
if app_id:
|
|
67
|
-
self.headers.update(**{"AG-APP-ID": app_id})
|
|
68
61
|
if api_key:
|
|
69
|
-
self.headers
|
|
62
|
+
self.headers["Authorization"] = api_key
|
|
70
63
|
# REFERENCES
|
|
71
|
-
|
|
64
|
+
if app_id:
|
|
65
|
+
self.references["application.id"] = app_id
|
|
72
66
|
|
|
73
67
|
# TRACER PROVIDER
|
|
74
68
|
self.tracer_provider = TracerProvider(
|
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,8 +139,8 @@ 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=yUqHK55NtcrYM0XRVR1u1RADi0kGKJ2EZitDaVw2wlk,10666
|
|
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
|
|
@@ -152,7 +152,7 @@ agenta/sdk/decorators/tracing.py,sha256=rwxbxsDb6B0VaJf4qLPgyTMYNkJMFLsCiX2ZQ6W-
|
|
|
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
|
|
@@ -162,11 +162,11 @@ agenta/sdk/tracing/attributes.py,sha256=zh8JQZSeYCLBeIRSopKJx6QQ-WEgw08Cr64DS_WO
|
|
|
162
162
|
agenta/sdk/tracing/context.py,sha256=PSJdhcaOXSMAuGUBySpLKPKyx8duF3TJzhUEk2ufqPc,777
|
|
163
163
|
agenta/sdk/tracing/conventions.py,sha256=JBtznBXZ3aRkGKkLl7cPwdMNh3w1G-H2Ta2YrAxbr38,950
|
|
164
164
|
agenta/sdk/tracing/exporters.py,sha256=mFK5vrL7X-pQmyH-c9vrmGtsjSkCBOR31q2M4ZsOo80,1568
|
|
165
|
-
agenta/sdk/tracing/inline.py,sha256=
|
|
165
|
+
agenta/sdk/tracing/inline.py,sha256=jVIlmDIFSzXr-ofMbGlO8VFnNeiUL4C4yA8soED4AHI,34611
|
|
166
166
|
agenta/sdk/tracing/processors.py,sha256=8hgwC44qtPDmQ5yurKA4T6rEVx5y927w2sDHdU5GoUA,3115
|
|
167
167
|
agenta/sdk/tracing/spans.py,sha256=nqUOjjirBxB8Eacv8Qj4Ra_6rknGi3lbJdNyKmk5ODQ,3707
|
|
168
|
-
agenta/sdk/tracing/tracing.py,sha256=
|
|
169
|
-
agenta/sdk/types.py,sha256=
|
|
168
|
+
agenta/sdk/tracing/tracing.py,sha256=50669Lr6XwRoIEWDqEFj-K4HRcYSaL9i5vqwARvP7bk,6778
|
|
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.1.dist-info/METADATA,sha256=2mo3OGNmMds2qeebXrtF9cLHwQE87s0A6IOjX8MMQTY,31736
|
|
194
|
+
agenta-0.27.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
195
|
+
agenta-0.27.1.dist-info/entry_points.txt,sha256=PDiu8_8AsL7ibU9v4iNoOKR1S7F2rdxjlEprjM9QOgo,46
|
|
196
|
+
agenta-0.27.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|