Update Sadhguru AI code (#1037)
This commit is contained in:
@@ -20,6 +20,7 @@ def cli():
|
||||
|
||||
anonymous_telemetry = AnonymousTelemetry()
|
||||
|
||||
|
||||
def get_pkg_path_from_name(template: str):
|
||||
try:
|
||||
# Determine the installation location of the embedchain package
|
||||
@@ -34,7 +35,7 @@ def get_pkg_path_from_name(template: str):
|
||||
if not os.path.exists(src_path):
|
||||
console.print(f"❌ [bold red]Template '{template}' not found.[/bold red]")
|
||||
return
|
||||
|
||||
|
||||
return src_path
|
||||
|
||||
|
||||
@@ -71,9 +72,7 @@ def setup_modal_com_app(extra_args):
|
||||
@click.option("--template", default="fly.io", help="The template to use.")
|
||||
@click.argument("extra_args", nargs=-1, type=click.UNPROCESSED)
|
||||
def create(template, extra_args):
|
||||
anonymous_telemetry.capture(
|
||||
event_name="ec_create", properties={"template_used": template}
|
||||
)
|
||||
anonymous_telemetry.capture(event_name="ec_create", properties={"template_used": template})
|
||||
src_path = get_pkg_path_from_name(template)
|
||||
shutil.copytree(src_path, os.getcwd(), dirs_exist_ok=True)
|
||||
env_sample_path = os.path.join(src_path, ".env.example")
|
||||
@@ -134,9 +133,7 @@ def dev(debug, host, port):
|
||||
embedchain_config = json.load(file)
|
||||
template = embedchain_config["provider"]
|
||||
|
||||
anonymous_telemetry.capture(
|
||||
event_name="ec_dev", properties={"template_used": template}
|
||||
)
|
||||
anonymous_telemetry.capture(event_name="ec_dev", properties={"template_used": template})
|
||||
if template == "fly.io":
|
||||
run_dev_fly_io(debug, host, port)
|
||||
elif template == "modal.com":
|
||||
@@ -223,9 +220,7 @@ def deploy():
|
||||
embedchain_config = json.load(file)
|
||||
template = embedchain_config["provider"]
|
||||
|
||||
anonymous_telemetry.capture(
|
||||
event_name="ec_deploy", properties={"template_used": template}
|
||||
)
|
||||
anonymous_telemetry.capture(event_name="ec_deploy", properties={"template_used": template})
|
||||
if template == "fly.io":
|
||||
deploy_fly()
|
||||
elif template == "modal.com":
|
||||
|
||||
Reference in New Issue
Block a user