mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
* feat: fetch file thumbnails * feat: preview reference image * feat: delete conversation * feat: rename conversation
59 lines
1.0 KiB
TypeScript
59 lines
1.0 KiB
TypeScript
import api from '@/utils/api';
|
|
import registerServer from '@/utils/registerServer';
|
|
import request from '@/utils/request';
|
|
|
|
const {
|
|
getDialog,
|
|
setDialog,
|
|
listDialog,
|
|
removeDialog,
|
|
getConversation,
|
|
setConversation,
|
|
completeConversation,
|
|
listConversation,
|
|
removeConversation,
|
|
} = api;
|
|
|
|
const methods = {
|
|
getDialog: {
|
|
url: getDialog,
|
|
method: 'get',
|
|
},
|
|
setDialog: {
|
|
url: setDialog,
|
|
method: 'post',
|
|
},
|
|
removeDialog: {
|
|
url: removeDialog,
|
|
method: 'post',
|
|
},
|
|
listDialog: {
|
|
url: listDialog,
|
|
method: 'get',
|
|
},
|
|
listConversation: {
|
|
url: listConversation,
|
|
method: 'get',
|
|
},
|
|
getConversation: {
|
|
url: getConversation,
|
|
method: 'get',
|
|
},
|
|
setConversation: {
|
|
url: setConversation,
|
|
method: 'post',
|
|
},
|
|
completeConversation: {
|
|
url: completeConversation,
|
|
method: 'post',
|
|
},
|
|
removeConversation: {
|
|
url: removeConversation,
|
|
method: 'post',
|
|
},
|
|
} as const;
|
|
|
|
const chatService = registerServer<keyof typeof methods>(methods, request);
|
|
|
|
export default chatService;
|