import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { AIFillFormRequestVO } from '@/api/ai/skill/aiAssistant/types';
import {AiKnowledgeBaseTypeForm} from "@/api/ai/base/aiKnowledgeBaseType/types";



export const aiFillForm = (data?: AIFillFormRequestVO): AxiosPromise<AIFillFormRequestVO[]> => {
  return request({
    url: '/ai/assistant/aiFillForm',
    method: 'post',
    data: data,
    timeout: 1000000
  });
};


export const asr = (data: any) => {
  return request({
    url: '/ai/api/speech/recognize',
    method: 'post',
    data: data,
    timeout: 1000000
  });
};

export const uploadFile = (data: any) => {
  return request({
    url: '/resource/oss/upload',
    method: 'post',
    data: data
  });
};

export const recognizeSpeechByUrl = (audioUrl: string) => {
  return request({
    url: '/ai/asr/recognizeSpeechByUrl',
    method: 'post',
    params: {audioUrl}
  });
};


