agenta 0.28.0a2__py3-none-any.whl → 0.28.0a4__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/middleware/auth.py +2 -1
- agenta/sdk/tracing/inline.py +7 -4
- {agenta-0.28.0a2.dist-info → agenta-0.28.0a4.dist-info}/METADATA +1 -1
- {agenta-0.28.0a2.dist-info → agenta-0.28.0a4.dist-info}/RECORD +6 -6
- {agenta-0.28.0a2.dist-info → agenta-0.28.0a4.dist-info}/WHEEL +0 -0
- {agenta-0.28.0a2.dist-info → agenta-0.28.0a4.dist-info}/entry_points.txt +0 -0
agenta/sdk/middleware/auth.py
CHANGED
|
@@ -63,7 +63,6 @@ class AuthorizationMiddleware(BaseHTTPMiddleware):
|
|
|
63
63
|
self,
|
|
64
64
|
request: Request,
|
|
65
65
|
call_next: Callable,
|
|
66
|
-
project_id: Optional[UUID] = None,
|
|
67
66
|
):
|
|
68
67
|
if AGENTA_UNAUTHORIZED_EXECUTION_ALLOWED:
|
|
69
68
|
return await call_next(request)
|
|
@@ -85,6 +84,8 @@ class AuthorizationMiddleware(BaseHTTPMiddleware):
|
|
|
85
84
|
"resource_id": self.resource_id,
|
|
86
85
|
}
|
|
87
86
|
|
|
87
|
+
project_id = request.query_params.get("project_id")
|
|
88
|
+
|
|
88
89
|
if project_id:
|
|
89
90
|
params["project_id"] = project_id
|
|
90
91
|
|
agenta/sdk/tracing/inline.py
CHANGED
|
@@ -41,7 +41,6 @@ from uuid import UUID
|
|
|
41
41
|
class TimeDTO(BaseModel):
|
|
42
42
|
start: datetime
|
|
43
43
|
end: datetime
|
|
44
|
-
span: int
|
|
45
44
|
|
|
46
45
|
|
|
47
46
|
class StatusCode(Enum):
|
|
@@ -846,12 +845,9 @@ def parse_from_otel_span_dto(
|
|
|
846
845
|
else None
|
|
847
846
|
)
|
|
848
847
|
|
|
849
|
-
duration = (otel_span_dto.end_time - otel_span_dto.start_time).total_seconds()
|
|
850
|
-
|
|
851
848
|
time = TimeDTO(
|
|
852
849
|
start=otel_span_dto.start_time,
|
|
853
850
|
end=otel_span_dto.end_time,
|
|
854
|
-
span=round(duration * 1_000_000), # microseconds
|
|
855
851
|
)
|
|
856
852
|
|
|
857
853
|
status = StatusDTO(
|
|
@@ -863,6 +859,13 @@ def parse_from_otel_span_dto(
|
|
|
863
859
|
|
|
864
860
|
data, metrics, meta, tags, refs = _parse_from_attributes(otel_span_dto)
|
|
865
861
|
|
|
862
|
+
duration = (otel_span_dto.end_time - otel_span_dto.start_time).total_seconds()
|
|
863
|
+
|
|
864
|
+
if metrics is None:
|
|
865
|
+
metrics = dict()
|
|
866
|
+
|
|
867
|
+
metrics["acc.duration.total"] = round(duration * 1_000, 3) # milliseconds
|
|
868
|
+
|
|
866
869
|
root_id = str(tree_id)
|
|
867
870
|
if refs is not None:
|
|
868
871
|
root_id = refs.get("scenario.id", root_id)
|
|
@@ -191,7 +191,7 @@ agenta/sdk/managers/deployment.py,sha256=SEokjZeh6n7HRKZ92Y0WncdG49hIFx-Z3B3HAl2
|
|
|
191
191
|
agenta/sdk/managers/shared.py,sha256=e53jckQq5PIMpjdxADOonUj7o8aGfzmSvdeH5f43rGs,21497
|
|
192
192
|
agenta/sdk/managers/variant.py,sha256=A5ga3mq3b0weUTXa9HO72MGaspthGcu1uK9K5OnP738,4172
|
|
193
193
|
agenta/sdk/middleware/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
194
|
-
agenta/sdk/middleware/auth.py,sha256=
|
|
194
|
+
agenta/sdk/middleware/auth.py,sha256=E7Uw0C3P7aZ9K_GYs8YComMjrKrNyE_SNJ4DXpQcf3Y,4156
|
|
195
195
|
agenta/sdk/middleware/cache.py,sha256=C_LEzFbulbCBIKtcut2T4qJzh90q4369WCsApDg3Vm0,902
|
|
196
196
|
agenta/sdk/router.py,sha256=mOguvtOwl2wmyAgOuWTsf98pQwpNiUILKIo67W_hR3A,119
|
|
197
197
|
agenta/sdk/tracing/__init__.py,sha256=rQNe5-zT5Kt7_CDhq-lnUIi1EYTBVzVf_MbfcIxVD98,41
|
|
@@ -199,7 +199,7 @@ agenta/sdk/tracing/attributes.py,sha256=zh8JQZSeYCLBeIRSopKJx6QQ-WEgw08Cr64DS_WO
|
|
|
199
199
|
agenta/sdk/tracing/context.py,sha256=IpNENDGRrXWjs-vti5XheqwybQs0QdD-ii4aK0enNrM,803
|
|
200
200
|
agenta/sdk/tracing/conventions.py,sha256=JBtznBXZ3aRkGKkLl7cPwdMNh3w1G-H2Ta2YrAxbr38,950
|
|
201
201
|
agenta/sdk/tracing/exporters.py,sha256=YvTke0RaxeOLqWOuhC5EFzYwFY39kcoBtDLfcyla3j4,1604
|
|
202
|
-
agenta/sdk/tracing/inline.py,sha256=
|
|
202
|
+
agenta/sdk/tracing/inline.py,sha256=sYocvSWjuQaun_XaBYNDQyNw4ETS2hFMbFg6g3RCdeg,31463
|
|
203
203
|
agenta/sdk/tracing/processors.py,sha256=tPf3Hx1TmnWSljvX28kYFOFrp4ImIXhlwAaR39sf5qU,2979
|
|
204
204
|
agenta/sdk/tracing/spans.py,sha256=nqUOjjirBxB8Eacv8Qj4Ra_6rknGi3lbJdNyKmk5ODQ,3707
|
|
205
205
|
agenta/sdk/tracing/tracing.py,sha256=RUSnQIWwfOFwhWbiyJfgC0wYtvcV1PusXTwNslV5WZo,6912
|
|
@@ -226,7 +226,7 @@ agenta/templates/simple_prompt/app.py,sha256=kODgF6lhzsaJPdgL5b21bUki6jkvqjWZzWR
|
|
|
226
226
|
agenta/templates/simple_prompt/env.example,sha256=g9AE5bYcGPpxawXMJ96gh8oenEPCHTabsiOnfQo3c5k,70
|
|
227
227
|
agenta/templates/simple_prompt/requirements.txt,sha256=ywRglRy7pPkw8bljmMEJJ4aOOQKrt9FGKULZ-DGkoBU,23
|
|
228
228
|
agenta/templates/simple_prompt/template.toml,sha256=DQBtRrF4GU8LBEXOZ-GGuINXMQDKGTEG5y37tnvIUIE,60
|
|
229
|
-
agenta-0.28.
|
|
230
|
-
agenta-0.28.
|
|
231
|
-
agenta-0.28.
|
|
232
|
-
agenta-0.28.
|
|
229
|
+
agenta-0.28.0a4.dist-info/METADATA,sha256=3m3ZB3YLl3Uaofsbx-Zno-McxNgTQ9xfcLAOR1AhjOU,31619
|
|
230
|
+
agenta-0.28.0a4.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
231
|
+
agenta-0.28.0a4.dist-info/entry_points.txt,sha256=PDiu8_8AsL7ibU9v4iNoOKR1S7F2rdxjlEprjM9QOgo,46
|
|
232
|
+
agenta-0.28.0a4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|