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
c8907079
Commit
c8907079
authored
Apr 03, 2024
by
Timothy J. Baek
Browse files
refac
parent
83ad488e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
26 deletions
+4
-26
.env.example
.env.example
+1
-4
backend/config.py
backend/config.py
+0
-8
backend/main.py
backend/main.py
+3
-14
No files found.
.env.example
View file @
c8907079
...
@@ -9,7 +9,4 @@ OPENAI_API_KEY=''
...
@@ -9,7 +9,4 @@ OPENAI_API_KEY=''
# DO NOT TRACK
# DO NOT TRACK
SCARF_NO_ANALYTICS=true
SCARF_NO_ANALYTICS=true
DO_NOT_TRACK=true
DO_NOT_TRACK=true
\ No newline at end of file
MANIFEST_NAME='Open WebUI'
MANIFEST_SHORT_NAME='Open WebUI'
backend/config.py
View file @
c8907079
...
@@ -424,11 +424,3 @@ WHISPER_MODEL_DIR = os.getenv("WHISPER_MODEL_DIR", f"{CACHE_DIR}/whisper/models"
...
@@ -424,11 +424,3 @@ WHISPER_MODEL_DIR = os.getenv("WHISPER_MODEL_DIR", f"{CACHE_DIR}/whisper/models"
AUTOMATIC1111_BASE_URL
=
os
.
getenv
(
"AUTOMATIC1111_BASE_URL"
,
""
)
AUTOMATIC1111_BASE_URL
=
os
.
getenv
(
"AUTOMATIC1111_BASE_URL"
,
""
)
COMFYUI_BASE_URL
=
os
.
getenv
(
"COMFYUI_BASE_URL"
,
""
)
COMFYUI_BASE_URL
=
os
.
getenv
(
"COMFYUI_BASE_URL"
,
""
)
####################################
# Manifest
####################################
MANIFEST_NAME
=
os
.
getenv
(
"MANIFEST_NAME"
,
"Open WebUI"
)
MANIFEST_SHORT_NAME
=
os
.
getenv
(
"MANIFEST_SHORT_NAME"
,
"Open WebUI"
)
backend/main.py
View file @
c8907079
...
@@ -43,8 +43,6 @@ from config import (
...
@@ -43,8 +43,6 @@ from config import (
GLOBAL_LOG_LEVEL
,
GLOBAL_LOG_LEVEL
,
SRC_LOG_LEVELS
,
SRC_LOG_LEVELS
,
WEBHOOK_URL
,
WEBHOOK_URL
,
MANIFEST_NAME
,
MANIFEST_SHORT_NAME
)
)
from
constants
import
ERROR_MESSAGES
from
constants
import
ERROR_MESSAGES
...
@@ -71,9 +69,6 @@ app.state.MODEL_FILTER_LIST = MODEL_FILTER_LIST
...
@@ -71,9 +69,6 @@ app.state.MODEL_FILTER_LIST = MODEL_FILTER_LIST
app
.
state
.
WEBHOOK_URL
=
WEBHOOK_URL
app
.
state
.
WEBHOOK_URL
=
WEBHOOK_URL
app
.
state
.
MANIFEST_NAME
=
MANIFEST_NAME
app
.
state
.
MANIFEST_SHORT_NAME
=
MANIFEST_SHORT_NAME
origins
=
[
"*"
]
origins
=
[
"*"
]
...
@@ -275,20 +270,14 @@ async def get_app_latest_release_version():
...
@@ -275,20 +270,14 @@ async def get_app_latest_release_version():
@
app
.
get
(
"/manifest.json"
)
@
app
.
get
(
"/manifest.json"
)
async
def
get_manifest_json
():
async
def
get_manifest_json
():
return
{
return
{
"name"
:
app
.
state
.
MANIFEST
_NAME
,
"name"
:
WEBUI
_NAME
,
"short_name"
:
app
.
state
.
MANIFEST_SHORT
_NAME
,
"short_name"
:
WEBUI
_NAME
,
"start_url"
:
"/"
,
"start_url"
:
"/"
,
"display"
:
"standalone"
,
"display"
:
"standalone"
,
"background_color"
:
"#343541"
,
"background_color"
:
"#343541"
,
"theme_color"
:
"#343541"
,
"theme_color"
:
"#343541"
,
"orientation"
:
"portrait-primary"
,
"orientation"
:
"portrait-primary"
,
"icons"
:
[
"icons"
:
[{
"src"
:
"/favicon.png"
,
"type"
:
"image/png"
,
"sizes"
:
"844x884"
}],
{
"src"
:
"/favicon.png"
,
"type"
:
"image/png"
,
"sizes"
:
"844x884"
}
]
}
}
...
...
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