Files
tashow-manager/src/services/ai/model/index.tsx
2026-02-27 14:23:53 +08:00

75 lines
1.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* 返回数据
*
* AiModelRespVO
*/
export interface AiModelRespVO {
/**
* 创建时间
*/
createTime?: string;
/**
* 版本描述
*/
description?: string;
/**
* 主键
*/
id?: number;
/**
* 负载
*/
loadPercentage?: number;
/**
* 模型名称
*/
modelName?: string;
/**
* 状态0-禁用 1-启用 2-测试中 3-已废弃)
*/
status?: number;
/**
* 更新时间
*/
updateTime?: string;
/**
* 版本号
*/
version?: string;
}
import { request } from "@umijs/max";
export const getModelList = async (params: PageParam) => {
return request("/ai/model/page", {
method: "GET",
params,
});
};
export const createModel = async (params: AiModelRespVO) => {
return request("/ai/model/create", {
method: "POST",
data: params,
});
};
export const updateModel = async (params: AiModelRespVO) => {
return request("/ai/model/update", {
method: "PUT",
data: params,
});
};
export const delModel = async (id: number) => {
return request("/ai/model/delete", {
method: "DELETE",
params: { id },
});
};
export const updateModelStatus = async (params: AiModelRespVO) => {
return request("/ai/model/update-status", {
method: "PUT",
params: params,
});
};