From e69f31267af02ae4e83298481f599ab35dc57703 Mon Sep 17 00:00:00 2001 From: Jun Siang Cheah Date: Thu, 9 May 2024 20:25:53 +0800 Subject: [PATCH] fix: remove unused API for setting model config --- backend/apps/web/routers/configs.py | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/backend/apps/web/routers/configs.py b/backend/apps/web/routers/configs.py index c1322dce0..0bad55a6a 100644 --- a/backend/apps/web/routers/configs.py +++ b/backend/apps/web/routers/configs.py @@ -35,19 +35,6 @@ class SetDefaultSuggestionsForm(BaseModel): suggestions: List[PromptSuggestion] -class ModelConfig(BaseModel): - id: str - name: str - description: str - vision_capable: bool - - -class SetModelConfigForm(BaseModel): - ollama: List[ModelConfig] - litellm: List[ModelConfig] - openai: List[ModelConfig] - - ############################ # SetDefaultModels ############################ @@ -70,14 +57,3 @@ async def set_global_default_suggestions( data = form_data.model_dump() request.app.state.DEFAULT_PROMPT_SUGGESTIONS = data["suggestions"] return request.app.state.DEFAULT_PROMPT_SUGGESTIONS - - -@router.post("/models", response_model=SetModelConfigForm) -async def set_global_default_suggestions( - request: Request, - form_data: SetModelConfigForm, - user=Depends(get_admin_user), -): - data = form_data.model_dump() - request.app.state.MODEL_CONFIG = data - return request.app.state.MODEL_CONFIG