agenta 0.30.0a1__py3-none-any.whl → 0.30.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/decorators/routing.py +0 -31
- {agenta-0.30.0a1.dist-info → agenta-0.30.0a2.dist-info}/METADATA +1 -1
- {agenta-0.30.0a1.dist-info → agenta-0.30.0a2.dist-info}/RECORD +5 -5
- {agenta-0.30.0a1.dist-info → agenta-0.30.0a2.dist-info}/WHEEL +0 -0
- {agenta-0.30.0a1.dist-info → agenta-0.30.0a2.dist-info}/entry_points.txt +0 -0
agenta/sdk/decorators/routing.py
CHANGED
|
@@ -74,10 +74,6 @@ class route:
|
|
|
74
74
|
self.route_path = path
|
|
75
75
|
|
|
76
76
|
def __call__(self, f):
|
|
77
|
-
# If not running in Agenta, return the original function unchanged
|
|
78
|
-
if environ.get("AGENTA_RUNTIME") != "true":
|
|
79
|
-
return f
|
|
80
|
-
|
|
81
77
|
self.e = entrypoint(
|
|
82
78
|
f, route_path=self.route_path, config_schema=self.config_schema
|
|
83
79
|
)
|
|
@@ -123,23 +119,6 @@ class entrypoint:
|
|
|
123
119
|
route_path="",
|
|
124
120
|
config_schema: Optional[BaseModel] = None,
|
|
125
121
|
):
|
|
126
|
-
self.func = func
|
|
127
|
-
self.route_path = route_path
|
|
128
|
-
self.config_schema = config_schema
|
|
129
|
-
|
|
130
|
-
def __call__(self, func=None):
|
|
131
|
-
if func is None:
|
|
132
|
-
func = self.func
|
|
133
|
-
route_path = self.route_path
|
|
134
|
-
config_schema = self.config_schema
|
|
135
|
-
else:
|
|
136
|
-
route_path = ""
|
|
137
|
-
config_schema = None
|
|
138
|
-
|
|
139
|
-
# If not running in Agenta, return the original function unchanged
|
|
140
|
-
if environ.get("AGENTA_RUNTIME") != "true":
|
|
141
|
-
return func
|
|
142
|
-
|
|
143
122
|
### --- Update Middleware --- #
|
|
144
123
|
try:
|
|
145
124
|
global _MIDDLEWARES # pylint: disable=global-statement
|
|
@@ -192,11 +171,6 @@ class entrypoint:
|
|
|
192
171
|
### --- Playground --- #
|
|
193
172
|
@wraps(func)
|
|
194
173
|
async def wrapper(*args, **kwargs) -> Any:
|
|
195
|
-
if environ.get("AGENTA_RUNTIME") != "true":
|
|
196
|
-
raise HTTPException(
|
|
197
|
-
status_code=403,
|
|
198
|
-
detail="This endpoint is only available when running in Agenta environment",
|
|
199
|
-
)
|
|
200
174
|
func_params, api_config_params = self.split_kwargs(kwargs, config_params)
|
|
201
175
|
self.ingest_files(func_params, ingestible_files)
|
|
202
176
|
if not config_schema:
|
|
@@ -259,11 +233,6 @@ class entrypoint:
|
|
|
259
233
|
### --- Deployed --- #
|
|
260
234
|
@wraps(func)
|
|
261
235
|
async def wrapper_deployed(*args, **kwargs) -> Any:
|
|
262
|
-
if environ.get("AGENTA_RUNTIME") != "true":
|
|
263
|
-
raise HTTPException(
|
|
264
|
-
status_code=403,
|
|
265
|
-
detail="This endpoint is only available when running in Agenta environment",
|
|
266
|
-
)
|
|
267
236
|
func_params = {
|
|
268
237
|
k: v
|
|
269
238
|
for k, v in kwargs.items()
|
|
@@ -181,7 +181,7 @@ agenta/sdk/context/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
|
|
|
181
181
|
agenta/sdk/context/routing.py,sha256=ycUgmJZyWhL4bHjKtUSAsTlt_0Fujr_6OpoaEH1lAN0,683
|
|
182
182
|
agenta/sdk/context/tracing.py,sha256=UmmW15UFFsvxS0myS6aD9wBk5iNepNlQi4tEQ_ejfYM,96
|
|
183
183
|
agenta/sdk/decorators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
184
|
-
agenta/sdk/decorators/routing.py,sha256=
|
|
184
|
+
agenta/sdk/decorators/routing.py,sha256=cuqCenUuu6nFSyNR_2gKCnuuOrNI28PfsKEzUA7r-SU,33040
|
|
185
185
|
agenta/sdk/decorators/tracing.py,sha256=vL5e6TVX6TQwO0t9raZwnzXHV3vElVT0pHS1vD-vzEo,8523
|
|
186
186
|
agenta/sdk/litellm/__init__.py,sha256=Bpz1gfHQc0MN1yolWcjifLWznv6GjHggvRGQSpxpihM,37
|
|
187
187
|
agenta/sdk/litellm/litellm.py,sha256=Ke0It-jA1z0KQ2770gIlWIEgramZGmt1k0GjmpEnFV4,8793
|
|
@@ -227,7 +227,7 @@ agenta/templates/simple_prompt/app.py,sha256=kODgF6lhzsaJPdgL5b21bUki6jkvqjWZzWR
|
|
|
227
227
|
agenta/templates/simple_prompt/env.example,sha256=g9AE5bYcGPpxawXMJ96gh8oenEPCHTabsiOnfQo3c5k,70
|
|
228
228
|
agenta/templates/simple_prompt/requirements.txt,sha256=ywRglRy7pPkw8bljmMEJJ4aOOQKrt9FGKULZ-DGkoBU,23
|
|
229
229
|
agenta/templates/simple_prompt/template.toml,sha256=DQBtRrF4GU8LBEXOZ-GGuINXMQDKGTEG5y37tnvIUIE,60
|
|
230
|
-
agenta-0.30.
|
|
231
|
-
agenta-0.30.
|
|
232
|
-
agenta-0.30.
|
|
233
|
-
agenta-0.30.
|
|
230
|
+
agenta-0.30.0a2.dist-info/METADATA,sha256=Cwm6ELFobQK-OYfZU6JTA_B3nY6XxUnqSavaOU9TfyY,28992
|
|
231
|
+
agenta-0.30.0a2.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
|
|
232
|
+
agenta-0.30.0a2.dist-info/entry_points.txt,sha256=PDiu8_8AsL7ibU9v4iNoOKR1S7F2rdxjlEprjM9QOgo,46
|
|
233
|
+
agenta-0.30.0a2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|