import http from "@/api/http.js"

export const aiQAInterence = {
    /**
     * 获取话题列表
     * @param {*} params 
     * @returns 
     */
    getTopicList:params=>{
        return http.get('/ai/topic/list',params)
    },
    /**
     * 获取话题详情
     * @param {Object} params 
     * @param {Number} params.AiChatTopicId 话题id
     * @returns 
     */
    getTopicDetail:params=>{
        return http.get('/ai/topic/detail',params)
    },
    /**
     * 提问
     * @param {Object} params 
     * @param {Number} params.AiChatTopicId 话题id,新窗口请求传0
     * @param {String} params.Ask 话题内容
     * @param {String} params.Model 模型名称
     * @returns 
     */
    sendChatMsg:params=>{
        return http.post('/ai/chat',params)
    },
    /**
     * 
     * @param {Object} params 
     * @param {Number} params.AiChatTopicId 话题id
     * @returns 
     */
    deleteTopic:params=>{
        return http.post('/ai/topic/delete',params)
    },
    /**
     * 编辑话题标题
     * @param {Object} params 
     * @param {Number} params.AiChatTopicId 话题id
     * @param {String} params.TopicName 话题标题
     * @returns 
     */
    editTopicName:params=>{
        return http.post('/ai/topic/edit',params)
    }
}