mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
feat: add custom edge (#1061)
### What problem does this PR solve? feat: add custom edge feat: add flow card feat: add store for canvas #918 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
43
web/src/services/flow-service.ts
Normal file
43
web/src/services/flow-service.ts
Normal file
@ -0,0 +1,43 @@
|
||||
import api from '@/utils/api';
|
||||
import registerServer from '@/utils/registerServer';
|
||||
import request from '@/utils/request';
|
||||
|
||||
const {
|
||||
getCanvas,
|
||||
setCanvas,
|
||||
listCanvas,
|
||||
resetCanvas,
|
||||
removeCanvas,
|
||||
listTemplates,
|
||||
} = api;
|
||||
|
||||
const methods = {
|
||||
getCanvas: {
|
||||
url: getCanvas,
|
||||
method: 'get',
|
||||
},
|
||||
setCanvas: {
|
||||
url: setCanvas,
|
||||
method: 'post',
|
||||
},
|
||||
listCanvas: {
|
||||
url: listCanvas,
|
||||
method: 'get',
|
||||
},
|
||||
resetCanvas: {
|
||||
url: resetCanvas,
|
||||
method: 'post',
|
||||
},
|
||||
removeCanvas: {
|
||||
url: removeCanvas,
|
||||
method: 'post',
|
||||
},
|
||||
listTemplates: {
|
||||
url: listTemplates,
|
||||
method: 'get',
|
||||
},
|
||||
} as const;
|
||||
|
||||
const chatService = registerServer<keyof typeof methods>(methods, request);
|
||||
|
||||
export default chatService;
|
||||
Reference in New Issue
Block a user