From 6101ea46d348ed03b5ca3f3da45e11db10c171b0 Mon Sep 17 00:00:00 2001 From: chenchun Date: Mon, 5 Jan 2026 14:15:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=8E=B7=E5=8F=96=E5=9B=BE=E5=83=8F?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E6=97=B6=E4=BB=85=E8=BF=94=E5=9B=9E=E5=90=AF?= =?UTF-8?q?=E7=94=A8=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在查询图像模型列表时加入 IsEnabled == true 过滤,避免返回已禁用的模型。文件:AiImageService.cs --- .../Services/Chat/AiImageService.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/Chat/AiImageService.cs b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/Chat/AiImageService.cs index 05f672c6..dfd3b23e 100644 --- a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/Chat/AiImageService.cs +++ b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/Chat/AiImageService.cs @@ -370,6 +370,7 @@ public class AiImageService : ApplicationService public async Task> GetModelAsync() { var output = await _aiModelRepository._DbQueryable + .Where(x=>x.IsEnabled==true) .Where(x => x.ModelType == ModelTypeEnum.Image) .Where(x => x.ModelApiType == ModelApiTypeEnum.GenerateContent) .OrderByDescending(x => x.OrderNum)