agenta 0.28.0__py3-none-any.whl → 0.28.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/sdk/middleware/auth.py +1 -2
- agenta/sdk/tracing/inline.py +4 -7
- {agenta-0.28.0.dist-info → agenta-0.28.0a2.dist-info}/METADATA +1 -1
- {agenta-0.28.0.dist-info → agenta-0.28.0a2.dist-info}/RECORD +6 -6
- {agenta-0.28.0.dist-info → agenta-0.28.0a2.dist-info}/WHEEL +0 -0
- {agenta-0.28.0.dist-info → agenta-0.28.0a2.dist-info}/entry_points.txt +0 -0
agenta/sdk/middleware/auth.py
CHANGED
|
@@ -63,6 +63,7 @@ class AuthorizationMiddleware(BaseHTTPMiddleware):
|
|
|
63
63
|
self,
|
|
64
64
|
request: Request,
|
|
65
65
|
call_next: Callable,
|
|
66
|
+
project_id: Optional[UUID] = None,
|
|
66
67
|
):
|
|
67
68
|
if AGENTA_UNAUTHORIZED_EXECUTION_ALLOWED:
|
|
68
69
|
return await call_next(request)
|
|
@@ -84,8 +85,6 @@ class AuthorizationMiddleware(BaseHTTPMiddleware):
|
|
|
84
85
|
"resource_id": self.resource_id,
|
|
85
86
|
}
|
|
86
87
|
|
|
87
|
-
project_id = request.query_params.get("project_id")
|
|
88
|
-
|
|
89
88
|
if project_id:
|
|
90
89
|
params["project_id"] = project_id
|
|
91
90
|
|
agenta/sdk/tracing/inline.py
CHANGED
|
@@ -41,6 +41,7 @@ from uuid import UUID
|
|
|
41
41
|
class TimeDTO(BaseModel):
|
|
42
42
|
start: datetime
|
|
43
43
|
end: datetime
|
|
44
|
+
span: int
|
|
44
45
|
|
|
45
46
|
|
|
46
47
|
class StatusCode(Enum):
|
|
@@ -845,9 +846,12 @@ def parse_from_otel_span_dto(
|
|
|
845
846
|
else None
|
|
846
847
|
)
|
|
847
848
|
|
|
849
|
+
duration = (otel_span_dto.end_time - otel_span_dto.start_time).total_seconds()
|
|
850
|
+
|
|
848
851
|
time = TimeDTO(
|
|
849
852
|
start=otel_span_dto.start_time,
|
|
850
853
|
end=otel_span_dto.end_time,
|
|
854
|
+
span=round(duration * 1_000_000), # microseconds
|
|
851
855
|
)
|
|
852
856
|
|
|
853
857
|
status = StatusDTO(
|
|
@@ -859,13 +863,6 @@ def parse_from_otel_span_dto(
|
|
|
859
863
|
|
|
860
864
|
data, metrics, meta, tags, refs = _parse_from_attributes(otel_span_dto)
|
|
861
865
|
|
|
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
|
-
|
|
869
866
|
root_id = str(tree_id)
|
|
870
867
|
if refs is not None:
|
|
871
868
|
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=MAur8I2a4A0nnEhCC2cNscawrR4kweollF6RPpy4LHE,4134
|
|
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=ncIvMKWpy1o-5l3i7YThj_pE3Oq6xvQfwyUfGsfUxzc,31405
|
|
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.0a2.dist-info/METADATA,sha256=gdAFd2lVCzvmI3c4mMdsEu7FSXs-sEVC-NWh-j8KsBU,31619
|
|
230
|
+
agenta-0.28.0a2.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
231
|
+
agenta-0.28.0a2.dist-info/entry_points.txt,sha256=PDiu8_8AsL7ibU9v4iNoOKR1S7F2rdxjlEprjM9QOgo,46
|
|
232
|
+
agenta-0.28.0a2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|