Skip to content

Commit

Permalink
Update - resolve bug when initializing llm app and setting configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
aybruhm committed Feb 2, 2024
1 parent 0372e9e commit 6cbe18e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions agenta-cli/agenta/sdk/agenta_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,16 @@ def init(
)
else:
try:
get_app_id = client.list_apps(app_name=app_name)
app_id = get_app_id.app_id
apps = client.list_apps(app_name=app_name)
app_id = apps[0].app_id

if not app_id:
raise APIRequestError(
f"App with name {app_name} does not exist on the server."
)

get_base_id = client.list_bases(app_id=app_id, base_name=base_name)
base_id = get_base_id.base_id
bases = client.list_bases(app_id=app_id, base_name=base_name)
base_id = bases[0].base_id
except Exception as ex:
raise APIRequestError(
f"Failed to get base id and/or app_id from the server with error: {ex}"
Expand Down Expand Up @@ -171,7 +171,7 @@ def pull(self, config_name: str = "default", environment_name: str = None):
+ str(ex)
)
try:
self.set(**config["parameters"])
self.set(**config.parameters)
except Exception as ex:
logger.warning("Failed to set the configuration with error: " + str(ex))

Expand Down

0 comments on commit 6cbe18e

Please sign in to comment.