mirror of
https://github.com/snailyp/gemini-balance.git
synced 2026-09-04 23:19:17 +08:00
fix:修复gemini格式不能查询模型列表的问题
This commit is contained in:
@@ -53,8 +53,8 @@ async def list_models(
|
|||||||
model_mapping = {x.get("name", "").split("/", maxsplit=1)[1]: x for x in models_json["models"]}
|
model_mapping = {x.get("name", "").split("/", maxsplit=1)[1]: x for x in models_json["models"]}
|
||||||
|
|
||||||
# 添加搜索模型
|
# 添加搜索模型
|
||||||
if model_service.search_models:
|
if settings.SEARCH_MODELS:
|
||||||
for name in model_service.search_models:
|
for name in settings.SEARCH_MODELS:
|
||||||
model = model_mapping.get(name)
|
model = model_mapping.get(name)
|
||||||
if not model:
|
if not model:
|
||||||
continue
|
continue
|
||||||
@@ -68,8 +68,8 @@ async def list_models(
|
|||||||
models_json["models"].append(item)
|
models_json["models"].append(item)
|
||||||
|
|
||||||
# 添加图像生成模型
|
# 添加图像生成模型
|
||||||
if model_service.image_models:
|
if settings.IMAGE_MODELS:
|
||||||
for name in model_service.image_models:
|
for name in settings.IMAGE_MODELS:
|
||||||
model = model_mapping.get(name)
|
model = model_mapping.get(name)
|
||||||
if not model:
|
if not model:
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user