import request from '@/utils/request'

export function executeInstruction(data) {
  return request({
    url: '/jarvis/instruction/execute',
    method: 'post',
    data
  })
}

export function executeInstructionWithForce(data) {
  return request({
    url: '/jarvis/instruction/execute',
    method: 'post',
    data: {
      ...data,
      forceGenerate: true
    }
  })
}

export function getHistory(type, limit) {
  return request({
    url: '/jarvis/instruction/history',
    method: 'get',
    params: { type, limit }
  })
}


