mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-26 17:16:52 +08:00
### What problem does this PR solve? feat: change all file names to lowercase #1574 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
93
web/src/services/chat-service.ts
Normal file
93
web/src/services/chat-service.ts
Normal file
@ -0,0 +1,93 @@
|
||||
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,
|
||||
createToken,
|
||||
listToken,
|
||||
removeToken,
|
||||
getStats,
|
||||
createExternalConversation,
|
||||
getExternalConversation,
|
||||
completeExternalConversation,
|
||||
} = 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',
|
||||
},
|
||||
createToken: {
|
||||
url: createToken,
|
||||
method: 'post',
|
||||
},
|
||||
listToken: {
|
||||
url: listToken,
|
||||
method: 'get',
|
||||
},
|
||||
removeToken: {
|
||||
url: removeToken,
|
||||
method: 'post',
|
||||
},
|
||||
getStats: {
|
||||
url: getStats,
|
||||
method: 'get',
|
||||
},
|
||||
createExternalConversation: {
|
||||
url: createExternalConversation,
|
||||
method: 'get',
|
||||
},
|
||||
getExternalConversation: {
|
||||
url: getExternalConversation,
|
||||
method: 'get',
|
||||
},
|
||||
completeExternalConversation: {
|
||||
url: completeExternalConversation,
|
||||
method: 'post',
|
||||
},
|
||||
} as const;
|
||||
|
||||
const chatService = registerServer<keyof typeof methods>(methods, request);
|
||||
|
||||
export default chatService;
|
||||
Reference in New Issue
Block a user