Skip to content

Commit

Permalink
fix client func name
Browse files Browse the repository at this point in the history
  • Loading branch information
devgenix committed Dec 14, 2023
1 parent c5c8be9 commit 2851aec
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
3 changes: 2 additions & 1 deletion agenta-backend/agenta_backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ async def lifespan(application: FastAPI, cache=True):
yield


app = FastAPI(lifespan=lifespan)
# app = FastAPI(lifespan=lifespan)
app = FastAPI()

allow_headers = ["Content-Type"]

Expand Down
2 changes: 1 addition & 1 deletion agenta-cli/agenta/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def init(app_name: str):
if global_backend_host:
backend_host = global_backend_host
else:
backend_host = "https://cloud.agenta.ai"
backend_host = "http://localhost"

api_key = helper.get_api_key(backend_host)

Expand Down
16 changes: 7 additions & 9 deletions agenta-cli/agenta/client/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,13 @@ def add_variant_to_server(
)
for attempt in range(retries):
try:
response = (
client.add_variant_from_image_apps_app_id_variant_from_image_post(
app_id=app_id,
variant_name=f"{base_name.lower()}.default",
base_name=base_name,
config_name="default",
docker_id=image.docker_id,
tags=image.tags,
)
response = client.add_variant_from_image(
app_id=app_id,
variant_name=f"{base_name.lower()}.default",
base_name=base_name,
config_name="default",
docker_id=image.docker_id,
tags=image.tags,
)
click.echo(click.style("\nVariant added successfully.", fg="green"))
return response
Expand Down

0 comments on commit 2851aec

Please sign in to comment.