agenta 0.14.2__py3-none-any.whl → 0.14.4__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/cli/variant_commands.py +13 -6
- agenta/docker/docker-assets/Dockerfile.template +1 -1
- {agenta-0.14.2.dist-info → agenta-0.14.4.dist-info}/METADATA +1 -1
- {agenta-0.14.2.dist-info → agenta-0.14.4.dist-info}/RECORD +6 -6
- {agenta-0.14.2.dist-info → agenta-0.14.4.dist-info}/WHEEL +0 -0
- {agenta-0.14.2.dist-info → agenta-0.14.4.dist-info}/entry_points.txt +0 -0
agenta/cli/variant_commands.py
CHANGED
|
@@ -29,7 +29,7 @@ def variant():
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
def add_variant(
|
|
32
|
-
app_folder: str, file_name: str, host: str, config_name="default"
|
|
32
|
+
app_folder: str, file_name: str, host: str, overwrite: bool, config_name="default"
|
|
33
33
|
) -> str:
|
|
34
34
|
"""
|
|
35
35
|
Adds a variant to the backend. Sends the code as a tar to the backend, which then containerizes it and adds it to the backend store.
|
|
@@ -97,14 +97,13 @@ def add_variant(
|
|
|
97
97
|
|
|
98
98
|
# update the config file with the variant names from the backend
|
|
99
99
|
variant_name = f"{base_name}.{config_name}"
|
|
100
|
-
overwrite = False
|
|
101
100
|
|
|
102
101
|
client = AgentaApi(
|
|
103
102
|
base_url=f"{host}/{BACKEND_URL_SUFFIX}",
|
|
104
103
|
api_key=api_key,
|
|
105
104
|
)
|
|
106
105
|
|
|
107
|
-
if variant_name in config["variants"]:
|
|
106
|
+
if variant_name in config["variants"] and not overwrite:
|
|
108
107
|
overwrite = questionary.confirm(
|
|
109
108
|
"This variant already exists. Do you want to overwrite it?"
|
|
110
109
|
).ask()
|
|
@@ -443,9 +442,15 @@ def remove_variant_cli(variant_name: str, app_folder: str):
|
|
|
443
442
|
)
|
|
444
443
|
@click.option("--app_folder", default=".")
|
|
445
444
|
@click.option("--file_name", default=None, help="The name of the file to run")
|
|
445
|
+
@click.option(
|
|
446
|
+
"--overwrite",
|
|
447
|
+
is_flag=True,
|
|
448
|
+
default=False,
|
|
449
|
+
help="Overwrite the existing variant if it exists",
|
|
450
|
+
)
|
|
446
451
|
@click.pass_context
|
|
447
|
-
def serve_cli(ctx, app_folder: str, file_name: str):
|
|
448
|
-
"""Adds a variant to the web
|
|
452
|
+
def serve_cli(ctx, app_folder: str, file_name: str, overwrite: bool):
|
|
453
|
+
"""Adds a variant to the web UI and serves the API locally."""
|
|
449
454
|
|
|
450
455
|
if not file_name:
|
|
451
456
|
if ctx.args:
|
|
@@ -480,7 +485,9 @@ def serve_cli(ctx, app_folder: str, file_name: str):
|
|
|
480
485
|
return
|
|
481
486
|
|
|
482
487
|
try:
|
|
483
|
-
variant_id = add_variant(
|
|
488
|
+
variant_id = add_variant(
|
|
489
|
+
app_folder=app_folder, file_name=file_name, host=host, overwrite=overwrite
|
|
490
|
+
)
|
|
484
491
|
except Exception as e:
|
|
485
492
|
click.echo(click.style("Failed to add variant.", fg="red"))
|
|
486
493
|
click.echo(click.style(f"Error message: {str(e)}", fg="red"))
|
|
@@ -3,7 +3,7 @@ agenta/cli/evaluation_commands.py,sha256=fs6492tprPId9p8eGO02Xy-NCBm2RZNJLZWcUxu
|
|
|
3
3
|
agenta/cli/helper.py,sha256=vRxHyeNaltzNIGrfU2vO0H28_rXDzx9QqIZ_S-W6zL4,6212
|
|
4
4
|
agenta/cli/main.py,sha256=GgYu6UsrnHbqPV7zPlO14b61IyaDiTIjGMYQS9DlqC4,9551
|
|
5
5
|
agenta/cli/telemetry.py,sha256=GaFFRsE_NtrcSSJ10r2jhgFs5Sk8gf2C09Ox3gOr3eU,1317
|
|
6
|
-
agenta/cli/variant_commands.py,sha256=
|
|
6
|
+
agenta/cli/variant_commands.py,sha256=9Ac2gB_2wokabxEgtY85xbYMt078JFfOXyi6GSkZ3rI,17268
|
|
7
7
|
agenta/cli/variant_configs.py,sha256=PLiuMKadVzs6Gi2uYaT0pZzyULNHDXaTMDWboqpwWdU,1293
|
|
8
8
|
agenta/client/Readme.md,sha256=zWJ6VMYCG124op5RcqgWBdJdlGkGQ2rPLk9F32rWvqo,2756
|
|
9
9
|
agenta/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -120,7 +120,7 @@ agenta/client/exceptions.py,sha256=cxLjjKvZKlUgBxt4Vn9J_SsezJPPNHvrZxnoq-D6zmw,9
|
|
|
120
120
|
agenta/config.py,sha256=Id-Ie1yf9QRP1YPhRYaYSOruRe6RBrsCXkG9rAa-ZtA,732
|
|
121
121
|
agenta/config.toml,sha256=ptE0P49bwsu3Luyn7OLFmk2buPhj5D-MA-O_ErOGoLg,223
|
|
122
122
|
agenta/docker/docker-assets/Dockerfile.cloud.template,sha256=CwJbCTezOYCGowA-Hh19f85YXgynT89CrWxjNxLJJfg,317
|
|
123
|
-
agenta/docker/docker-assets/Dockerfile.template,sha256=
|
|
123
|
+
agenta/docker/docker-assets/Dockerfile.template,sha256=utZ3Y1E0_EfYz5PkuqvIXv1DEddI1QPCO-d6rbcV4H4,211
|
|
124
124
|
agenta/docker/docker-assets/README.md,sha256=XHxwh2ks_ozrtAU7SLbL3J14SB2holG6buoTxwmMiZM,102
|
|
125
125
|
agenta/docker/docker-assets/entrypoint.sh,sha256=29XK8VQjQsx4hN2j-4JDy-6kQb5y4LCqZEa7PD4eqCQ,74
|
|
126
126
|
agenta/docker/docker-assets/lambda_function.py,sha256=h4UZSSfqwpfsCgERv6frqwm_4JrYu9rLz3I-LxCfeEg,83
|
|
@@ -156,7 +156,7 @@ agenta/templates/simple_prompt/app.py,sha256=kODgF6lhzsaJPdgL5b21bUki6jkvqjWZzWR
|
|
|
156
156
|
agenta/templates/simple_prompt/env.example,sha256=g9AE5bYcGPpxawXMJ96gh8oenEPCHTabsiOnfQo3c5k,70
|
|
157
157
|
agenta/templates/simple_prompt/requirements.txt,sha256=ywRglRy7pPkw8bljmMEJJ4aOOQKrt9FGKULZ-DGkoBU,23
|
|
158
158
|
agenta/templates/simple_prompt/template.toml,sha256=DQBtRrF4GU8LBEXOZ-GGuINXMQDKGTEG5y37tnvIUIE,60
|
|
159
|
-
agenta-0.14.
|
|
160
|
-
agenta-0.14.
|
|
161
|
-
agenta-0.14.
|
|
162
|
-
agenta-0.14.
|
|
159
|
+
agenta-0.14.4.dist-info/METADATA,sha256=o8SiqzGvxu89zCOl2WG4wvpYkqylj0cmu233X8JNtJk,26474
|
|
160
|
+
agenta-0.14.4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
161
|
+
agenta-0.14.4.dist-info/entry_points.txt,sha256=PDiu8_8AsL7ibU9v4iNoOKR1S7F2rdxjlEprjM9QOgo,46
|
|
162
|
+
agenta-0.14.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|