/*
 * @Author: 赵伟
 * @Date: 2024-04-16 14:29:44
 * @Description: 模型部署接口
 */
import { request } from '@umijs/max';

// 分页查询模型部署列表
export function getModelDeploymentListReq(data: any) {
  return request(`/api/v1/model/get`, {
    method: 'POST',
    data,
  });
}

// 查询模型部署详情
export function getModelDeploymentInfoReq(id: number) {
  return request(`/api/mmp/image/${id}`, {
    method: 'GET',
  });
}

// 创建模型部署
export function createModelDeploymentReq(data: any) {
  return request(`/api/v1/model/create`, {
    method: 'POST',
    data,
  });
}

// 删除模型部署
export function deleteModelDeploymentReq(data: any) {
  return request(`/api/v1/model/delete`, {
    method: 'POST',
    data,
  });
}

// 重启模型部署
export function restartModelDeploymentReq(data: any) {
  return request(`/api/v1/model/restart`, {
    method: 'POST',
    data,
  });
}

// 停止模型部署
export function stopModelDeploymentReq(data: any) {
  return request(`/api/v1/model/stop`, {
    method: 'POST',
    data,
  });
}

// 更新模型部署
export function updateModelDeploymentReq(data: any) {
  return request(`/api/v1/model/update`, {
    method: 'POST',
    data,
  });
}

// 获取模型部署操作指南
export function getModelDeploymentDocsReq(data: any) {
  return request(`/api/v1/model/getDocs`, {
    method: 'POST',
    data,
  });
}

// 获取模型部署日志
export function getModelDeploymentLogReq(data: any) {
  return request(`/api/v1/model/getAppLog`, {
    method: 'POST',
    data,
  });
}
