perf: 模型管理界面重做

This commit is contained in:
2026-03-11 20:33:04 +08:00
parent 219fa566ef
commit 373d7f8201
37 changed files with 4120 additions and 2108 deletions

View File

@@ -1,10 +1,19 @@
import { api } from '#/api/request.js';
import {api} from '#/api/request.js';
// 获取LLM供应商
export async function getLlmProviderList() {
return api.get('/api/v1/modelProvider/list');
}
export interface ModelListQuery {
modelType?: string;
providerId?: string;
}
export async function getModelList(params: ModelListQuery = {}) {
return api.get('/api/v1/model/list', { params });
}
// 保存LLM
export async function saveLlm(data: string) {
return api.post('/api/v1/model/save', data);
@@ -20,6 +29,10 @@ export async function updateLlm(data: any) {
return api.post(`/api/v1/model/update`, data);
}
export async function verifyModelConfig(id: string) {
return api.get('/api/v1/model/verifyLlmConfig', { params: { id } });
}
// 一键添加LLM
export async function quickAddLlm(data: any) {
return api.post(`/api/v1/model/quickAdd`, data);
@@ -33,7 +46,6 @@ export interface llmType {
providerName: string;
providerType: string;
};
withUsed: boolean;
llmModel: string;
icon: string;
description: string;