feat: 新增模型列表 IsPremiumPackage 字段并在 AiChatService 中设置
- 在 Yi.Framework.AiHub.Application.Contracts.Dtos.ModelGetListOutput 中新增 bool 属性 IsPremiumPackage。 - 在 Yi.Framework.AiHub.Application.Services.Chat.AiChatService 的模型映射中设置该属性,判断逻辑为 PremiumPackageConst.ModeIds.Contains(x.ModelId)。 - 便于前端区分并展示“尊享包”模型。
This commit is contained in:
@@ -62,4 +62,9 @@ public class ModelGetListOutput
|
|||||||
/// 备注信息
|
/// 备注信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string? Remark { get; set; }
|
public string? Remark { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否为尊享包
|
||||||
|
/// </summary>
|
||||||
|
public bool IsPremiumPackage { get; set; }
|
||||||
}
|
}
|
||||||
@@ -87,7 +87,8 @@ public class AiChatService : ApplicationService
|
|||||||
SystemPrompt = null,
|
SystemPrompt = null,
|
||||||
ApiHost = null,
|
ApiHost = null,
|
||||||
ApiKey = null,
|
ApiKey = null,
|
||||||
Remark = x.Description
|
Remark = x.Description,
|
||||||
|
IsPremiumPackage = PremiumPackageConst.ModeIds.Contains(x.ModelId)
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user