feat: support DeepSeek (#667)

### What problem does this PR solve?

#666 
feat: support DeepSeek
feat: preview word and excel

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-05-08 10:30:18 +08:00
committed by GitHub
parent eb27a4309e
commit a553dc8dbd
17 changed files with 1922 additions and 109 deletions

View File

@ -75,4 +75,5 @@ export default {
getAllParentFolder: `${api_host}/file/all_parent_folder`,
createFolder: `${api_host}/file/create`,
connectFileToKnowledge: `${api_host}/file2document/convert`,
getFile: `${api_host}/file/get`,
};

View File

@ -1,3 +1,4 @@
import omit from 'lodash/omit';
import { RequestMethod } from 'umi-request';
type Service<T extends string> = Record<T, (params: any) => any>;
@ -10,6 +11,7 @@ const registerServer = <T extends string>(
for (let key in opt) {
server[key] = (params: any, urlAppendix?: string) => {
let url = opt[key].url;
const requestOptions = opt[key];
if (urlAppendix) {
url = url + '/' + urlAppendix;
}
@ -22,6 +24,7 @@ const registerServer = <T extends string>(
if (opt[key].method === 'get' || opt[key].method === 'GET') {
return request.get(url, {
...omit(requestOptions, ['method', 'url']),
params,
});
}