fix: 模型库优化

This commit is contained in:
Gsh
2025-12-10 01:34:40 +08:00
parent 1a32fa9e20
commit c319b0b4e4
6 changed files with 444 additions and 220 deletions

View File

@@ -12,14 +12,14 @@ export function getModelLibraryList(params?: ModelLibraryGetListInput) {
if (params?.searchKey) {
queryParams.append('SearchKey', params.searchKey);
}
if (params?.providerName) {
queryParams.append('ProviderName', params.providerName);
if (params?.providerNames && params.providerNames.length > 0) {
params.providerNames.forEach(name => queryParams.append('ProviderNames', name));
}
if (params?.modelType !== undefined) {
queryParams.append('ModelType', params.modelType.toString());
if (params?.modelTypes && params.modelTypes.length > 0) {
params.modelTypes.forEach(type => queryParams.append('ModelTypes', type.toString()));
}
if (params?.modelApiType !== undefined) {
queryParams.append('ModelApiType', params.modelApiType.toString());
if (params?.modelApiTypes && params.modelApiTypes.length > 0) {
params.modelApiTypes.forEach(type => queryParams.append('ModelApiTypes', type.toString()));
}
if (params?.isPremiumOnly !== undefined) {
queryParams.append('IsPremiumOnly', params.isPremiumOnly.toString());

View File

@@ -46,9 +46,9 @@ export interface ModelLibraryDto {
// 获取模型库列表查询参数
export interface ModelLibraryGetListInput {
searchKey?: string;
providerName?: string;
modelType?: ModelTypeEnum;
modelApiType?: ModelApiTypeEnum;
providerNames?: string[];
modelTypes?: ModelTypeEnum[];
modelApiTypes?: ModelApiTypeEnum[];
isPremiumOnly?: boolean;
skipCount?: number;
maxResultCount?: number;