Skip to content

Commit 03d5a67

Browse files
committed
refac: mv backend files to /open_webui dir
1 parent 76806a9 commit 03d5a67

File tree

118 files changed

+361
-309
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+361
-309
lines changed

backend/apps/rag/search/searchapi.py

Lines changed: 0 additions & 49 deletions
This file was deleted.

backend/data/litellm/config.yaml

Lines changed: 0 additions & 4 deletions
This file was deleted.

backend/data/readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
dir for backend files (db, documents, etc.)
1+
docker dir for backend files (db, documents, etc.)

backend/dev.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
PORT="${PORT:-8080}"
2-
uvicorn main:app --port $PORT --host 0.0.0.0 --forwarded-allow-ips '*' --reload
2+
uvicorn open_webui.main:app --port $PORT --host 0.0.0.0 --forwarded-allow-ips '*' --reload

backend/alembic.ini renamed to backend/open_webui/alembic.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[alembic]
44
# path to migration scripts
5-
script_location = migrations
5+
script_location = open_webui/migrations
66

77
# template used to generate migration file names; The default value is %%(rev)s_%%(slug)s
88
# Uncomment the line below if you want the files to be prepended with date and time

backend/apps/audio/main.py renamed to backend/open_webui/apps/audio/main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from pathlib import Path
88

99
import requests
10-
from config import (
10+
from open_webui.config import (
1111
AUDIO_STT_ENGINE,
1212
AUDIO_STT_MODEL,
1313
AUDIO_STT_OPENAI_API_BASE_URL,
@@ -27,13 +27,13 @@
2727
WHISPER_MODEL_DIR,
2828
AppConfig,
2929
)
30-
from constants import ERROR_MESSAGES
31-
from env import SRC_LOG_LEVELS
30+
from open_webui.constants import ERROR_MESSAGES
31+
from open_webui.env import SRC_LOG_LEVELS
3232
from fastapi import Depends, FastAPI, File, HTTPException, Request, UploadFile, status
3333
from fastapi.middleware.cors import CORSMiddleware
3434
from fastapi.responses import FileResponse
3535
from pydantic import BaseModel
36-
from utils.utils import get_admin_user, get_current_user, get_verified_user
36+
from open_webui.utils.utils import get_admin_user, get_current_user, get_verified_user
3737

3838
log = logging.getLogger(__name__)
3939
log.setLevel(SRC_LOG_LEVELS["AUDIO"])

backend/apps/images/main.py renamed to backend/open_webui/apps/images/main.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
from typing import Optional
1010

1111
import requests
12-
from apps.images.utils.comfyui import (
12+
from open_webui.apps.images.utils.comfyui import (
1313
ComfyUIGenerateImageForm,
1414
ComfyUIWorkflow,
1515
comfyui_generate_image,
1616
)
17-
from config import (
17+
from open_webui.config import (
1818
AUTOMATIC1111_API_AUTH,
1919
AUTOMATIC1111_BASE_URL,
2020
CACHE_DIR,
@@ -31,12 +31,12 @@
3131
IMAGES_OPENAI_API_KEY,
3232
AppConfig,
3333
)
34-
from constants import ERROR_MESSAGES
35-
from env import SRC_LOG_LEVELS
34+
from open_webui.constants import ERROR_MESSAGES
35+
from open_webui.env import SRC_LOG_LEVELS
3636
from fastapi import Depends, FastAPI, HTTPException, Request
3737
from fastapi.middleware.cors import CORSMiddleware
3838
from pydantic import BaseModel
39-
from utils.utils import get_admin_user, get_verified_user
39+
from open_webui.utils.utils import get_admin_user, get_verified_user
4040

4141
log = logging.getLogger(__name__)
4242
log.setLevel(SRC_LOG_LEVELS["IMAGES"])

backend/apps/images/utils/comfyui.py renamed to backend/open_webui/apps/images/utils/comfyui.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from typing import Optional
88

99
import websocket # NOTE: websocket-client (https://github.com/websocket-client/websocket-client)
10-
from env import SRC_LOG_LEVELS
10+
from open_webui.env import SRC_LOG_LEVELS
1111
from pydantic import BaseModel
1212

1313
log = logging.getLogger(__name__)

backend/apps/ollama/main.py renamed to backend/open_webui/apps/ollama/main.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
import aiohttp
1212
import requests
13-
from apps.webui.models.models import Models
14-
from config import (
13+
from open_webui.apps.webui.models.models import Models
14+
from open_webui.config import (
1515
AIOHTTP_CLIENT_TIMEOUT,
1616
CORS_ALLOW_ORIGIN,
1717
ENABLE_MODEL_FILTER,
@@ -21,20 +21,20 @@
2121
UPLOAD_DIR,
2222
AppConfig,
2323
)
24-
from constants import ERROR_MESSAGES
25-
from env import SRC_LOG_LEVELS
24+
from open_webui.constants import ERROR_MESSAGES
25+
from open_webui.env import SRC_LOG_LEVELS
2626
from fastapi import Depends, FastAPI, File, HTTPException, Request, UploadFile
2727
from fastapi.middleware.cors import CORSMiddleware
2828
from fastapi.responses import StreamingResponse
2929
from pydantic import BaseModel, ConfigDict
3030
from starlette.background import BackgroundTask
31-
from utils.misc import (
31+
from open_webui.utils.misc import (
3232
apply_model_params_to_body_ollama,
3333
apply_model_params_to_body_openai,
3434
apply_model_system_prompt_to_body,
3535
calculate_sha256,
3636
)
37-
from utils.utils import get_admin_user, get_verified_user
37+
from open_webui.utils.utils import get_admin_user, get_verified_user
3838

3939
log = logging.getLogger(__name__)
4040
log.setLevel(SRC_LOG_LEVELS["OLLAMA"])

backend/apps/openai/main.py renamed to backend/open_webui/apps/openai/main.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
import aiohttp
99
import requests
10-
from apps.webui.models.models import Models
11-
from config import (
10+
from open_webui.apps.webui.models.models import Models
11+
from open_webui.config import (
1212
AIOHTTP_CLIENT_TIMEOUT,
1313
CACHE_DIR,
1414
CORS_ALLOW_ORIGIN,
@@ -19,18 +19,18 @@
1919
OPENAI_API_KEYS,
2020
AppConfig,
2121
)
22-
from constants import ERROR_MESSAGES
23-
from env import SRC_LOG_LEVELS
22+
from open_webui.constants import ERROR_MESSAGES
23+
from open_webui.env import SRC_LOG_LEVELS
2424
from fastapi import Depends, FastAPI, HTTPException, Request
2525
from fastapi.middleware.cors import CORSMiddleware
2626
from fastapi.responses import FileResponse, StreamingResponse
2727
from pydantic import BaseModel
2828
from starlette.background import BackgroundTask
29-
from utils.misc import (
29+
from open_webui.utils.misc import (
3030
apply_model_params_to_body_openai,
3131
apply_model_system_prompt_to_body,
3232
)
33-
from utils.utils import get_admin_user, get_verified_user
33+
from open_webui.utils.utils import get_admin_user, get_verified_user
3434

3535
log = logging.getLogger(__name__)
3636
log.setLevel(SRC_LOG_LEVELS["OPENAI"])

0 commit comments

Comments
 (0)