ragflow / web /src /services /flow-service.ts
balibabu
Feat: Supports to debug single component in Agent. #3993 (#4007)
b9c5b85
raw
history blame
1.06 kB
import api from '@/utils/api';
import registerServer from '@/utils/register-server';
import request from '@/utils/request';
const {
getCanvas,
setCanvas,
listCanvas,
resetCanvas,
removeCanvas,
runCanvas,
listTemplates,
testDbConnect,
getInputElements,
debug,
} = 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',
},
runCanvas: {
url: runCanvas,
method: 'post',
},
listTemplates: {
url: listTemplates,
method: 'get',
},
testDbConnect: {
url: testDbConnect,
method: 'post',
},
getInputElements: {
url: getInputElements,
method: 'get',
},
debugSingle: {
url: debug,
method: 'post',
},
} as const;
const chatService = registerServer<keyof typeof methods>(methods, request);
export default chatService;