This commit is contained in:
Timothy Jaeryang Baek 2025-06-08 21:21:51 +04:00
parent d8d8380a78
commit 3a0696e1b0
2 changed files with 4 additions and 1 deletions

View File

@ -5,6 +5,7 @@ import os
import pkgutil
import sys
import shutil
from uuid import uuid4
from pathlib import Path
import markdown
@ -130,6 +131,7 @@ else:
PACKAGE_DATA = {"version": "0.0.0"}
VERSION = PACKAGE_DATA["version"]
INSTANCE_ID = os.environ.get("INSTANCE_ID", str(uuid4()))
# Function to parse each section

View File

@ -394,6 +394,7 @@ from open_webui.env import (
SAFE_MODE,
SRC_LOG_LEVELS,
VERSION,
INSTANCE_ID,
WEBUI_BUILD_HASH,
WEBUI_SECRET_KEY,
WEBUI_SESSION_COOKIE_SAME_SITE,
@ -490,7 +491,7 @@ https://github.com/open-webui/open-webui
@asynccontextmanager
async def lifespan(app: FastAPI):
app.state.instance_id = os.environ.get("INSTANCE_ID", str(uuid4()))
app.state.instance_id = INSTANCE_ID
start_logger()
if RESET_CONFIG_ON_START: