代码拉取完成,页面将自动刷新
import axios from '../service/axiosInstance';
import { isMobile } from '../utils/utils';
import { AgentType, ModelType } from './type';
const prefix = isMobile ? '/openapi' : '/api';
export function saveConversation(chatName: string, agentId: number) {
return axios.post<any>(`${prefix}/chat/manage/save?chatName=${chatName}&agentId=${agentId}`);
}
export function updateConversationName(chatName: string, chatId: number = 0) {
return axios.post<any>(
`${prefix}/chat/manage/updateChatName?chatName=${chatName}&chatId=${chatId}`
);
}
export function deleteConversation(chatId: number) {
return axios.post<any>(`${prefix}/chat/manage/delete?chatId=${chatId}`);
}
export function getAllConversations(agentId?: number) {
return axios.get<any>(`${prefix}/chat/manage/getAll`, { params: { agentId } });
}
export function getModelList() {
return axios.get<ModelType[]>(`${prefix}/chat/conf/modelList/dataSet`);
}
export function updateQAFeedback(questionId: number, score: number) {
return axios.post<any>(
`${prefix}/chat/manage/updateQAFeedback?id=${questionId}&score=${score}&feedback=`
);
}
export function queryMetricSuggestion(modelId: number) {
return axios.get<any>(`${prefix}/chat/recommend/metric/${modelId}`);
}
export function querySuggestion(modelId: number) {
return axios.get<any>(`${prefix}/chat/recommend/${modelId}`);
}
export function queryRecommendQuestions() {
return axios.get<any>(`${prefix}/chat/recommend/question`);
}
export function queryAgentList() {
return axios.get<AgentType[]>(`${prefix}/chat/agent/getAgentList`);
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。