Timothy J. Baek 7 月之前
父节点
当前提交
2e40719f4e
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      backend/open_webui/__init__.py

+ 1 - 2
backend/open_webui/__init__.py

@@ -10,14 +10,13 @@ app = typer.Typer()
 
 
 KEY_FILE = Path.cwd() / ".webui_secret_key"
 KEY_FILE = Path.cwd() / ".webui_secret_key"
 
 
-os.environ["FROM_INIT_PY"] = "true"
-
 
 
 @app.command()
 @app.command()
 def serve(
 def serve(
     host: str = "0.0.0.0",
     host: str = "0.0.0.0",
     port: int = 8080,
     port: int = 8080,
 ):
 ):
+    os.environ["FROM_INIT_PY"] = "true"
     if os.getenv("WEBUI_SECRET_KEY") is None:
     if os.getenv("WEBUI_SECRET_KEY") is None:
         typer.echo(
         typer.echo(
             "Loading WEBUI_SECRET_KEY from file, not provided as an environment variable."
             "Loading WEBUI_SECRET_KEY from file, not provided as an environment variable."