Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
af1cc7a6
Unverified
Commit
af1cc7a6
authored
Feb 07, 2024
by
Timothy Jaeryang Baek
Committed by
GitHub
Feb 07, 2024
Browse files
Merge pull request #663 from kylemclaren/main
Enable/disable signup in env
parents
46d0eff2
d4fec48d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
backend/apps/web/main.py
backend/apps/web/main.py
+2
-2
backend/config.py
backend/config.py
+1
-0
No files found.
backend/apps/web/main.py
View file @
af1cc7a6
...
@@ -11,13 +11,13 @@ from apps.web.routers import (
...
@@ -11,13 +11,13 @@ from apps.web.routers import (
configs
,
configs
,
utils
,
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
()
app
=
FastAPI
()
origins
=
[
"*"
]
origins
=
[
"*"
]
app
.
state
.
ENABLE_SIGNUP
=
True
app
.
state
.
ENABLE_SIGNUP
=
ENABLE_SIGNUP
app
.
state
.
DEFAULT_MODELS
=
DEFAULT_MODELS
app
.
state
.
DEFAULT_MODELS
=
DEFAULT_MODELS
app
.
state
.
DEFAULT_PROMPT_SUGGESTIONS
=
DEFAULT_PROMPT_SUGGESTIONS
app
.
state
.
DEFAULT_PROMPT_SUGGESTIONS
=
DEFAULT_PROMPT_SUGGESTIONS
...
...
backend/config.py
View file @
af1cc7a6
...
@@ -70,6 +70,7 @@ if OPENAI_API_BASE_URL == "":
...
@@ -70,6 +70,7 @@ if OPENAI_API_BASE_URL == "":
# WEBUI
# WEBUI
####################################
####################################
ENABLE_SIGNUP
=
os
.
environ
.
get
(
"ENABLE_SIGNUP"
,
True
)
DEFAULT_MODELS
=
os
.
environ
.
get
(
"DEFAULT_MODELS"
,
None
)
DEFAULT_MODELS
=
os
.
environ
.
get
(
"DEFAULT_MODELS"
,
None
)
DEFAULT_PROMPT_SUGGESTIONS
=
os
.
environ
.
get
(
DEFAULT_PROMPT_SUGGESTIONS
=
os
.
environ
.
get
(
"DEFAULT_PROMPT_SUGGESTIONS"
,
"DEFAULT_PROMPT_SUGGESTIONS"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment