agenta 0.35.2__py3-none-any.whl → 0.36.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/sdk/decorators/routing.py +3 -19
- agenta/sdk/litellm/mocks/__init__.py +3 -7
- agenta/sdk/middleware/vault.py +4 -4
- {agenta-0.35.2.dist-info → agenta-0.36.1.dist-info}/METADATA +1 -1
- {agenta-0.35.2.dist-info → agenta-0.36.1.dist-info}/RECORD +7 -7
- {agenta-0.35.2.dist-info → agenta-0.36.1.dist-info}/WHEEL +0 -0
- {agenta-0.35.2.dist-info → agenta-0.36.1.dist-info}/entry_points.txt +0 -0
agenta/sdk/decorators/routing.py
CHANGED
|
@@ -122,7 +122,6 @@ class entrypoint:
|
|
|
122
122
|
_test_path = f"{AGENTA_RUNTIME_PREFIX}/test"
|
|
123
123
|
_config_key = "ag_config"
|
|
124
124
|
# LEGACY
|
|
125
|
-
_legacy_playground_run_path = f"{AGENTA_RUNTIME_PREFIX}/playground/run"
|
|
126
125
|
_legacy_generate_path = f"{AGENTA_RUNTIME_PREFIX}/generate"
|
|
127
126
|
_legacy_generate_deployed_path = f"{AGENTA_RUNTIME_PREFIX}/generate_deployed"
|
|
128
127
|
|
|
@@ -178,7 +177,7 @@ class entrypoint:
|
|
|
178
177
|
|
|
179
178
|
self.update_run_wrapper_signature(wrapper=run_wrapper)
|
|
180
179
|
|
|
181
|
-
run_route = f"{entrypoint._run_path}
|
|
180
|
+
run_route = f"{route_path}{entrypoint._run_path}"
|
|
182
181
|
app.post(
|
|
183
182
|
run_route,
|
|
184
183
|
response_model=BaseResponse,
|
|
@@ -214,7 +213,7 @@ class entrypoint:
|
|
|
214
213
|
|
|
215
214
|
self.update_test_wrapper_signature(wrapper=test_wrapper, config_instance=config)
|
|
216
215
|
|
|
217
|
-
test_route = f"{entrypoint._test_path}
|
|
216
|
+
test_route = f"{route_path}{entrypoint._test_path}"
|
|
218
217
|
app.post(
|
|
219
218
|
test_route,
|
|
220
219
|
response_model=BaseResponse,
|
|
@@ -233,20 +232,8 @@ class entrypoint:
|
|
|
233
232
|
)(test_wrapper)
|
|
234
233
|
# LEGACY
|
|
235
234
|
|
|
236
|
-
# LEGACY
|
|
237
|
-
# TODO: Removing this implies no breaking changes
|
|
238
|
-
if route_path == "":
|
|
239
|
-
test_route = entrypoint._legacy_playground_run_path
|
|
240
|
-
app.post(
|
|
241
|
-
test_route,
|
|
242
|
-
response_model=BaseResponse,
|
|
243
|
-
response_model_exclude_none=True,
|
|
244
|
-
)(test_wrapper)
|
|
245
|
-
# LEGACY
|
|
246
|
-
### ------------ #
|
|
247
|
-
|
|
248
235
|
### --- OpenAPI --- #
|
|
249
|
-
test_route = f"{entrypoint._test_path}
|
|
236
|
+
test_route = f"{route_path}{entrypoint._test_path}"
|
|
250
237
|
entrypoint.routes.append(
|
|
251
238
|
{
|
|
252
239
|
"func": func.__name__,
|
|
@@ -674,9 +661,6 @@ class entrypoint:
|
|
|
674
661
|
"""Override config in OpenAPI schema to add agenta-specific metadata."""
|
|
675
662
|
endpoint = endpoint[1:].replace("/", "_")
|
|
676
663
|
|
|
677
|
-
schema_key = f"Body_{func_name}_{endpoint}_post"
|
|
678
|
-
schema_to_override = openapi_schema["components"]["schemas"][schema_key]
|
|
679
|
-
|
|
680
664
|
# Get the config class name to find its schema
|
|
681
665
|
config_class_name = type(config).__name__
|
|
682
666
|
config_schema = openapi_schema["components"]["schemas"][config_class_name]
|
|
@@ -26,20 +26,16 @@ def hello_mock_response(*args, **kwargs) -> MockResponseModel:
|
|
|
26
26
|
],
|
|
27
27
|
)
|
|
28
28
|
|
|
29
|
+
|
|
29
30
|
def chat_mock_response(*args, **kwargs) -> MockResponseModel:
|
|
30
31
|
return MockResponseModel(
|
|
31
32
|
choices=[
|
|
32
|
-
MockChoiceModel(
|
|
33
|
-
message=MockMessageModel(
|
|
34
|
-
content="world",
|
|
35
|
-
role="assistant"
|
|
36
|
-
)
|
|
37
|
-
)
|
|
33
|
+
MockChoiceModel(message=MockMessageModel(content="world", role="assistant"))
|
|
38
34
|
],
|
|
39
35
|
)
|
|
40
36
|
|
|
41
37
|
|
|
42
38
|
MOCKS: dict[str, Callable[..., MockResponseModel]] = {
|
|
43
39
|
"hello": hello_mock_response,
|
|
44
|
-
"chat": chat_mock_response
|
|
40
|
+
"chat": chat_mock_response,
|
|
45
41
|
}
|
agenta/sdk/middleware/vault.py
CHANGED
|
@@ -102,7 +102,7 @@ class VaultMiddleware(BaseHTTPMiddleware):
|
|
|
102
102
|
),
|
|
103
103
|
)
|
|
104
104
|
|
|
105
|
-
local_secrets.append(secret.model_dump())
|
|
105
|
+
local_secrets.append(secret.model_dump()) # type: ignore
|
|
106
106
|
except: # pylint: disable=bare-except
|
|
107
107
|
display_exception("Vault: Local Secrets Exception")
|
|
108
108
|
|
|
@@ -121,7 +121,7 @@ class VaultMiddleware(BaseHTTPMiddleware):
|
|
|
121
121
|
else:
|
|
122
122
|
secrets = response.json()
|
|
123
123
|
vault_secrets = self._transform_secrets_response_to_secret_dto(
|
|
124
|
-
secrets
|
|
124
|
+
secrets_list=secrets # type: ignore
|
|
125
125
|
)
|
|
126
126
|
except: # pylint: disable=bare-except
|
|
127
127
|
display_exception("Vault: Vault Secrets Exception")
|
|
@@ -130,12 +130,12 @@ class VaultMiddleware(BaseHTTPMiddleware):
|
|
|
130
130
|
|
|
131
131
|
if local_secrets:
|
|
132
132
|
for secret in local_secrets:
|
|
133
|
-
provider = secret["data"]["provider"]
|
|
133
|
+
provider = secret["data"]["provider"] # type: ignore
|
|
134
134
|
merged_secrets[provider] = secret
|
|
135
135
|
|
|
136
136
|
if vault_secrets:
|
|
137
137
|
for secret in vault_secrets:
|
|
138
|
-
provider = secret["data"]["provider"]
|
|
138
|
+
provider = secret["data"]["provider"] # type: ignore
|
|
139
139
|
merged_secrets[provider] = secret
|
|
140
140
|
|
|
141
141
|
secrets = list(merged_secrets.values())
|
|
@@ -205,12 +205,12 @@ agenta/sdk/context/exporting.py,sha256=16X8fgMhl58gehSlqANX97FiKxx4TkGiG4d2B0-7Z
|
|
|
205
205
|
agenta/sdk/context/routing.py,sha256=FEsjw8EttI1SMyUo96ptcUsvHJnhoKwdr1szlkxxJNU,598
|
|
206
206
|
agenta/sdk/context/tracing.py,sha256=xjErrXP1Nq1AfL-Cif1l-lNEfs12eQ3v_VCRgoKe7nY,743
|
|
207
207
|
agenta/sdk/decorators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
208
|
-
agenta/sdk/decorators/routing.py,sha256=
|
|
208
|
+
agenta/sdk/decorators/routing.py,sha256=HjAhJcttOdf2NM5HVXYgosh3BD2mF87UO9od0RSZ7Bw,24773
|
|
209
209
|
agenta/sdk/decorators/tracing.py,sha256=tIi5gpwzvXd26pFW-7kYQtTFO8w1zzwFeAPY2Ldq4P4,9952
|
|
210
210
|
agenta/sdk/litellm/__init__.py,sha256=Bpz1gfHQc0MN1yolWcjifLWznv6GjHggvRGQSpxpihM,37
|
|
211
211
|
agenta/sdk/litellm/litellm.py,sha256=Xx_YJu05BYkmIe6uObjS6DwzjgwfNytGWf807Zh0vcU,10153
|
|
212
212
|
agenta/sdk/litellm/mockllm.py,sha256=8V6dqdv8eA4P-VoXIwHNYlIjHG189P14POSfSfluVw0,678
|
|
213
|
-
agenta/sdk/litellm/mocks/__init__.py,sha256=
|
|
213
|
+
agenta/sdk/litellm/mocks/__init__.py,sha256=0bGjOOWXz8BxE0rvRWciPP7SAegO2mgi_UtWw8jTlDk,866
|
|
214
214
|
agenta/sdk/managers/__init__.py,sha256=SN-LRwG0pRRDV3u2Q4JiiSTigN3-mYpzGNM35RzT4mc,238
|
|
215
215
|
agenta/sdk/managers/apps.py,sha256=RSE5ER-a0IHo7iZrcQLshQZMemPTfAVsBfR8H1J-ryQ,1713
|
|
216
216
|
agenta/sdk/managers/config.py,sha256=2LFl7aBF7FKd6UKhqcbnDXzlP8Rsj7hnCu5wBllVQzc,7753
|
|
@@ -226,7 +226,7 @@ agenta/sdk/middleware/cors.py,sha256=q3r7lGkrIdMcT_vuhsburMcjG7pyl7w0ycxrIrGJ2e8
|
|
|
226
226
|
agenta/sdk/middleware/inline.py,sha256=ee8E4XBGcRSrHTvblqX1yRXuTN_sxLm7lY1jnywrBG8,901
|
|
227
227
|
agenta/sdk/middleware/mock.py,sha256=bCUN9iJBxePyN9MBwBpJs-_iCNkUQeUjIIu3WElS1oQ,759
|
|
228
228
|
agenta/sdk/middleware/otel.py,sha256=ShaB7iVaUjdq6lOXf0vmZthQsDUjAgIrseyPeJzVkEU,840
|
|
229
|
-
agenta/sdk/middleware/vault.py,sha256=
|
|
229
|
+
agenta/sdk/middleware/vault.py,sha256=xGCDI0PXtDHaxz_Mv3ee3l_0JQgwnwTskzX5RTaYaBU,4310
|
|
230
230
|
agenta/sdk/router.py,sha256=mOguvtOwl2wmyAgOuWTsf98pQwpNiUILKIo67W_hR3A,119
|
|
231
231
|
agenta/sdk/tracing/__init__.py,sha256=rQNe5-zT5Kt7_CDhq-lnUIi1EYTBVzVf_MbfcIxVD98,41
|
|
232
232
|
agenta/sdk/tracing/attributes.py,sha256=zh8JQZSeYCLBeIRSopKJx6QQ-WEgw08Cr64DS_WOcT8,3833
|
|
@@ -249,7 +249,7 @@ agenta/sdk/utils/logging.py,sha256=eFzEFuYpggfIhEKv09JZRqcDzkmZ482a_E2G-X0FK7Y,4
|
|
|
249
249
|
agenta/sdk/utils/preinit.py,sha256=YlJL7RLfel0R7DFp-jK7OV-z4ZIQJM0oupYlk7g8b5o,1278
|
|
250
250
|
agenta/sdk/utils/singleton.py,sha256=17Ph7LGnnV8HkPjImruKita2ni03Ari5jr0jqm__4sc,312
|
|
251
251
|
agenta/sdk/utils/timing.py,sha256=rmBPSBuUnIu-epocUCVk0KcM2r36HuDoxkFqOZgfPhc,1507
|
|
252
|
-
agenta-0.
|
|
253
|
-
agenta-0.
|
|
254
|
-
agenta-0.
|
|
255
|
-
agenta-0.
|
|
252
|
+
agenta-0.36.1.dist-info/METADATA,sha256=60x6pkrse2im04zsLUmw0Rxl5SB1An27IpPgYwIGZrc,29827
|
|
253
|
+
agenta-0.36.1.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
|
254
|
+
agenta-0.36.1.dist-info/entry_points.txt,sha256=PDiu8_8AsL7ibU9v4iNoOKR1S7F2rdxjlEprjM9QOgo,46
|
|
255
|
+
agenta-0.36.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|