fix: 聊天模型列表仅返回 OpenAi 类型

在 Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/Chat/AiChatService.cs 中,为查询添加了 .Where(x => x.ModelApiType == ModelApiTypeEnum.OpenAi) 过滤,确保只返回 ModelType 为 Chat 且 ModelApiType 为 OpenAi 的模型,避免将非 OpenAi 的模型纳入聊天模型列表。
This commit is contained in:
chenchun
2025-12-11 17:17:35 +08:00
parent 69b84f6613
commit 67ed1ac1e3

View File

@@ -73,6 +73,7 @@ public class AiChatService : ApplicationService
{
var output = await _aiModelRepository._DbQueryable
.Where(x => x.ModelType == ModelTypeEnum.Chat)
.Where(x=>x.ModelApiType==ModelApiTypeEnum.OpenAi)
.OrderByDescending(x => x.OrderNum)
.Select(x => new ModelGetListOutput
{