import request from "@/utils/request";
//获取任务列表
const tasks = () => {
  return request({
    url: '/tasks',
    method: 'get'
  })
}
//获取可用的设备状态
const availableDevices = (data) => {
  return request({
    url: '/tasks/available_devices',
    method: 'get',
    params: data
  })
}
//获取正在执行的任务
const running = () => {
  return request({
    url: '/tasks/running',
    method: 'get'
  })
}
//创建推理任务
const addTask = (data) => {
  return request({
    url: '/tasks',
    method: 'post',
    data: data
  })
}
export default {
  tasks,
  availableDevices,
  running,
  addTask
}
