From 21444ed6c71a3a58f985c28164ee7d107f08024b Mon Sep 17 00:00:00 2001 From: Toddy <167494546+toddyoe@users.noreply.github.com> Date: Tue, 18 Mar 2025 18:05:00 +0000 Subject: [PATCH] =?UTF-8?q?chore:=20=E7=BB=9F=E4=B8=80=E4=BB=8Emodel=5Fser?= =?UTF-8?q?vice=E8=AF=BB=E5=8F=96=E6=A8=A1=E5=9E=8B=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/gemini_routes.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/api/gemini_routes.py b/app/api/gemini_routes.py index 1596e18..f0f5164 100644 --- a/app/api/gemini_routes.py +++ b/app/api/gemini_routes.py @@ -41,8 +41,8 @@ async def list_models(_=Depends(security_service.verify_key), model_mapping = {x.get("name", "").split("/", maxsplit=1)[1]: x for x in models_json["models"]} # 添加搜索模型 - if settings.SEARCH_MODELS: - for name in settings.SEARCH_MODELS: + if model_service.search_models: + for name in model_service.search_models: model = model_mapping.get(name, None) if not model: continue @@ -56,8 +56,8 @@ async def list_models(_=Depends(security_service.verify_key), models_json["models"].append(item) # 添加图像生成模型 - if settings.IMAGE_MODELS: - for name in settings.IMAGE_MODELS: + if model_service.image_models: + for name in model_service.image_models: model = model_mapping.get(name, None) if not model: continue