mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-27 02:42:00 +08:00
49 lines
878 B
TypeScript
49 lines
878 B
TypeScript
|
|
import api from '@/utils/api';
|
||
|
|
import registerServer from '@/utils/registerServer';
|
||
|
|
import request from '@/utils/request';
|
||
|
|
|
||
|
|
const {
|
||
|
|
getDialog,
|
||
|
|
setDialog,
|
||
|
|
listDialog,
|
||
|
|
getConversation,
|
||
|
|
setConversation,
|
||
|
|
completeConversation,
|
||
|
|
listConversation,
|
||
|
|
} = api;
|
||
|
|
|
||
|
|
const methods = {
|
||
|
|
getDialog: {
|
||
|
|
url: getDialog,
|
||
|
|
method: 'get',
|
||
|
|
},
|
||
|
|
setDialog: {
|
||
|
|
url: setDialog,
|
||
|
|
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',
|
||
|
|
},
|
||
|
|
} as const;
|
||
|
|
|
||
|
|
const chatService = registerServer<keyof typeof methods>(methods, request);
|
||
|
|
|
||
|
|
export default chatService;
|