forked from open-webui/open-webui
get ENABLE_SIGNUP
from env
This commit is contained in:
parent
46d0eff218
commit
d4fec48d9c
2 changed files with 3 additions and 2 deletions
|
@ -11,13 +11,13 @@ from apps.web.routers import (
|
|||
configs,
|
||||
utils,
|
||||
)
|
||||
from config import WEBUI_VERSION, WEBUI_AUTH, DEFAULT_MODELS, DEFAULT_PROMPT_SUGGESTIONS
|
||||
from config import WEBUI_VERSION, WEBUI_AUTH, DEFAULT_MODELS, DEFAULT_PROMPT_SUGGESTIONS, ENABLE_SIGNUP
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
origins = ["*"]
|
||||
|
||||
app.state.ENABLE_SIGNUP = True
|
||||
app.state.ENABLE_SIGNUP = ENABLE_SIGNUP
|
||||
app.state.DEFAULT_MODELS = DEFAULT_MODELS
|
||||
app.state.DEFAULT_PROMPT_SUGGESTIONS = DEFAULT_PROMPT_SUGGESTIONS
|
||||
|
||||
|
|
|
@ -70,6 +70,7 @@ if OPENAI_API_BASE_URL == "":
|
|||
# WEBUI
|
||||
####################################
|
||||
|
||||
ENABLE_SIGNUP = os.environ.get("ENABLE_SIGNUP", True)
|
||||
DEFAULT_MODELS = os.environ.get("DEFAULT_MODELS", None)
|
||||
DEFAULT_PROMPT_SUGGESTIONS = os.environ.get(
|
||||
"DEFAULT_PROMPT_SUGGESTIONS",
|
||||
|
|
Loading…
Reference in a new issue