From 60538995163a463520ff3855d2f1ef9d3b623ba7 Mon Sep 17 00:00:00 2001 From: ccnetcore Date: Mon, 5 Jan 2026 22:19:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BB=85=E8=8E=B7=E5=8F=96=E5=B7=B2?= =?UTF-8?q?=E5=90=AF=E7=94=A8=E7=9A=84=E8=81=8A=E5=A4=A9=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在获取聊天模型列表时新增 IsEnabled 条件过滤,避免返回未启用的模型,确保模型选择结果正确。 --- .../Services/Chat/AiChatService.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/Chat/AiChatService.cs b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/Chat/AiChatService.cs index 69ef325e..bec50005 100644 --- a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/Chat/AiChatService.cs +++ b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/Chat/AiChatService.cs @@ -94,6 +94,7 @@ public class AiChatService : ApplicationService public async Task> GetModelAsync() { var output = await _aiModelRepository._DbQueryable + .Where(x=>x.IsEnabled==true) .Where(x => x.ModelType == ModelTypeEnum.Chat) .Where(x => x.ModelApiType == ModelApiTypeEnum.OpenAi) .OrderByDescending(x => x.OrderNum)