feat: Add base project structure with API and web components

This commit is contained in:
Ke Sun
2025-12-02 20:28:01 +08:00
parent f3de6d6cc9
commit c1adc62ec6
817 changed files with 111226 additions and 106 deletions

23
web/src/api/models.ts Normal file
View File

@@ -0,0 +1,23 @@
import { request } from '@/utils/request'
import type { ModelFormData } from '@/views/ModelManagement/types'
// 模型列表
export const getModelListUrl = '/models'
export const getModelList = (data: { type: string; pagesize: number; page: number; }) => {
return request.get(getModelListUrl, data)
}
// 创建模型
export const addModel = (data: ModelFormData) => {
return request.post('/models', data)
}
// 更新模型
export const updateModel = (apiKeyId: string, data: ModelFormData) => {
return request.put(`/models/apikeys/${apiKeyId}`, data)
}
// 模型类型列表
export const modelTypeUrl = '/models/type'
// 模型供应商列表
export const modelProviderUrl = '/models/provider'
export const getModelProviderList = () => {
return request.get(modelProviderUrl)
}