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
a518d504
"src/lib/vscode:/vscode.git/clone" did not exist on "5cd28c04b8330001f45504b7c0a3c94adfbc090b"
Commit
a518d504
authored
Aug 14, 2024
by
Michael Poluektov
Browse files
format backend
parent
29f904db
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
backend/apps/audio/main.py
backend/apps/audio/main.py
+1
-1
backend/apps/webui/routers/utils.py
backend/apps/webui/routers/utils.py
+1
-1
backend/apps/webui/utils.py
backend/apps/webui/utils.py
+3
-2
No files found.
backend/apps/audio/main.py
View file @
a518d504
...
@@ -15,7 +15,7 @@ from fastapi.responses import StreamingResponse, JSONResponse, FileResponse
...
@@ -15,7 +15,7 @@ from fastapi.responses import StreamingResponse, JSONResponse, FileResponse
from
fastapi.middleware.cors
import
CORSMiddleware
from
fastapi.middleware.cors
import
CORSMiddleware
from
pydantic
import
BaseModel
from
pydantic
import
BaseModel
from
typing
import
List
import
uuid
import
uuid
import
requests
import
requests
import
hashlib
import
hashlib
...
...
backend/apps/webui/routers/utils.py
View file @
a518d504
...
@@ -17,7 +17,7 @@ from utils.misc import calculate_sha256, get_gravatar_url
...
@@ -17,7 +17,7 @@ from utils.misc import calculate_sha256, get_gravatar_url
from
config
import
OLLAMA_BASE_URLS
,
DATA_DIR
,
UPLOAD_DIR
,
ENABLE_ADMIN_EXPORT
from
config
import
OLLAMA_BASE_URLS
,
DATA_DIR
,
UPLOAD_DIR
,
ENABLE_ADMIN_EXPORT
from
constants
import
ERROR_MESSAGES
from
constants
import
ERROR_MESSAGES
from
typing
import
List
router
=
APIRouter
()
router
=
APIRouter
()
...
...
backend/apps/webui/utils.py
View file @
a518d504
...
@@ -93,9 +93,10 @@ def load_function_module_by_id(function_id):
...
@@ -93,9 +93,10 @@ def load_function_module_by_id(function_id):
os
.
rename
(
function_path
,
f
"
{
function_path
}
.error"
)
os
.
rename
(
function_path
,
f
"
{
function_path
}
.error"
)
raise
e
raise
e
def
install_frontmatter_requirements
(
requirements
):
def
install_frontmatter_requirements
(
requirements
):
if
requirements
:
if
requirements
:
req_list
=
[
req
.
strip
()
for
req
in
requirements
.
split
(
','
)]
req_list
=
[
req
.
strip
()
for
req
in
requirements
.
split
(
","
)]
for
req
in
req_list
:
for
req
in
req_list
:
print
(
f
"Installing requirement:
{
req
}
"
)
print
(
f
"Installing requirement:
{
req
}
"
)
subprocess
.
check_call
([
sys
.
executable
,
"-m"
,
"pip"
,
"install"
,
req
])
subprocess
.
check_call
([
sys
.
executable
,
"-m"
,
"pip"
,
"install"
,
req
])
...
...
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