feat: 完成模型库功能模块
This commit is contained in:
@@ -5,6 +5,7 @@ using Volo.Abp.Application.Services;
|
||||
using Yi.Framework.AiHub.Application.Contracts.Dtos.Model;
|
||||
using Yi.Framework.AiHub.Application.Contracts.IServices;
|
||||
using Yi.Framework.AiHub.Domain.Entities.Model;
|
||||
using Yi.Framework.AiHub.Domain.Shared.Consts;
|
||||
using Yi.Framework.AiHub.Domain.Shared.Enums;
|
||||
using Yi.Framework.AiHub.Domain.Shared.Extensions;
|
||||
using Yi.Framework.SqlSugarCore.Abstractions;
|
||||
@@ -42,7 +43,7 @@ public class ModelService : ApplicationService, IModelService
|
||||
.WhereIF(input.ModelApiTypes is not null, x =>
|
||||
input.ModelApiTypes.Contains(x.ModelApiType))
|
||||
.WhereIF(input.IsPremiumOnly == true, x =>
|
||||
x.ModelType == ModelTypeEnum.PremiumChat)
|
||||
PremiumPackageConst.ModeIds.Contains(x.ModelId))
|
||||
.OrderBy(x => x.OrderNum)
|
||||
.OrderBy(x => x.Name)
|
||||
.ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
|
||||
@@ -60,7 +61,7 @@ public class ModelService : ApplicationService, IModelService
|
||||
MultiplierShow = model.MultiplierShow,
|
||||
ProviderName = model.ProviderName,
|
||||
IconUrl = model.IconUrl,
|
||||
IsPremium = model.ModelType == ModelTypeEnum.PremiumChat
|
||||
IsPremium = PremiumPackageConst.ModeIds.Contains(model.ModelId)
|
||||
}).ToList();
|
||||
|
||||
return new PagedResultDto<ModelLibraryDto>(total, result);
|
||||
|
||||
@@ -11,8 +11,5 @@ public enum ModelTypeEnum
|
||||
Image = 1,
|
||||
|
||||
[Description("嵌入")]
|
||||
Embedding = 2,
|
||||
|
||||
[Description("尊享包")]
|
||||
PremiumChat = 3
|
||||
Embedding = 2
|
||||
}
|
||||
Reference in New Issue
Block a user