import request from "@/utils/request";
import axios from "axios";
const api = "/mosty-api";

// 解析数据
export function ParsingText(data,fun){
  axios({
    method: 'post',
    url: '/chat/completions',
    data:data,
    headers: { 'Authorization': 'Bearer sk-064b5c53131c4046883b718f2b31c050' }
  }).then( (res) => {
    fun(res)
  })
}


//get 请求
export const qcckFlvGet = (params = {}, url) => {
  return request({
    url: url,
    method: "get",
    params
  });
};



//get 请求
export const qcckGet = (params = {}, url) => {
  return request({
    url: api + url,
    method: "get",
    params
  });
};
//post 请求
export const qcckPost = (data = {}, url) => {
  return request({
    url: api + url,
    method: "post",
    data
  });
};
//put 请求
export const qcckPut = (data = {}, url) => {
  return request({
    url: api + url,
    method: "put",
    data
  });
};
//put 请求
export const qcckDelete = (data = {}, url) => {
  return request({
    url: api + url,
    method: "delete",
    data
  });
};

