Skip to content

Commit

Permalink
Merge pull request #1558 from Agenta-AI/1257-bug-urls-shown-when-runn…
Browse files Browse the repository at this point in the history
…ing-agenta-variant-serve-are-wrong

[Bug Fix]: urls shown when running agenta variant serve are wrong
  • Loading branch information
mmabrouk authored Apr 23, 2024
2 parents ddaacdf + 8388a7a commit 7198306
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions agenta-cli/agenta/cli/variant_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
import click
import questionary
import toml

from agenta.cli import helper
from agenta.cli.telemetry import event_track
from agenta.client.backend.client import AgentaApi
from agenta.client.api import add_variant_to_server
from agenta.client.api_models import AppVariant, Image
from agenta.docker.docker_utils import build_tar_docker_container
from agenta.client.backend.types.variant_action import VariantActionEnum, VariantAction

from agenta.client.api import add_variant_to_server
from agenta.client.backend.client import AgentaApi

BACKEND_URL_SUFFIX = os.environ.get("BACKEND_URL_SUFFIX", "api")

Expand Down Expand Up @@ -260,8 +262,11 @@ def start_variant(variant_id: str, app_folder: str, host: str):
)

endpoint = client.variants.start_variant(
variant_id=variant_id, action={"action": "START"}
)
variant_id=variant_id,
action=VariantAction(
action=VariantActionEnum.START,
),
).uri
click.echo("\n" + click.style("Congratulations! 🎉", bold=True, fg="green"))
click.echo(
click.style("Your app has been deployed locally as an API. 🚀", fg="cyan")
Expand Down

0 comments on commit 7198306

Please sign in to comment.