feat: 支持多选模型库条件
This commit is contained in:
@@ -35,12 +35,12 @@ public class ModelService : ApplicationService, IModelService
|
||||
.Where(x => !x.IsDeleted)
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.SearchKey), x =>
|
||||
x.Name.Contains(input.SearchKey) || x.ModelId.Contains(input.SearchKey))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.ProviderName), x =>
|
||||
x.ProviderName == input.ProviderName)
|
||||
.WhereIF(input.ModelType.HasValue, x =>
|
||||
x.ModelType == input.ModelType.Value)
|
||||
.WhereIF(input.ModelApiType.HasValue, x =>
|
||||
x.ModelApiType == input.ModelApiType.Value)
|
||||
.WhereIF(input.ProviderNames is not null, x =>
|
||||
input.ProviderNames.Contains(x.ProviderName))
|
||||
.WhereIF(input.ModelTypes is not null, x =>
|
||||
input.ModelTypes.Contains(x.ModelType))
|
||||
.WhereIF(input.ModelApiTypes is not null, x =>
|
||||
input.ModelApiTypes.Contains(x.ModelApiType))
|
||||
.WhereIF(input.IsPremiumOnly == true, x =>
|
||||
x.ModelType == ModelTypeEnum.PremiumChat)
|
||||
.OrderBy(x => x.OrderNum)
|
||||
@@ -113,4 +113,4 @@ public class ModelService : ApplicationService, IModelService
|
||||
|
||||
return Task.FromResult(options);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user