From dc7221816f459d7fb59f3e272222672b67aaf82c Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Tue, 26 Nov 2024 08:55:06 -0800 Subject: [PATCH] fix: models configure --- backend/open_webui/apps/webui/routers/configs.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/backend/open_webui/apps/webui/routers/configs.py b/backend/open_webui/apps/webui/routers/configs.py index b19fc1745..7466e6fda 100644 --- a/backend/open_webui/apps/webui/routers/configs.py +++ b/backend/open_webui/apps/webui/routers/configs.py @@ -1,10 +1,12 @@ -from open_webui.config import BannerModel from fastapi import APIRouter, Depends, Request from pydantic import BaseModel + +from typing import Optional + from open_webui.utils.utils import get_admin_user, get_verified_user - - from open_webui.config import get_config, save_config +from open_webui.config import BannerModel + router = APIRouter() @@ -38,8 +40,8 @@ async def export_config(user=Depends(get_admin_user)): # SetDefaultModels ############################ class ModelsConfigForm(BaseModel): - DEFAULT_MODELS: str - MODEL_ORDER_LIST: list[str] + DEFAULT_MODELS: Optional[str] + MODEL_ORDER_LIST: Optional[list[str]] @router.get("/models", response_model=ModelsConfigForm)