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
6d854125
Commit
6d854125
authored
Mar 02, 2024
by
Timothy J. Baek
Browse files
refac: ollama.db renamed to webui.db
parent
74809e73
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
backend/apps/web/internal/db.py
backend/apps/web/internal/db.py
+11
-1
No files found.
backend/apps/web/internal/db.py
View file @
6d854125
from
peewee
import
*
from
peewee
import
*
from
config
import
DATA_DIR
from
config
import
DATA_DIR
import
os
DB
=
SqliteDatabase
(
f
"
{
DATA_DIR
}
/ollama.db"
)
# Check if the file exists
if
os
.
path
.
exists
(
f
"
{
DATA_DIR
}
/ollama.db"
):
# Rename the file
os
.
rename
(
f
"
{
DATA_DIR
}
/ollama.db"
,
f
"
{
DATA_DIR
}
/webui.db"
)
print
(
"File renamed successfully."
)
else
:
pass
DB
=
SqliteDatabase
(
f
"
{
DATA_DIR
}
/webui.db"
)
DB
.
connect
()
DB
.
connect
()
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