mirror of
https://github.com/open-webui/open-webui
synced 2024-12-28 14:52:23 +00:00
fix: models configure
This commit is contained in:
parent
e3236622f3
commit
dc7221816f
@ -1,10 +1,12 @@
|
|||||||
from open_webui.config import BannerModel
|
|
||||||
from fastapi import APIRouter, Depends, Request
|
from fastapi import APIRouter, Depends, Request
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
|
||||||
|
from typing import Optional
|
||||||
|
|
||||||
from open_webui.utils.utils import get_admin_user, get_verified_user
|
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 get_config, save_config
|
||||||
|
from open_webui.config import BannerModel
|
||||||
|
|
||||||
|
|
||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|
||||||
@ -38,8 +40,8 @@ async def export_config(user=Depends(get_admin_user)):
|
|||||||
# SetDefaultModels
|
# SetDefaultModels
|
||||||
############################
|
############################
|
||||||
class ModelsConfigForm(BaseModel):
|
class ModelsConfigForm(BaseModel):
|
||||||
DEFAULT_MODELS: str
|
DEFAULT_MODELS: Optional[str]
|
||||||
MODEL_ORDER_LIST: list[str]
|
MODEL_ORDER_LIST: Optional[list[str]]
|
||||||
|
|
||||||
|
|
||||||
@router.get("/models", response_model=ModelsConfigForm)
|
@router.get("/models", response_model=ModelsConfigForm)
|
||||||
|
Loading…
Reference in New Issue
Block a user